diff --git a/apps/sample/CMakeLists.txt b/apps/sample/CMakeLists.txt index 939b7992d..fab58ebea 100644 --- a/apps/sample/CMakeLists.txt +++ b/apps/sample/CMakeLists.txt @@ -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 diff --git a/apps/sample/trimesh_attribute_saving/CMakeLists.txt b/apps/sample/trimesh_attribute_ply/CMakeLists.txt similarity index 58% rename from apps/sample/trimesh_attribute_saving/CMakeLists.txt rename to apps/sample/trimesh_attribute_ply/CMakeLists.txt index 56572ba8f..180267616 100644 --- a/apps/sample/trimesh_attribute_saving/CMakeLists.txt +++ b/apps/sample/trimesh_attribute_ply/CMakeLists.txt @@ -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 ) diff --git a/apps/sample/trimesh_attribute_saving/trimesh_attribute_saving.cpp b/apps/sample/trimesh_attribute_ply/trimesh_attribute_ply.cpp similarity index 97% rename from apps/sample/trimesh_attribute_saving/trimesh_attribute_saving.cpp rename to apps/sample/trimesh_attribute_ply/trimesh_attribute_ply.cpp index f0a46cb5e..8b65e1aca 100644 --- a/apps/sample/trimesh_attribute_saving/trimesh_attribute_saving.cpp +++ b/apps/sample/trimesh_attribute_ply/trimesh_attribute_ply.cpp @@ -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. @@ -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::Open(mi,"MeshWithCurvature.ply",piOpen); diff --git a/apps/sample/trimesh_attribute_saving/trimesh_attribute_saving.pro b/apps/sample/trimesh_attribute_ply/trimesh_attribute_ply.pro similarity index 100% rename from apps/sample/trimesh_attribute_saving/trimesh_attribute_saving.pro rename to apps/sample/trimesh_attribute_ply/trimesh_attribute_ply.pro