Removed all the UberXXX members from the various components. No more needed since many years. Still there just because we are quite lazy...
This commit is contained in:
parent
b045c9b992
commit
cfda5a3eca
|
@ -103,9 +103,6 @@ public:
|
||||||
USER0 = 0x0200 // First user bit
|
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 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 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
|
bool IsW() const {return (this->Flags() & NOTWRITE)== 0;}/// checks if the vertex is modifiable
|
||||||
|
|
|
@ -85,9 +85,6 @@ public:
|
||||||
inline const typename T::CoordType & cP0( const int j ) const { return cV(j)->P();}
|
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 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 <class LeftF>
|
template <class LeftF>
|
||||||
void ImportData(const LeftF & leftF){ T::ImportData(leftF);}
|
void ImportData(const LeftF & leftF){ T::ImportData(leftF);}
|
||||||
|
|
||||||
|
|
|
@ -92,14 +92,6 @@ public:
|
||||||
typedef typename FaceArityMax::ScalarType ScalarType;
|
typedef typename FaceArityMax::ScalarType ScalarType;
|
||||||
// ----- Flags stuff -----
|
// ----- Flags stuff -----
|
||||||
|
|
||||||
inline int & UberFlags ()
|
|
||||||
{
|
|
||||||
return this->Flags();
|
|
||||||
}
|
|
||||||
inline int UberFlags() const
|
|
||||||
{
|
|
||||||
return this->Flags();
|
|
||||||
}
|
|
||||||
enum {
|
enum {
|
||||||
|
|
||||||
DELETED = 0x00000001, // Face is deleted from the mesh
|
DELETED = 0x00000001, // Face is deleted from the mesh
|
||||||
|
|
|
@ -26,12 +26,9 @@
|
||||||
|
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
namespace face {
|
||||||
namespace face {
|
/** \addtogroup face
|
||||||
/*
|
@{
|
||||||
Some naming Rules
|
|
||||||
All the Components that can be added to a vertex should be defined in the namespace vert:
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
/*------------------------- EMPTY CORE COMPONENTS -----------------------------------------*/
|
/*------------------------- EMPTY CORE COMPONENTS -----------------------------------------*/
|
||||||
|
|
||||||
|
@ -156,6 +153,11 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/*-------------------------- VertexRef ----------------------------------------*/
|
/*-------------------------- VertexRef ----------------------------------------*/
|
||||||
|
/*! \brief The references to the vertexes of a triangular face
|
||||||
|
|
||||||
|
Stored as three pointers to the VertexType
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
template <class T> class VertexRef: public T {
|
template <class T> class VertexRef: public T {
|
||||||
public:
|
public:
|
||||||
|
@ -168,21 +170,17 @@ public:
|
||||||
typedef typename T::VertexType::CoordType CoordType;
|
typedef typename T::VertexType::CoordType CoordType;
|
||||||
typedef typename T::VertexType::ScalarType ScalarType;
|
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 * 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]; }
|
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(); } /// \brief Shortcut: the position of the i-th vertex (equivalent to \c V(i)->P() )
|
||||||
inline CoordType & P( const int j ) { assert(j>=0 && j<3); return v[j]->P(); }
|
|
||||||
inline const CoordType & P( const int j ) const { assert(j>=0 && j<3); return v[j]->cP(); }
|
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(); }
|
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.
|
inline typename T::VertexType * & V0( const int j ) { return V(j);} /** \brief Return the pointer to the j-th vertex of the face. */
|
||||||
@param j Index of the face vertex.
|
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 ) { 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 ) const { return V(j);}
|
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 * V1( const int j ) const { return V((j+1)%3);}
|
||||||
inline typename T::VertexType * V2( const int j ) const { return V((j+2)%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 * cV1( const int j ) const { return cV((j+1)%3);}
|
||||||
inline typename T::VertexType * cV2( const int j ) const { return cV((j+2)%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 & P0( const int j ) { return V(j)->P();}
|
||||||
inline CoordType & P1( const int j ) { return V((j+1)%3)->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();}
|
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 & 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 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.
|
// 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.
|
// 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.
|
// if you are using ImportData for copying internally simplex you have to set up all the pointers by hand.
|
||||||
|
|
|
@ -19,17 +19,6 @@
|
||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||||
* for more details. *
|
* 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
|
#ifndef __VCG_FACE_PLUS_COMPONENT_RT
|
||||||
|
@ -46,6 +35,15 @@ struct EdgePlaneInfo{
|
||||||
::vcg::Plane3<typename CoordType::ScalarType> plane;
|
::vcg::Plane3<typename CoordType::ScalarType> plane;
|
||||||
typename CoordType::ScalarType edgescale;
|
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 T> class EdgePlane: public T {
|
template <class T> class EdgePlane: public T {
|
||||||
public:
|
public:
|
||||||
|
@ -92,6 +90,9 @@ static bool HasEdgePlane() { return false; }
|
||||||
|
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string(""));T::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string(""));T::Name(name);}
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
@}
|
||||||
|
*/
|
||||||
|
|
||||||
} // end namespace face
|
} // end namespace face
|
||||||
}// end namespace vcg
|
}// end namespace vcg
|
||||||
|
|
|
@ -19,30 +19,6 @@
|
||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||||
* for more details. *
|
* 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 <EFBFBD> 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 & 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 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; }
|
static bool HasVertexRef() { return true; }
|
||||||
};
|
};
|
||||||
} // end namespace face
|
} // end namespace face
|
||||||
|
|
|
@ -155,14 +155,6 @@ template <class BVT, class BET, typename BFT,class BTT,
|
||||||
// ----- Flags stuff -----
|
// ----- Flags stuff -----
|
||||||
public:
|
public:
|
||||||
|
|
||||||
inline int & UberFlags ()
|
|
||||||
{
|
|
||||||
return this->Flags();
|
|
||||||
}
|
|
||||||
inline const int UberFlags() const
|
|
||||||
{
|
|
||||||
return this->Flags();
|
|
||||||
}
|
|
||||||
enum {
|
enum {
|
||||||
|
|
||||||
DELETED = 0x00000001, // Face is deleted from the mesh
|
DELETED = 0x00000001, // Face is deleted from the mesh
|
||||||
|
|
|
@ -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 & 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 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 bool HasVertexRef() { return true; }
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("VertexRef"));T::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("VertexRef"));T::Name(name);}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue