diff --git a/CMakeLists.txt b/CMakeLists.txt index e9647ef..2bff830 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,8 +51,14 @@ if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) endif() +# enable folders for MSVC +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + # source directories for vsgPoints library add_subdirectory(src) + +set(CMAKE_FOLDER applications) add_subdirectory(applications) +unset(CMAKE_FOLDER) vsg_add_feature_summary() diff --git a/README.md b/README.md index 9a1d735..87f22f4 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ To enable efficient use of main and GPU memory, point data is segmented into bri To enable handling of point data with very large world coordinates, the data is translated to a local origin with a vsg::MatrixTransform used to place the rendered points in their proper world coordinate system. -The vsgPoints project contains a vsgPoints library that applications may link to if they wish to add point cloud loading and scene graph creation capabilities to their applications, and a vsgpoints_example utility program. +The vsgPoints project contains a vsgPoints library that applications may link to if they wish to add point cloud loading and scene graph creation capabilities to their applications, and a vsgpoints utility program. ## System requirements/constraints @@ -46,18 +46,18 @@ Unix in source build: make -j 8 make install -# vsgpoints_example application usage +# vsgpoints application usage To view .3dc or .asc point clouds, or .BIN (double x,y,z; uint8_t r, g, b) data : ~~~ sh - vsgpoints_example mydata.asc + vsgpoints mydata.asc ~~~~ To convert point cloud data to VulkanSceneGraph native format: ~~~ sh - vsgpoints_example mydata.BIN -o mydata.vsgb + vsgpoints mydata.BIN -o mydata.vsgb ~~~~ Once you have converted to native .vsgb format you can load the data in any VulkanSceneGraph application: @@ -66,7 +66,7 @@ Once you have converted to native .vsgb format you can load the data in any Vulk vsgviewer mydata.vsgb ~~~ -vsgpoints_example supports generating scene graphs in three ways, the command line options for these are: +vsgpoints supports generating scene graphs in three ways, the command line options for these are: | command line option | technique | | --lod | using LOD's (the default) | @@ -75,29 +75,29 @@ vsgpoints_example supports generating scene graphs in three ways, the command li ~~~ sh # create vsg::LOD scene graph - vsgpoints_example mydata.BIN --lod + vsgpoints mydata.BIN --lod # or just rely upon the default being vsg::LOD scene graph - vsgpoints_example mydata.BIN + vsgpoints mydata.BIN # create a flat group of point bricks - vsgpoints_example mydata.BIN --flat + vsgpoints mydata.BIN --flat # create a paged database, requires specification of output file - vsgpoints_example mydata.BIN -o paged.vsgb --plod + vsgpoints mydata.BIN -o paged.vsgb --plod ~~~ -vsgpoints_example also supports generating points from meshed models, which can be enabled with --mesh +vsgpoints also supports generating points from meshed models, which can be enabled with --mesh ~~~ sh # load a mesh model and convert to points as input rather than required loading of points data. - vsgpoints_example mymodel.gltf --mesh + vsgpoints mymodel.gltf --mesh ~~~ -If you don't include an output filename using ~ -o filename.vsgb ~ then vsgpoints_example will automatically create a viewer to view the created scene graph, but if you output to a file no viewer will be created. If you still want the viewer to appear then add the -v option to force the viewer to be created. +If you don't include an output filename using ~ -o filename.vsgb ~ then vsgpoints will automatically create a viewer to view the created scene graph, but if you output to a file no viewer will be created. If you still want the viewer to appear then add the -v option to force the viewer to be created. To alter the precision and point size you can use the -p size_in_metres and --ps multiplier to control the precision (defaults to 0.001) and point size (defaults to 4 x precision). ~~~ sh # choose 5mm precision and ~50mm rendered point size (10 x 0.005) - vsgpoints_example mydata.3dc -p 0.005 --ps 10 + vsgpoints mydata.3dc -p 0.005 --ps 10 ~~~ diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt index 0ef1f39..412d691 100644 --- a/applications/CMakeLists.txt +++ b/applications/CMakeLists.txt @@ -1 +1 @@ -add_subdirectory(vsgpoints_example) +add_subdirectory(vsgpoints) diff --git a/applications/vsgpoints/CMakeLists.txt b/applications/vsgpoints/CMakeLists.txt new file mode 100644 index 0000000..9f0a6e9 --- /dev/null +++ b/applications/vsgpoints/CMakeLists.txt @@ -0,0 +1,15 @@ +set(SOURCES + ConvertMeshToPoints.cpp + vsgpoints.cpp +) + +add_executable(vsgpoints ${SOURCES}) + +target_link_libraries(vsgpoints vsg::vsg vsgPoints::vsgPoints) + +if (vsgXchange_FOUND) + target_compile_definitions(vsgpoints PRIVATE vsgXchange_FOUND) + target_link_libraries(vsgpoints vsgXchange::vsgXchange) +endif() + +install(TARGETS vsgpoints RUNTIME DESTINATION bin) diff --git a/applications/vsgpoints_example/ConvertMeshToPoints.cpp b/applications/vsgpoints/ConvertMeshToPoints.cpp similarity index 100% rename from applications/vsgpoints_example/ConvertMeshToPoints.cpp rename to applications/vsgpoints/ConvertMeshToPoints.cpp diff --git a/applications/vsgpoints_example/ConvertMeshToPoints.h b/applications/vsgpoints/ConvertMeshToPoints.h similarity index 100% rename from applications/vsgpoints_example/ConvertMeshToPoints.h rename to applications/vsgpoints/ConvertMeshToPoints.h diff --git a/applications/vsgpoints_example/vsgpoints_example.cpp b/applications/vsgpoints/vsgpoints.cpp similarity index 100% rename from applications/vsgpoints_example/vsgpoints_example.cpp rename to applications/vsgpoints/vsgpoints.cpp diff --git a/applications/vsgpoints_example/CMakeLists.txt b/applications/vsgpoints_example/CMakeLists.txt deleted file mode 100644 index e813e24..0000000 --- a/applications/vsgpoints_example/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -set(SOURCES - ConvertMeshToPoints.cpp - vsgpoints_example.cpp -) - -add_executable(vsgpoints_example ${SOURCES}) - -target_link_libraries(vsgpoints_example vsg::vsg vsgPoints::vsgPoints) - -if (vsgXchange_FOUND) - target_compile_definitions(vsgpoints_example PRIVATE vsgXchange_FOUND) - target_link_libraries(vsgpoints_example vsgXchange::vsgXchange) -endif() - -install(TARGETS vsgpoints_example RUNTIME DESTINATION bin)