From 23a24290a28ca0096c77544ff59d2df841d3b568 Mon Sep 17 00:00:00 2001 From: Luigi Malomo Date: Wed, 3 Nov 2021 14:19:44 +0100 Subject: [PATCH] commented out per vertex curvature property (todo: decide how to handle complete removal) --- wrap/nanoply/include/nanoply.hpp | 12 ++--- wrap/nanoply/include/nanoplyWrapper.hpp | 60 ++++++++++++------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/wrap/nanoply/include/nanoply.hpp b/wrap/nanoply/include/nanoply.hpp index 5a213560..e4110928 100644 --- a/wrap/nanoply/include/nanoply.hpp +++ b/wrap/nanoply/include/nanoply.hpp @@ -104,8 +104,8 @@ namespace nanoply NNP_BITFLAG = 0x00040000, /**< Bit flags. */ NNP_K1 = 0x00080000, /**< Main curvaure value k1. */ NNP_K2 = 0x00100000, /**< Main curvaure value k2. */ - NNP_KG = 0x00200000, /**< Gaussian curvature value. */ - NNP_KH = 0x00400000, /**< Mean curvature value. */ +// NNP_KG = 0x00200000, /**< Gaussian curvature value. */ +// NNP_KH = 0x00400000, /**< Mean curvature value. */ NNP_K1DIR = 0x00800000, /**< Curvature direction k1. */ NNP_K2DIR = 0x01000000, /**< Curvature direction k2. */ NNP_EDGE_V1 = 0x02000000, /**< Index of the first vertex of the edge. */ @@ -242,8 +242,8 @@ namespace nanoply { PlyEntity::NNP_BITFLAG, NameVector({ "flags" }) }, { PlyEntity::NNP_K1, NameVector({ "k1" }) }, { PlyEntity::NNP_K2, NameVector({ "k2" }) }, - { PlyEntity::NNP_KG, NameVector({ "k" }) }, - { PlyEntity::NNP_KH, NameVector({ "h" }) }, +// { PlyEntity::NNP_KG, NameVector({ "k" }) }, +// { PlyEntity::NNP_KH, NameVector({ "h" }) }, { PlyEntity::NNP_K1DIR, NameVector({ "k1dir" }) }, { PlyEntity::NNP_K2DIR, NameVector({ "k2dir" }) }, { PlyEntity::NNP_EDGE_V1, NameVector({ "vertex1", "v1" }) }, @@ -738,8 +738,8 @@ namespace nanoply case NNP_BITFLAG: return "NNP_BITFLAG "; case NNP_K1: return "NNP_K1 "; case NNP_K2: return "NNP_K2 "; - case NNP_KG: return "NNP_K "; - case NNP_KH: return "NNP_H "; +// case NNP_KG: return "NNP_K "; +// case NNP_KH: return "NNP_H "; case NNP_K1DIR: return "NNP_K1DIR "; case NNP_K2DIR: return "NNP_K2DIR "; case NNP_EDGE_V1: return "NNP_EDGE_V1 "; diff --git a/wrap/nanoply/include/nanoplyWrapper.hpp b/wrap/nanoply/include/nanoplyWrapper.hpp index abab3417..800b3427 100644 --- a/wrap/nanoply/include/nanoplyWrapper.hpp +++ b/wrap/nanoply/include/nanoplyWrapper.hpp @@ -856,8 +856,8 @@ namespace nanoply case NNP_DENSITY: mask |= BitMask::IO_VERTRADIUS; break; case NNP_TEXTURE2D: case NNP_TEXTURE3D: mask |= BitMask::IO_VERTTEXCOORD; break; - case NNP_KH: - case NNP_KG: mask |= BitMask::IO_VERTCURV; break; +// case NNP_KH: +// case NNP_KG: mask |= BitMask::IO_VERTCURV; break; case NNP_K1: case NNP_K2: case NNP_K1DIR: @@ -1012,21 +1012,21 @@ namespace nanoply else vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_TEXTURE2D, (*mesh.vert.begin()).T().P().V())); } - if ((bitMask & BitMask::IO_VERTCURV) && vcg::tri::HasPerVertexCurvature(mesh)) - { - if (ocfVertexMask & BitMask::IO_VERTCURV) - { - vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_KG, &(*mesh.vert.begin()).Kg())); - vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_KH, &(*mesh.vert.begin()).Kh())); - } - else - { - vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_KG, &(*mesh.vert.begin()).Kg())); - vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_KH, &(*mesh.vert.begin()).Kh())); - } - } - if ((bitMask & BitMask::IO_VERTCURVDIR) && vcg::tri::HasPerVertexCurvatureDir(mesh)) - { +// if ((bitMask & BitMask::IO_VERTCURV) && vcg::tri::HasPerVertexCurvature(mesh)) +// { +// if (ocfVertexMask & BitMask::IO_VERTCURV) +// { +// vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_KG, &(*mesh.vert.begin()).Kg())); +// vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_KH, &(*mesh.vert.begin()).Kh())); +// } +// else +// { +// vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_KG, &(*mesh.vert.begin()).Kg())); +// vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_KH, &(*mesh.vert.begin()).Kh())); +// } +// } + if ((bitMask & BitMask::IO_VERTCURVDIR) && vcg::tri::HasPerVertexCurvatureDir(mesh)) + { if (ocfVertexMask & BitMask::IO_VERTCURVDIR) { vertexDescr.dataDescriptor.push_back(new DataDescriptor(NNP_K1, &(*mesh.vert.begin()).K1())); @@ -1380,19 +1380,19 @@ namespace nanoply else PushDescriport(vertexProp, vertexDescr, NNP_TEXTURE2D, (*mesh.vert.begin()).T().P().V()); } - if ((bitMask & BitMask::IO_VERTCURV) && vcg::tri::HasPerVertexCurvature(mesh)) - { - if (ocfVertexMask & BitMask::IO_VERTTEXCOORD) - { - PushDescriport(vertexProp, vertexDescr, NNP_KG, &(*mesh.vert.begin()).Kg()); - PushDescriport(vertexProp, vertexDescr, NNP_KH, &(*mesh.vert.begin()).Kh()); - } - else - { - PushDescriport(vertexProp, vertexDescr, NNP_KG, &(*mesh.vert.begin()).Kg()); - PushDescriport(vertexProp, vertexDescr, NNP_KH, &(*mesh.vert.begin()).Kh()); - } - } +// if ((bitMask & BitMask::IO_VERTCURV) && vcg::tri::HasPerVertexCurvature(mesh)) +// { +// if (ocfVertexMask & BitMask::IO_VERTTEXCOORD) +// { +// PushDescriport(vertexProp, vertexDescr, NNP_KG, &(*mesh.vert.begin()).Kg()); +// PushDescriport(vertexProp, vertexDescr, NNP_KH, &(*mesh.vert.begin()).Kh()); +// } +// else +// { +// PushDescriport(vertexProp, vertexDescr, NNP_KG, &(*mesh.vert.begin()).Kg()); +// PushDescriport(vertexProp, vertexDescr, NNP_KH, &(*mesh.vert.begin()).Kh()); +// } +// } if ((bitMask & BitMask::IO_VERTCURVDIR) && vcg::tri::HasPerVertexCurvatureDir(mesh)) { if (ocfVertexMask & BitMask::IO_VERTCURVDIR)