function for edge adjacency added
This commit is contained in:
parent
b4d5b219eb
commit
0a09df39f8
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.10 2004/05/10 13:13:17 cignoni
|
||||||
|
added void to Convert, corrected return object in VFb
|
||||||
|
|
||||||
Revision 1.9 2004/05/06 15:28:10 pietroni
|
Revision 1.9 2004/05/06 15:28:10 pietroni
|
||||||
changed names to VF topology function (was missed)
|
changed names to VF topology function (was missed)
|
||||||
|
|
||||||
|
|
@ -66,6 +69,7 @@ Edited Comments and GPL license
|
||||||
#include<vcg/space/tcoord2.h>
|
#include<vcg/space/tcoord2.h>
|
||||||
|
|
||||||
class DUMMYFACETYPE;
|
class DUMMYFACETYPE;
|
||||||
|
class DUMMYEDGETYPE;
|
||||||
class DUMMYTETRATYPE;
|
class DUMMYTETRATYPE;
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
|
||||||
|
|
@ -77,7 +81,7 @@ namespace vcg {
|
||||||
@param FLTYPE (Template Parameter) Specifies the scalar field of the vertex coordinate type.
|
@param FLTYPE (Template Parameter) Specifies the scalar field of the vertex coordinate type.
|
||||||
@param VFTYPE (Template Parameter) Specifies the type for the face, needed only for VF adjacency.
|
@param VFTYPE (Template Parameter) Specifies the type for the face, needed only for VF adjacency.
|
||||||
*/
|
*/
|
||||||
template <class FLTYPE, class VFTYPE = DUMMYFACETYPE, class VTTYPE = DUMMYTETRATYPE,class TCTYPE = TCoord2<float,1> > class VERTEX_TYPE
|
template <class FLTYPE, class VETYPE = DUMMYEDGETYPE, class VFTYPE = DUMMYFACETYPE, class VTTYPE = DUMMYTETRATYPE,class TCTYPE = TCoord2<float,1> > class VERTEX_TYPE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -88,6 +92,8 @@ public:
|
||||||
typedef Point3<ScalarType> NormalType;
|
typedef Point3<ScalarType> NormalType;
|
||||||
/// The type base of the vertex, useful for recovering the original typename after user subclassing
|
/// The type base of the vertex, useful for recovering the original typename after user subclassing
|
||||||
typedef VERTEX_TYPE BaseVertexType;
|
typedef VERTEX_TYPE BaseVertexType;
|
||||||
|
/// The type of the face pointed by the vertex if vertex edge topology is present
|
||||||
|
typedef VETYPE EdgeType;
|
||||||
/// The type base of the vertex, useful for recovering the original typename after user subclassing
|
/// The type base of the vertex, useful for recovering the original typename after user subclassing
|
||||||
typedef VFTYPE FaceType;
|
typedef VFTYPE FaceType;
|
||||||
|
|
||||||
|
|
@ -352,7 +358,61 @@ public:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
/** @name Vertex-Edge Adjacency
|
||||||
|
blah
|
||||||
|
blah
|
||||||
|
**/
|
||||||
|
//@{
|
||||||
|
|
||||||
|
#if ((defined __VCGLIB_VERTEX_EA) || (defined __VCGLIB_VERTEX_EAS))
|
||||||
|
// Puntatore ad un edge appartenente alla stella del vertice, implementa l'adiacenza vertice-edge
|
||||||
|
protected:
|
||||||
|
EdgeType *_ep;
|
||||||
|
int _ei;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public:
|
||||||
|
inline EdgeType * & Ep()
|
||||||
|
{
|
||||||
|
#if ((defined __VCGLIB_VERTEX_EA) || (defined __VCGLIB_VERTEX_EAS))
|
||||||
|
return _ep;
|
||||||
|
#else
|
||||||
|
assert(0);// you are probably trying to use VF topology in a vertex without it
|
||||||
|
return *((EdgeType **)(_flags));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const EdgeType * & Ep() const
|
||||||
|
{
|
||||||
|
#if ((defined __VCGLIB_VERTEX_EA) || (defined __VCGLIB_VERTEX_EAS))
|
||||||
|
return _ep;
|
||||||
|
#else
|
||||||
|
assert(0);// you are probably trying to use VF topology in a vertex without it
|
||||||
|
return (EdgeType *)this;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int & Ei()
|
||||||
|
{
|
||||||
|
#if ((defined __VCGLIB_VERTEX_EA) || (defined __VCGLIB_VERTEX_EAS))
|
||||||
|
|
||||||
|
return _ei;
|
||||||
|
#else
|
||||||
|
assert(0);// you are probably trying to use VF topology in a vertex without it
|
||||||
|
return _flags;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const int & Ei() const
|
||||||
|
{
|
||||||
|
#if ((defined __VCGLIB_VERTEX_EA) || (defined __VCGLIB_VERTEX_EAS))
|
||||||
|
return _ei;
|
||||||
|
#else
|
||||||
|
assert(0);// you are probably trying to use VF topology in a vertex without it
|
||||||
|
return (void *)this;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
//@}
|
||||||
/***********************************************/
|
/***********************************************/
|
||||||
/** @name Vertex-Face Adjacency
|
/** @name Vertex-Face Adjacency
|
||||||
blah
|
blah
|
||||||
|
|
@ -644,6 +704,14 @@ static bool HasVTAdjacency() {
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool HasVEAdjacency() {
|
||||||
|
#ifdef __VCGLIB_VERTEX_EA
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue