*** empty log message ***
This commit is contained in:
parent
6d04f844de
commit
f154f17acd
|
@ -314,27 +314,27 @@ void TTTopology(VertexContainer &vert,TetraContainer &tetra)
|
|||
(*ti).T(2)=(&(*ti));
|
||||
(*ti).T(3)=(&(*ti));
|
||||
|
||||
v0=(*ti).V(Tetra4<double>::VofF(0,0));
|
||||
v1=(*ti).V(Tetra4<double>::VofF(0,1));
|
||||
v2=(*ti).V(Tetra4<double>::VofF(0,2));
|
||||
v0=(*ti).V(Tetra3<double>::VofF(0,0));
|
||||
v1=(*ti).V(Tetra3<double>::VofF(0,1));
|
||||
v2=(*ti).V(Tetra3<double>::VofF(0,2));
|
||||
|
||||
VF.push_back(Facet<VertexType,TetraType>(v0,v1,v2,&(*ti),0));
|
||||
|
||||
v0=(*ti).V(Tetra4<double>::VofF(1,0));
|
||||
v1=(*ti).V(Tetra4<double>::VofF(1,1));
|
||||
v2=(*ti).V(Tetra4<double>::VofF(1,2));
|
||||
v0=(*ti).V(Tetra3<double>::VofF(1,0));
|
||||
v1=(*ti).V(Tetra3<double>::VofF(1,1));
|
||||
v2=(*ti).V(Tetra3<double>::VofF(1,2));
|
||||
|
||||
VF.push_back(Facet<VertexType,TetraType>(v0,v1,v2,&(*ti),1));
|
||||
|
||||
v0=(*ti).V(Tetra4<double>::VofF(2,0));
|
||||
v1=(*ti).V(Tetra4<double>::VofF(2,1));
|
||||
v2=(*ti).V(Tetra4<double>::VofF(2,2));
|
||||
v0=(*ti).V(Tetra3<double>::VofF(2,0));
|
||||
v1=(*ti).V(Tetra3<double>::VofF(2,1));
|
||||
v2=(*ti).V(Tetra3<double>::VofF(2,2));
|
||||
|
||||
VF.push_back(Facet<VertexType,TetraType>(v0,v1,v2,&(*ti),2));
|
||||
|
||||
v0=(*ti).V(Tetra4<double>::VofF(3,0));
|
||||
v1=(*ti).V(Tetra4<double>::VofF(3,1));
|
||||
v2=(*ti).V(Tetra4<double>::VofF(3,2));
|
||||
v0=(*ti).V(Tetra3<double>::VofF(3,0));
|
||||
v1=(*ti).V(Tetra3<double>::VofF(3,1));
|
||||
v2=(*ti).V(Tetra3<double>::VofF(3,2));
|
||||
|
||||
VF.push_back(Facet<VertexType,TetraType>(v0,v1,v2,&(*ti),3));
|
||||
}
|
||||
|
@ -378,16 +378,16 @@ void TestTTTopology(VertexContainer &vert,TetraContainer &tetra)
|
|||
{
|
||||
assert( ((((*ti).T(i))->T((*ti).Z(i)))==&(*ti)));
|
||||
|
||||
VertexType *v0=(*ti).V(Tetra4<double>::VofF(i,0));
|
||||
VertexType *v1=(*ti).V(Tetra4<double>::VofF(i,1));
|
||||
VertexType *v2=(*ti).V(Tetra4<double>::VofF(i,2));
|
||||
VertexType *v0=(*ti).V(Tetra3<double>::VofF(i,0));
|
||||
VertexType *v1=(*ti).V(Tetra3<double>::VofF(i,1));
|
||||
VertexType *v2=(*ti).V(Tetra3<double>::VofF(i,2));
|
||||
|
||||
TetraType *t1=(TetraType*)(*ti).T(i);
|
||||
int z1=(*ti).Z(i);
|
||||
|
||||
VertexType *vo0=(*t1).V(Tetra4<double>::VofF(z1,0));
|
||||
VertexType *vo1=(*t1).V(Tetra4<double>::VofF(z1,1));
|
||||
VertexType *vo2=(*t1).V(Tetra4<double>::VofF(z1,2));
|
||||
VertexType *vo0=(*t1).V(Tetra3<double>::VofF(z1,0));
|
||||
VertexType *vo1=(*t1).V(Tetra3<double>::VofF(z1,1));
|
||||
VertexType *vo2=(*t1).V(Tetra3<double>::VofF(z1,2));
|
||||
|
||||
assert((v0!=v1)&&(v0!=v2)&&(v1!=v2));
|
||||
assert((vo0!=vo1)&&(vo0!=vo2)&&(vo1!=vo2));
|
||||
|
|
|
@ -106,9 +106,9 @@ void Convert(TetraMeshType &tetram,TriangleMeshType &trim)
|
|||
for (int i=0;i<4;i++)
|
||||
if (ti->IsBorderF(i))
|
||||
{
|
||||
v0=ti->V(Tetra4<double>::VofF(i,0));
|
||||
v1=ti->V(Tetra4<double>::VofF(i,1));
|
||||
v2=ti->V(Tetra4<double>::VofF(i,2));
|
||||
v0=ti->V(Tetra3<double>::VofF(i,0));
|
||||
v1=ti->V(Tetra3<double>::VofF(i,1));
|
||||
v2=ti->V(Tetra3<double>::VofF(i,2));
|
||||
FaceType f=FaceType();
|
||||
f.ClearFlags();
|
||||
f.V(0)=v0;
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.3 2004/04/26 09:38:54 pietroni
|
||||
*** empty log message ***
|
||||
|
||||
Revision 1.2 2004/04/20 12:42:37 pietroni
|
||||
*** empty log message ***
|
||||
|
||||
|
@ -38,7 +41,7 @@ Revision 1.1 2004/04/15 08:54:20 pietroni
|
|||
#else
|
||||
#define NULL 0
|
||||
#include<vcg/space/point3.h>
|
||||
#include<vcg/space/tetra4.h>
|
||||
#include<vcg/space/tetra3.h>
|
||||
|
||||
namespace vcg {
|
||||
/**
|
||||
|
@ -289,7 +292,7 @@ public:
|
|||
|
||||
|
||||
ScalarType ComputeVolume(){
|
||||
Tetra4<ScalarType> T(V(0)->cP(),V(1)->cP(),V(2)->cP(),V(3)->cP());
|
||||
Tetra3<ScalarType> T(V(0)->cP(),V(1)->cP(),V(2)->cP(),V(3)->cP());
|
||||
#ifdef __VCGLIB_TETRA_Q
|
||||
_volume = T.ComputeVolume();
|
||||
return _volume;
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.6 2004/04/26 09:40:15 pietroni
|
||||
*** empty log message ***
|
||||
|
||||
Revision 1.6 2004/04/23 14:55:06 pietroni
|
||||
conversion funtion
|
||||
|
||||
|
@ -573,20 +576,22 @@ static bool HasVFAdjacency() {
|
|||
//@{
|
||||
|
||||
template <class VERT_TYPE>
|
||||
inline Convert( const VERT_TYPE &v )
|
||||
inline Convert( VERT_TYPE &v )
|
||||
{
|
||||
this->P()=v->P();
|
||||
this._flags=v._flags;
|
||||
if (this->HasNormal())&&(v.HasNormal())
|
||||
this->N()=v->N();
|
||||
if (this->HasColor())&&(v.HasColor())
|
||||
this->C()=v->C();
|
||||
if (this->HasMark())&&(v.HasMark())
|
||||
this.IMark()=v.IMark();
|
||||
if (this->HasQuality())&&(v.HasQuality())
|
||||
this->Q()=v->Q();
|
||||
if (this->HasTexture())&&(v.HasTexture())
|
||||
this->T()=v->T();
|
||||
P()=v.P();
|
||||
Flags()=v.Flags();
|
||||
if ((HasNormal())&&(v.HasNormal()))
|
||||
N()=v.N();
|
||||
if ((HasColor())&&(v.HasColor()))
|
||||
C()=v.C();
|
||||
#ifdef __VCGLIB_VERTEX_M
|
||||
if ((HasMark())&&(v.HasMark()))
|
||||
IMark()=v.IMark();
|
||||
#endif
|
||||
if ((HasQuality())&&(v.HasQuality()))
|
||||
Q()=v.Q();
|
||||
if ((HasTexture())&&(v.HasTexture()))
|
||||
T()=v.T();
|
||||
}
|
||||
|
||||
//@}
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.1 2004/04/22 13:19:12 ganovelli
|
||||
first version
|
||||
|
||||
Revision 1.2 2004/04/20 16:26:48 pietroni
|
||||
*** empty log message ***
|
||||
|
||||
|
@ -46,7 +49,7 @@ namespace vcg {
|
|||
Templated class for storing a generic tetrahedron in a 3D space.
|
||||
Note the relation with the Face class of TetraMesh complex, both classes provide the P(i) access functions to their points and therefore they share the algorithms on it (e.g. area, normal etc...)
|
||||
*/
|
||||
template <class SCALAR_TETRA_TYPE> class Tetra4
|
||||
template <class SCALAR_TETRA_TYPE> class Tetra3
|
||||
{
|
||||
public:
|
||||
typedef SCALAR_TETRA_TYPE ScalarType;
|
||||
|
@ -62,7 +65,7 @@ protected:
|
|||
|
||||
public:
|
||||
///constructor with 4 points
|
||||
Tetra4(CoordType p0,CoordType p1,CoordType p2,CoordType p3)
|
||||
Tetra3(CoordType p0,CoordType p1,CoordType p2,CoordType p3)
|
||||
{
|
||||
_v[0]=p0;
|
||||
_v[1]=p1;
|
||||
|
@ -165,8 +168,8 @@ ScalarType ComputeAspectRatio()
|
|||
return vertface[indexV][indexF];
|
||||
}
|
||||
|
||||
static int FofE(const int &indexE,const int &indexF)
|
||||
{ assert ((indexE<6)&&(indexF<2));
|
||||
static int FofE(const int &indexE,const int &indexSide)
|
||||
{ assert ((indexE<6)&&(indexSide<2));
|
||||
static int edgeface[6][2]={{0,1},
|
||||
{0,2},
|
||||
{1,2},
|
||||
|
|
Loading…
Reference in New Issue