Skip to content

Commit

Permalink
Renamed attribute load and save through ply example
Browse files Browse the repository at this point in the history
  • Loading branch information
cignoni committed Aug 29, 2024
1 parent 5405d43 commit 0c95391
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/sample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(VCG_EXAMPLE_PROJECTS
trimesh_align_pair
trimesh_allocate
trimesh_attribute
trimesh_attribute_saving
trimesh_attribute_ply
trimesh_ball_pivoting
trimesh_base
trimesh_closest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
cmake_minimum_required(VERSION 3.13)
project(trimesh_attribute_saving)
project(trimesh_attribute_ply)

if (VCG_HEADER_ONLY)
set(SOURCES
trimesh_attribute_saving.cpp
trimesh_attribute_ply.cpp
${VCG_INCLUDE_DIRS}/wrap/ply/plylib.cpp)
endif()

add_executable(trimesh_attribute_saving
add_executable(trimesh_attribute_ply
${SOURCES})

target_link_libraries(
trimesh_attribute_saving
trimesh_attribute_ply
PUBLIC
vcglib
)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/*! \file trimesh_attribute.cpp
\ingroup code_sample
\brief the minimal example of using the attributes
\brief the minimal example of saving and loading attributes into PLY
Attributes are a simple mechanism to associate user-defined 'attributes' to the simplicies and to the mesh.
See the page '\ref attributes' for more details.
Expand Down Expand Up @@ -104,6 +104,7 @@ int main()
vcg::tri::io::PlyInfo piOpen;
piOpen.AddPerFaceFloatAttribute("MyFaceArea", "FaceArea");
piOpen.AddPerVertexFloatAttribute("GaussianCurvature");
piOpen.AddPerVertexPoint3fAttribute(mi,"InvertedNormal");


int ret = vcg::tri::io::ImporterPLY<MyMesh>::Open(mi,"MeshWithCurvature.ply",piOpen);
Expand Down

0 comments on commit 0c95391

Please sign in to comment.