Merge branch 'devel' of https://github.com/cnr-isti-vclab/vcglib into devel
This commit is contained in:
commit
934e017ac6
|
|
@ -313,7 +313,7 @@ static void Mesh(MeshLeft& ml, ConstMeshRight& mr, const bool selected = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
// phase 2.
|
// phase 2.
|
||||||
// copy data from ml to its corresponding elements in ml and adjacencies
|
// copy data from mr to its corresponding elements in ml and adjacencies
|
||||||
|
|
||||||
// vertex
|
// vertex
|
||||||
for(VertexIteratorRight vi=mr.vert.begin();vi!=mr.vert.end();++vi)
|
for(VertexIteratorRight vi=mr.vert.begin();vi!=mr.vert.end();++vi)
|
||||||
|
|
|
||||||
|
|
@ -613,9 +613,9 @@ face of the ring of faces incident on a edge.
|
||||||
template <class T> class FFAdj: public T {
|
template <class T> class FFAdj: public T {
|
||||||
public:
|
public:
|
||||||
FFAdj(){
|
FFAdj(){
|
||||||
_ffp[0]=0;
|
_ffp[0]=nullptr; // null == not initialized
|
||||||
_ffp[1]=0;
|
_ffp[1]=nullptr;
|
||||||
_ffp[2]=0;
|
_ffp[2]=nullptr;
|
||||||
}
|
}
|
||||||
typename T::FacePointer &FFp(const int j) { assert(j>=0 && j<3); return _ffp[j]; }
|
typename T::FacePointer &FFp(const int j) { assert(j>=0 && j<3); return _ffp[j]; }
|
||||||
typename T::FacePointer cFFp(const int j) const { assert(j>=0 && j<3); return _ffp[j]; }
|
typename T::FacePointer cFFp(const int j) const { assert(j>=0 && j<3); return _ffp[j]; }
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,7 @@ void FFDetach(FaceType & f, const int e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: deprecate the signature of the functions below and use references
|
||||||
/** This function attach the face (via the edge z1) to another face (via the edge z2). It's possible to use it also in non-two manifold situation.
|
/** This function attach the face (via the edge z1) to another face (via the edge z2). It's possible to use it also in non-two manifold situation.
|
||||||
The function cannot be applicated if the adjacencies among faces aren't define.
|
The function cannot be applicated if the adjacencies among faces aren't define.
|
||||||
@param z1 Index of the edge
|
@param z1 Index of the edge
|
||||||
|
|
@ -296,7 +297,7 @@ void FFDetach(FaceType & f, const int e)
|
||||||
@param z2 The edge of the face f2
|
@param z2 The edge of the face f2
|
||||||
*/
|
*/
|
||||||
template <class FaceType>
|
template <class FaceType>
|
||||||
void FFAttach(FaceType * &f, int z1, FaceType *&f2, int z2)
|
void FFAttach(FaceType * f, int z1, FaceType * f2, int z2)
|
||||||
{
|
{
|
||||||
//typedef FEdgePosB< FACE_TYPE > ETYPE;
|
//typedef FEdgePosB< FACE_TYPE > ETYPE;
|
||||||
vcg::face::Pos< FaceType > EPB(f2,z2);
|
vcg::face::Pos< FaceType > EPB(f2,z2);
|
||||||
|
|
@ -336,7 +337,7 @@ void FFAttach(FaceType * &f, int z1, FaceType *&f2, int z2)
|
||||||
@param z2 The edge of the face f2
|
@param z2 The edge of the face f2
|
||||||
*/
|
*/
|
||||||
template <class FaceType>
|
template <class FaceType>
|
||||||
void FFAttachManifold(FaceType * &f1, int z1, FaceType *&f2, int z2)
|
void FFAttachManifold(FaceType * f1, int z1, FaceType * f2, int z2)
|
||||||
{
|
{
|
||||||
assert(IsBorder<FaceType>(*f1,z1) || f1->FFp(z1)==0);
|
assert(IsBorder<FaceType>(*f1,z1) || f1->FFp(z1)==0);
|
||||||
assert(IsBorder<FaceType>(*f2,z2) || f2->FFp(z2)==0);
|
assert(IsBorder<FaceType>(*f2,z2) || f2->FFp(z2)==0);
|
||||||
|
|
@ -350,7 +351,7 @@ void FFAttachManifold(FaceType * &f1, int z1, FaceType *&f2, int z2)
|
||||||
|
|
||||||
// This one should be called only on uniitialized faces.
|
// This one should be called only on uniitialized faces.
|
||||||
template <class FaceType>
|
template <class FaceType>
|
||||||
void FFSetBorder(FaceType * &f1, int z1)
|
void FFSetBorder(FaceType * f1, int z1)
|
||||||
{
|
{
|
||||||
assert(f1->FFp(z1)==0 || IsBorder(*f1,z1));
|
assert(f1->FFp(z1)==0 || IsBorder(*f1,z1));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public:
|
||||||
/// max coordinate point
|
/// max coordinate point
|
||||||
Point3<BoxScalarType> max;
|
Point3<BoxScalarType> max;
|
||||||
/// The bounding box constructor
|
/// The bounding box constructor
|
||||||
inline Box3() { min.X()= 1;max.X()= -1;min.Y()= 1;max.Y()= -1;min.Z()= 1;max.Z()= -1;}
|
inline Box3() { this->SetNull(); }
|
||||||
/// Copy constructor
|
/// Copy constructor
|
||||||
inline Box3( const Box3 & b ) { min=b.min; max=b.max; }
|
inline Box3( const Box3 & b ) { min=b.min; max=b.max; }
|
||||||
/// Min Max constructor
|
/// Min Max constructor
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,16 @@ public:
|
||||||
b[1]=_v[1] ;
|
b[1]=_v[1] ;
|
||||||
b[2]=_v[2] ;
|
b[2]=_v[2] ;
|
||||||
}
|
}
|
||||||
|
template <class EigenVector>
|
||||||
|
inline EigenVector ToEigenVector(void) const
|
||||||
|
{
|
||||||
|
assert(EigenVector::RowsAtCompileTime == 3 || EigenVector::RowsAtCompileTime == 4);
|
||||||
|
EigenVector b = EigenVector::Zero();
|
||||||
|
b[0]=_v[0];
|
||||||
|
b[1]=_v[1];
|
||||||
|
b[2]=_v[2];
|
||||||
|
return b;
|
||||||
|
}
|
||||||
template <class Q>
|
template <class Q>
|
||||||
static inline Point3 Construct( const Point3<Q> & b )
|
static inline Point3 Construct( const Point3<Q> & b )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue