diff --git a/docs/Doxygen/groups.dxy b/docs/Doxygen/groups.dxy index 8cd0fb86..6a4e3527 100644 --- a/docs/Doxygen/groups.dxy +++ b/docs/Doxygen/groups.dxy @@ -1,10 +1,10 @@ -/** \defgroup space Space +/** \defgroup space Space This module contains all the basic types for representing spatial entities like points (vcg::Point3) box3, line planes etc. */ -/** \defgroup vertex Vertex of triangular,tetrahedral meshes -This module contains the documentation for the type and the functions used for representing and managing vertexes of meshes +/** \defgroup vertex Vertex of triangular, tetrahedral meshes This module contains the documentation for the type and the functions used for representing and managing vertexes of meshes. */ /** \defgroup face Faces */ -/** \defgroup trimesh Triangular Meshes +/** \defgroup trimesh Triangular Meshes This module contains the documentation for the type and the functions used for representing and managing generic \b triangular \b meshes. +*/ /** \defgroup tetramesh Tetrahedral Meshes This module contains the documentation for the type and the functions used for representing and managing generic tetrahedral of meshes. */ \ No newline at end of file diff --git a/docs/Doxygen/namespaces.dxy b/docs/Doxygen/namespaces.dxy index b6d1fcfa..fdc8b69e 100644 --- a/docs/Doxygen/namespaces.dxy +++ b/docs/Doxygen/namespaces.dxy @@ -1 +1 @@ - /** Main namespace. It contain all the other namespaces and */ namespace vcg {} /** Everything about meshes lie in this namespace */ namespace vcg::tri {} /** Global algorithms and classes working on generic faces are defined in this namespace. Typical example are the topological surgery functions (like vcg::face::Detach and vcg::face::IsBorder) and the class vcg::face::Pos for defining \e positions over a mesh. Note that for sake of brevity the main face class is defined outside this namespace. */ namespace vcg::face {} /** Wrapper for symbols and structs defind in the old ply library */ namespace vcg::ply {} /** For all the functions and classes used to read and write meshes */ namespace vcg::tri::io {} /** For all the generic math functions and classes. */ namespace vcg::math {} \ No newline at end of file + /** Main namespace. It contain all the other namespaces and */ namespace vcg {} /** Everything about triangular meshes lie in this namespace */ namespace vcg::tri {} /** Everything about tetrahedral meshes lie in this namespace */ namespace vcg::tetra {} /** Global algorithms and classes working on generic faces are defined in this namespace. Typical example are the topological surgery functions (like vcg::face::Detach and vcg::face::IsBorder) and the class vcg::face::Pos for defining \e positions over a mesh. Note that for sake of brevity the main face class is defined outside this namespace. */ namespace vcg::face {} /** Wrapper for symbols and structs defind in the old ply library */ namespace vcg::ply {} /** For all the functions and classes used to read and write meshes */ namespace vcg::tri::io {} /** For all the functions and classes used to read and write Tetrahedral Meshes */ namespace vcg::tetra::io {} /** For all the generic math functions and classes. */ namespace vcg::math {} \ No newline at end of file diff --git a/vcg/complex/tetramesh/base.h b/vcg/complex/tetramesh/base.h index 982dc529..c542b309 100644 --- a/vcg/complex/tetramesh/base.h +++ b/vcg/complex/tetramesh/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.8 2004/07/09 10:18:49 ganovelli +added access functions to vn and tn + Revision 1.7 2004/06/25 11:27:21 pietroni added function to access temporary mark for decimation @@ -63,7 +66,7 @@ Revision 1.1 2004/04/15 08:54:20 pietroni namespace vcg { namespace tetra { - /** \addtogroup trimesh */ + /** \addtogroup tetramesh */ /*@{*/ /** Class TetraMesh. diff --git a/vcg/complex/trimesh/update/color.h b/vcg/complex/trimesh/update/color.h index 72826a7e..1a82803c 100644 --- a/vcg/complex/trimesh/update/color.h +++ b/vcg/complex/trimesh/update/color.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.4 2004/06/24 07:56:54 cignoni +now use std::numeric_limits instead of old max val() + Revision 1.3 2004/03/12 15:22:19 cignoni Written some documentation and added to the trimes doxygen module @@ -57,6 +60,9 @@ typedef typename MeshType::FaceType FaceType; typedef typename MeshType::FacePointer FacePointer; typedef typename MeshType::FaceIterator FaceIterator; +/** Color the vertex of the mesh that are on the border +It uses the information in the flags, and not any topology. So it just require that you have correctly computed (or loaded) the flags; See the +**/ static void VertexBorderFlag(MeshType &m, Color4b vb=Color4b::Blue) { MeshType::VertexIterator vi; @@ -144,6 +150,20 @@ static int VertexSelected(MeshType &m, Color4b vs=Color4b::LightBlue) return cnt; } +static void VertexConstant(MeshType &m, Color4b c=Color4b::White) +{ + MeshType::VertexIterator vi; + for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD()) + (*vi).C()=c; +} + +static void FaceConstant(MeshType &m, Color4b c=Color4b::White) +{ + MeshType::FaceIterator fi; + for(fi=m.face.begin();fi!=m.face.end();++fi) + (*fi).C()=c; +} + static void VertexBorderManifoldFlag(MeshType &m, Color4b vn=Color4b::White, Color4b vb=Color4b::Blue, Color4b vc=Color4b::Red) { MeshType::VertexIterator vi; diff --git a/vcg/complex/trimesh/update/flag.h b/vcg/complex/trimesh/update/flag.h index db8a20ee..e1cff63f 100644 --- a/vcg/complex/trimesh/update/flag.h +++ b/vcg/complex/trimesh/update/flag.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.5 2004/07/06 06:27:02 cignoni +Added FaceBorderFromVF + Revision 1.4 2004/05/13 15:58:55 ganovelli function Clear added @@ -64,6 +67,8 @@ typedef typename MeshType::FaceType FaceType; typedef typename MeshType::FacePointer FacePointer; typedef typename MeshType::FaceIterator FaceIterator; +/** Reset all the mesh flags (both vertexes and faces) setting everithing to zero (the default value for flags) +**/ static void Clear(MeshType &m) { FaceIterator fi; @@ -74,6 +79,9 @@ static void Clear(MeshType &m) (*vi).Flags() = 0; } +/** Compute the border flags for the faces using the Face-Face Topology. +Obviously it assumes that the topology has been correctly computed (see: UpdateTopology::FaceFace ) +**/ static void FaceBorderFromFF(MeshType &m) { const int BORDERFLAG[3]={FaceType::BORDER0,FaceType::BORDER1,FaceType::BORDER2}; diff --git a/vcg/complex/trimesh/update/quality.h b/vcg/complex/trimesh/update/quality.h index ff5e4981..b520eeb3 100644 --- a/vcg/complex/trimesh/update/quality.h +++ b/vcg/complex/trimesh/update/quality.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.4 2004/07/06 06:29:53 cignoni +removed assumption of a using namespace std and added a missing include + Revision 1.3 2004/06/24 15:15:12 cignoni Better Doxygen documentation @@ -47,7 +50,13 @@ namespace vcg { namespace tri { /** \addtogroup trimesh */ /*@{*/ -/// Generation of per-vertex and per-face Qualities according to various strategy, like geodesic distance from the border (UpdateQuality::VertexGeodesicFromBorder) or curvature ecc. +/** Generation of per-vertex and per-face Qualities according to various strategy, like geodesic distance from the border (UpdateQuality::VertexGeodesicFromBorder) or curvature ecc. +This class is templated over the mesh and (like all other Update* classes) has only static members; Typical usage: +\code +MyMeshType m; +UpdateQuality::VertexGeodesicFromBorder(m); +\endcode +**/ template class UpdateQuality @@ -93,7 +102,7 @@ public: // heap solo se migliorano la distanza di un epsilon == 1/100000 della mesh diag. /** Compute, for each vertex of the mesh the geodesic distance from the border of the mesh itself; -Requirements: VF topology, Per Vertex Quality and border flags already computed (see UpdateFlags::FaceBorderFromVF ); +Requirements: VF topology, Per Vertex Quality and border flags already computed (see UpdateFlags::FaceBorderFromVF and UpdateTopology::VertexFace); it uses the classical dijkstra Shortest Path Tree algorithm. The geodesic distance is approximated by allowing to walk only along edges of the mesh. */ @@ -163,6 +172,25 @@ static void VertexGeodesicFromBorder(MeshType &m) // R1 v->Q() = 0; } + +/** Assign to each vertex of the mesh a constant quality value. Useful for initialization. +*/ +static void VertexConstant(MeshType &m, float q) +{ + MeshType::VertexIterator vi; + for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD()) + (*vi).Q()=q; +} + +/** Assign to each face of the mesh a constant quality value. Useful for initialization. +*/ +static void FaceConstant(MeshType &m, float q) +{ + MeshType::FaceIterator fi; + for(fi=m.face.begin();fi!=m.face.end();++fi) + (*fi).Q()=q; +} + }; //end class } // end namespace } // end namespace diff --git a/vcg/complex/trimesh/update/topology.h b/vcg/complex/trimesh/update/topology.h index f5c476b7..f5c94ae9 100644 --- a/vcg/complex/trimesh/update/topology.h +++ b/vcg/complex/trimesh/update/topology.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.8 2004/06/02 16:42:44 ganovelli +typename for gcc compilation + Revision 1.7 2004/06/02 16:28:22 ganovelli minor changes (swap =>> math::Swap) @@ -54,6 +57,8 @@ namespace vcg { namespace tri { /** \addtogroup trimesh */ /*@{*/ +/** Generation of per-vertex and per-face topological information. +**/ template class UpdateTopology @@ -137,7 +142,8 @@ inline bool operator != ( const PEdge & pe ) const }; - +/** Update the Face-Face topological relation by allowing to retrieve for each face what other faces shares their edges. +*/ static void FaceFace(MeshType &m) { if(!m.HasFFTopology()) return; @@ -189,6 +195,8 @@ static void FaceFace(MeshType &m) } } +/** Update the Vertex-Face topological relation by allowing to retrieve for each vertex the list of faces sharing this vertex.. +*/ static void VertexFace(MeshType &m) { if(!m.HasVFTopology()) return;