From cfda5a3ecaff01a485e756c694286691bc4fceb5 Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 25 Oct 2012 13:07:25 +0000 Subject: [PATCH] Removed all the UberXXX members from the various components. No more needed since many years. Still there just because we are quite lazy... --- vcg/simplex/edge/base.h | 3 --- vcg/simplex/edge/component.h | 3 --- vcg/simplex/face/base.h | 8 -------- vcg/simplex/face/component.h | 32 ++++++++++++----------------- vcg/simplex/face/component_ep.h | 23 +++++++++++---------- vcg/simplex/face/component_occ.h | 26 ----------------------- vcg/simplex/tetrahedron/base.h | 8 -------- vcg/simplex/tetrahedron/component.h | 2 -- 8 files changed, 25 insertions(+), 80 deletions(-) diff --git a/vcg/simplex/edge/base.h b/vcg/simplex/edge/base.h index 38c984e7..bfd0e935 100644 --- a/vcg/simplex/edge/base.h +++ b/vcg/simplex/edge/base.h @@ -103,9 +103,6 @@ public: USER0 = 0x0200 // First user bit }; - inline int & UberFlags () { return this->Flags(); } - inline int UberFlags() const { return this->Flags(); } - bool IsD() const {return (this->Flags() & DELETED) != 0;} /// checks if the vertex is deleted bool IsR() const {return (this->Flags() & NOTREAD) == 0;} /// checks if the vertex is readable bool IsW() const {return (this->Flags() & NOTWRITE)== 0;}/// checks if the vertex is modifiable diff --git a/vcg/simplex/edge/component.h b/vcg/simplex/edge/component.h index 7f4a708f..c1631d6d 100644 --- a/vcg/simplex/edge/component.h +++ b/vcg/simplex/edge/component.h @@ -85,9 +85,6 @@ public: inline const typename T::CoordType & cP0( const int j ) const { return cV(j)->P();} inline const typename T::CoordType & cP1( const int j ) const { return cV((j+1)%2)->P();} - inline typename T::VertexType * & UberV( const int j ) { assert(j>=0 && j<2); return v[j]; } - inline const typename T::VertexType * const & UberV( const int j ) const { assert(j>=0 && j<2); return v[j]; } - template void ImportData(const LeftF & leftF){ T::ImportData(leftF);} diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index ed9627f1..dc3df179 100644 --- a/vcg/simplex/face/base.h +++ b/vcg/simplex/face/base.h @@ -92,14 +92,6 @@ public: typedef typename FaceArityMax::ScalarType ScalarType; // ----- Flags stuff ----- - inline int & UberFlags () - { - return this->Flags(); - } - inline int UberFlags() const - { - return this->Flags(); - } enum { DELETED = 0x00000001, // Face is deleted from the mesh diff --git a/vcg/simplex/face/component.h b/vcg/simplex/face/component.h index 5dd76455..7cb7d458 100644 --- a/vcg/simplex/face/component.h +++ b/vcg/simplex/face/component.h @@ -26,12 +26,9 @@ namespace vcg { - - namespace face { -/* -Some naming Rules -All the Components that can be added to a vertex should be defined in the namespace vert: - +namespace face { +/** \addtogroup face + @{ */ /*------------------------- EMPTY CORE COMPONENTS -----------------------------------------*/ @@ -156,6 +153,11 @@ public: }; /*-------------------------- VertexRef ----------------------------------------*/ +/*! \brief The references to the vertexes of a triangular face + + Stored as three pointers to the VertexType + */ + template class VertexRef: public T { public: @@ -168,21 +170,17 @@ public: typedef typename T::VertexType::CoordType CoordType; typedef typename T::VertexType::ScalarType ScalarType; - inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<3); return v[j]; } + inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<3); return v[j]; } /// \brief The pointer to the i-th vertex inline typename T::VertexType * const & V( const int j ) const { assert(j>=0 && j<3); return v[j]; } inline typename T::VertexType * cV( const int j ) const { assert(j>=0 && j<3); return v[j]; } - // Shortcut per accedere ai punti delle facce - inline CoordType & P( const int j ) { assert(j>=0 && j<3); return v[j]->P(); } + inline CoordType & P( const int j ) { assert(j>=0 && j<3); return v[j]->P(); } /// \brief Shortcut: the position of the i-th vertex (equivalent to \c V(i)->P() ) inline const CoordType & P( const int j ) const { assert(j>=0 && j<3); return v[j]->cP(); } inline const CoordType &cP( const int j ) const { assert(j>=0 && j<3); return v[j]->cP(); } - /** Return the pointer to the ((j+1)%3)-th vertex of the face. - @param j Index of the face vertex. - */ - inline typename T::VertexType * & V0( const int j ) { return V(j);} - inline typename T::VertexType * & V1( const int j ) { return V((j+1)%3);} - inline typename T::VertexType * & V2( const int j ) { return V((j+2)%3);} + inline typename T::VertexType * & V0( const int j ) { return V(j);} /** \brief Return the pointer to the j-th vertex of the face. */ + inline typename T::VertexType * & V1( const int j ) { return V((j+1)%3);} /** \brief Return the pointer to the ((j+1)%3)-th vertex of the face. */ + inline typename T::VertexType * & V2( const int j ) { return V((j+2)%3);} /** \brief Return the pointer to the ((j+2)%3)-th vertex of the face. */ inline typename T::VertexType * V0( const int j ) const { return V(j);} inline typename T::VertexType * V1( const int j ) const { return V((j+1)%3);} inline typename T::VertexType * V2( const int j ) const { return V((j+2)%3);} @@ -190,7 +188,6 @@ public: inline typename T::VertexType * cV1( const int j ) const { return cV((j+1)%3);} inline typename T::VertexType * cV2( const int j ) const { return cV((j+2)%3);} - /// Shortcut per accedere ai punti delle facce inline CoordType & P0( const int j ) { return V(j)->P();} inline CoordType & P1( const int j ) { return V((j+1)%3)->P();} inline CoordType & P2( const int j ) { return V((j+2)%3)->P();} @@ -201,9 +198,6 @@ public: inline const CoordType & cP1( const int j ) const { return cV((j+1)%3)->P();} inline const CoordType & cP2( const int j ) const { return cV((j+2)%3)->P();} - inline typename T::VertexType * & UberV( const int j ) { assert(j>=0 && j<3); return v[j]; } - inline const typename T::VertexType * const & UberV( const int j ) const { assert(j>=0 && j<3); return v[j]; } - // Small comment about the fact that the pointers are zero filled. // The importLocal is meant for copyng stuff between very different meshes, so copying the pointers would be meaningless. // if you are using ImportData for copying internally simplex you have to set up all the pointers by hand. diff --git a/vcg/simplex/face/component_ep.h b/vcg/simplex/face/component_ep.h index 02e2cf40..88470c03 100644 --- a/vcg/simplex/face/component_ep.h +++ b/vcg/simplex/face/component_ep.h @@ -19,17 +19,6 @@ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * for more details. * * * -****************************************************************************/ -/**************************************************************************** - History - -$Log: not supported by cvs2svn $ -Revision 1.2 2007/05/04 16:16:40 ganovelli -standardized to component style - -Revision 1.1 2006/10/13 14:11:49 cignoni -first version - ****************************************************************************/ #ifndef __VCG_FACE_PLUS_COMPONENT_RT @@ -46,6 +35,15 @@ struct EdgePlaneInfo{ ::vcg::Plane3 plane; typename CoordType::ScalarType edgescale; }; +/** \addtogroup face + @{ +*/ + +/*! \brief Per Face Precomputed Edge/Plane + + This component is used to speed up some geometric queries like the ray-triangle intersection or the Point-Triangle distance. + Before using it you have to initialize it using \ref UpdateComponentEP class + */ template class EdgePlane: public T { public: @@ -92,6 +90,9 @@ static bool HasEdgePlane() { return false; } static void Name(std::vector & name){name.push_back(std::string(""));T::Name(name);} }; +/** + @} +*/ } // end namespace face }// end namespace vcg diff --git a/vcg/simplex/face/component_occ.h b/vcg/simplex/face/component_occ.h index 4d180772..f4e3a790 100644 --- a/vcg/simplex/face/component_occ.h +++ b/vcg/simplex/face/component_occ.h @@ -19,30 +19,6 @@ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * for more details. * * * -****************************************************************************/ -/**************************************************************************** - History - -$Log: not supported by cvs2svn $ -Revision 1.6 2007/03/12 15:37:19 tarini -Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD. - -Revision 1.5 2007/01/18 01:29:48 cignoni -commented UberP access method (syntax errors) - -Revision 1.4 2006/12/04 10:59:15 ganovelli -aggiunte funzioni di override per Has* - -Revision 1.3 2006/06/08 20:32:10 ganovelli -aggiunte wedge coord - -Revision 1.2 2005/10/18 14:27:22 ganovelli -EdgePLaneType added (_RT) - -Revision 1.1 2005/10/15 16:23:39 ganovelli -Working release (compilata solo su MSVC), component_occ � migrato da component_opt - - ****************************************************************************/ /* @@ -245,8 +221,6 @@ public: inline const CoordType & cP1( const int j ) const { return cV((j+1)%3)->P();} inline const CoordType & cP2( const int j ) const { return cV((j+2)%3)->P();} - //inline typename T::VertexType * & UberV( const int j ) { assert(j>=0 && j<3); return v[j]; } - //inline const typename T::VertexType * const & UberV( const int j ) const { assert(j>=0 && j<3); return v[j]; } static bool HasVertexRef() { return true; } }; } // end namespace face diff --git a/vcg/simplex/tetrahedron/base.h b/vcg/simplex/tetrahedron/base.h index 3c236366..e597b668 100644 --- a/vcg/simplex/tetrahedron/base.h +++ b/vcg/simplex/tetrahedron/base.h @@ -155,14 +155,6 @@ template Flags(); - } - inline const int UberFlags() const - { - return this->Flags(); - } enum { DELETED = 0x00000001, // Face is deleted from the mesh diff --git a/vcg/simplex/tetrahedron/component.h b/vcg/simplex/tetrahedron/component.h index 7182ac43..ed0e3231 100644 --- a/vcg/simplex/tetrahedron/component.h +++ b/vcg/simplex/tetrahedron/component.h @@ -100,8 +100,6 @@ public: inline const typename T::CoordType & cP1( const int j ) const { return cV((j+1)%4)->P();} inline const typename T::CoordType & cP2( const int j ) const { return cV((j+2)%4)->P();} - inline typename T::VertexType * & UberV( const int j ) { assert(j>=0 && j<4); return v[j]; } - inline const typename T::VertexType * const & UberV( const int j ) const { assert(j>=0 && j<4); return v[j]; } static bool HasVertexRef() { return true; } static void Name(std::vector & name){name.push_back(std::string("VertexRef"));T::Name(name);}