minor changes to comply gcc compiler (typename's and stuff)
This commit is contained in:
parent
04a6543ad6
commit
0bbd5bb33b
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.9 2004/07/18 10:13:34 cignoni
|
||||||
|
NewUserBit -> NewBitFlag
|
||||||
|
|
||||||
Revision 1.8 2004/06/24 09:08:31 cignoni
|
Revision 1.8 2004/06/24 09:08:31 cignoni
|
||||||
Official Release of Metro 4.00
|
Official Release of Metro 4.00
|
||||||
|
|
||||||
|
@ -264,7 +267,7 @@ void Sampling<MetroMesh>::VertexSampling()
|
||||||
|
|
||||||
printf("Vertex sampling\n");
|
printf("Vertex sampling\n");
|
||||||
VertexIterator vi;
|
VertexIterator vi;
|
||||||
std::vector<VertexPointer>::iterator vif;
|
typename std::vector<VertexPointer>::iterator vif;
|
||||||
for(vi=S1.vert.begin();vi!=S1.vert.end();++vi)
|
for(vi=S1.vert.begin();vi!=S1.vert.end();++vi)
|
||||||
if( (*vi).IsUserBit(referredBit) || // it is referred
|
if( (*vi).IsUserBit(referredBit) || // it is referred
|
||||||
((Flags&SamplingFlags::INCLUDE_UNREFERENCED_VERTICES) != 0) ) //include also unreferred
|
((Flags&SamplingFlags::INCLUDE_UNREFERENCED_VERTICES) != 0) ) //include also unreferred
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.11 2004/08/07 17:38:00 pietroni
|
||||||
|
solved errors on AddFaces relative to VFp pointers of faces
|
||||||
|
|
||||||
Revision 1.10 2004/08/07 16:16:32 pietroni
|
Revision 1.10 2004/08/07 16:16:32 pietroni
|
||||||
corrected errors in AddFaces ( must be updated pointers to chain of faces of VFTopology)
|
corrected errors in AddFaces ( must be updated pointers to chain of faces of VFTopology)
|
||||||
|
|
||||||
|
@ -200,7 +203,7 @@ static FaceIterator AddFaces(MeshType &m, int n, PointerUpdater<FacePointer> &pu
|
||||||
pu.Update((FacePointer&)(*it));
|
pu.Update((FacePointer&)(*it));
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
std::vector<FaceType **>::iterator jit;
|
typename std::vector<FaceType **>::iterator jit;
|
||||||
for(jit=local_var.begin(); jit!=local_var.end(); ++jit)
|
for(jit=local_var.begin(); jit!=local_var.end(); ++jit)
|
||||||
if((**jit) !=0 )
|
if((**jit) !=0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.3 2004/07/18 06:55:37 cignoni
|
||||||
|
NewUserBit -> NewBitFlag
|
||||||
|
|
||||||
Revision 1.2 2004/07/09 15:48:37 tarini
|
Revision 1.2 2004/07/09 15:48:37 tarini
|
||||||
Added an include (<algorithm>)
|
Added an include (<algorithm>)
|
||||||
|
|
||||||
|
@ -73,17 +76,17 @@ static int RemoveDuplicateVertex( MeshType & m ) // V1.0
|
||||||
{
|
{
|
||||||
if(m.vert.size()==0 || m.vn==0) return 0;
|
if(m.vert.size()==0 || m.vn==0) return 0;
|
||||||
|
|
||||||
std::map<VertexIterator, VertexIterator> mp;
|
std::map<VertexPointer, VertexPointer> mp;
|
||||||
int i,j;
|
int i,j;
|
||||||
VertexIterator vi;
|
VertexIterator vi;
|
||||||
int deleted=0;
|
int deleted=0;
|
||||||
int k=0;
|
int k=0;
|
||||||
int num_vert = m.vert.size();
|
int num_vert = m.vert.size();
|
||||||
vector<VertexIterator> perm(num_vert);
|
vector<VertexPointer> perm(num_vert);
|
||||||
for(vi=m.vert.begin(); vi!=m.vert.end(); ++vi, ++k)
|
for(vi=m.vert.begin(); vi!=m.vert.end(); ++vi, ++k)
|
||||||
perm[k] = vi;
|
perm[k] = &(*vi);
|
||||||
|
|
||||||
RemoveDuplicateVert_Compare<VertexIterator> c_obj;
|
RemoveDuplicateVert_Compare<VertexPointer> c_obj;
|
||||||
|
|
||||||
std::sort(perm.begin(),perm.end(),c_obj);
|
std::sort(perm.begin(),perm.end(),c_obj);
|
||||||
|
|
||||||
|
@ -97,7 +100,7 @@ static int RemoveDuplicateVertex( MeshType & m ) // V1.0
|
||||||
(! (*perm[j]).IsD()) &&
|
(! (*perm[j]).IsD()) &&
|
||||||
(*perm[i]).P() == (*perm[j]).cP() )
|
(*perm[i]).P() == (*perm[j]).cP() )
|
||||||
{
|
{
|
||||||
VertexIterator t = perm[i];
|
VertexPointer t = perm[i];
|
||||||
mp[perm[i]] = perm[j];
|
mp[perm[i]] = perm[j];
|
||||||
++i;
|
++i;
|
||||||
(*t).SetD();
|
(*t).SetD();
|
||||||
|
@ -113,7 +116,7 @@ static int RemoveDuplicateVertex( MeshType & m ) // V1.0
|
||||||
for(fi = m.face.begin(); fi!=m.face.end(); ++fi)
|
for(fi = m.face.begin(); fi!=m.face.end(); ++fi)
|
||||||
for(k = 0; k < 3; ++k)
|
for(k = 0; k < 3; ++k)
|
||||||
if( !(*fi).IsD() )
|
if( !(*fi).IsD() )
|
||||||
if( mp.find( (*fi).V(k) ) != mp.end() )
|
if( mp.find( (typename MeshType::VertexPointer)(*fi).V(k) ) != mp.end() )
|
||||||
{
|
{
|
||||||
(*fi).V(k) = &*mp[ (*fi).V(k) ];
|
(*fi).V(k) = &*mp[ (*fi).V(k) ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.5 2004/07/15 00:13:39 cignoni
|
||||||
|
Better doxigen documentation
|
||||||
|
|
||||||
Revision 1.4 2004/06/24 07:56:54 cignoni
|
Revision 1.4 2004/06/24 07:56:54 cignoni
|
||||||
now use std::numeric_limits instead of old max val()
|
now use std::numeric_limits instead of old max val()
|
||||||
|
|
||||||
|
@ -52,25 +55,25 @@ template <class UpdateMeshType>
|
||||||
class UpdateColor
|
class UpdateColor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef UpdateMeshType MeshType;
|
typedef UpdateMeshType MeshType;
|
||||||
typedef typename MeshType::VertexType VertexType;
|
typedef typename UpdateMeshType::VertexType VertexType;
|
||||||
typedef typename MeshType::VertexPointer VertexPointer;
|
typedef typename UpdateMeshType::VertexPointer VertexPointer;
|
||||||
typedef typename MeshType::VertexIterator VertexIterator;
|
typedef typename UpdateMeshType::VertexIterator VertexIterator;
|
||||||
typedef typename MeshType::FaceType FaceType;
|
typedef typename UpdateMeshType::FaceType FaceType;
|
||||||
typedef typename MeshType::FacePointer FacePointer;
|
typedef typename UpdateMeshType::FacePointer FacePointer;
|
||||||
typedef typename MeshType::FaceIterator FaceIterator;
|
typedef typename UpdateMeshType::FaceIterator FaceIterator;
|
||||||
|
|
||||||
/** Color the vertex of the mesh that are on the border
|
/** Color the vertex of the mesh that are on the border
|
||||||
It uses the information in the flags, and not any topology. So it just require that you have correctly computed (or loaded) the flags; See the
|
It uses the information in the flags, and not any topology. So it just require that you have correctly computed (or loaded) the flags; See the
|
||||||
**/
|
**/
|
||||||
static void VertexBorderFlag(MeshType &m, Color4b vb=Color4b::Blue)
|
static void VertexBorderFlag( UpdateMeshType &m, Color4b vb=Color4b::Blue)
|
||||||
{
|
{
|
||||||
MeshType::VertexIterator vi;
|
typename UpdateMeshType::VertexIterator vi;
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||||
if(!(*vi).IsD())
|
if(!(*vi).IsD())
|
||||||
(*vi).C()=Color4b::White;
|
(*vi).C()=Color4b::White;
|
||||||
|
|
||||||
MeshType::FaceIterator fi;
|
typename UpdateMeshType::FaceIterator fi;
|
||||||
for(fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD())
|
for(fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD())
|
||||||
for(int j=0;j<3;++j)
|
for(int j=0;j<3;++j)
|
||||||
if((*fi).IsB(j)){
|
if((*fi).IsB(j)){
|
||||||
|
@ -80,10 +83,10 @@ static void VertexBorderFlag(MeshType &m, Color4b vb=Color4b::Blue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FaceBF(MeshType &m, Color4b vn=Color4b::White, Color4b vb=Color4b::Blue,
|
static void FaceBF( UpdateMeshType &m, Color4b vn=Color4b::White, Color4b vb=Color4b::Blue,
|
||||||
Color4b vc=Color4b::Red, Color4b vs=Color4b::LightBlue)
|
Color4b vc=Color4b::Red, Color4b vs=Color4b::LightBlue)
|
||||||
{
|
{
|
||||||
MeshType::FaceIterator fi;
|
typename UpdateMeshType::FaceIterator fi;
|
||||||
for(fi=m.face.begin();fi!=m.face.end();++fi)
|
for(fi=m.face.begin();fi!=m.face.end();++fi)
|
||||||
if(!(*fi).IsD())
|
if(!(*fi).IsD())
|
||||||
(*fi).C() = vn;
|
(*fi).C() = vn;
|
||||||
|
@ -96,7 +99,7 @@ static void FaceBF(MeshType &m, Color4b vn=Color4b::White, Color4b vb=Color4b::B
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(int j=0;j<3;++j)
|
for(int j=0;j<3;++j)
|
||||||
if(face::IsManifold(*fi,j)){
|
if(*fi.IsManifold(j)){
|
||||||
if((*fi).IsB(j)){
|
if((*fi).IsB(j)){
|
||||||
(*fi).C() = vb;
|
(*fi).C() = vb;
|
||||||
(*fi).C() = vb;
|
(*fi).C() = vb;
|
||||||
|
@ -112,10 +115,10 @@ static void FaceBF(MeshType &m, Color4b vn=Color4b::White, Color4b vb=Color4b::B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int FaceSelected(MeshType &m, Color4b vs=Color4b::LightBlue)
|
static int FaceSelected(UpdateMeshType &m, Color4b vs=Color4b::LightBlue)
|
||||||
{
|
{
|
||||||
int cnt=0;
|
int cnt=0;
|
||||||
MeshType::FaceIterator fi;
|
typename UpdateMeshType::FaceIterator fi;
|
||||||
for(fi=m.face.begin();fi!=m.face.end();++fi)
|
for(fi=m.face.begin();fi!=m.face.end();++fi)
|
||||||
if(!(*fi).IsD())
|
if(!(*fi).IsD())
|
||||||
if((*fi).IsS()) { (*fi).C() = vs; ++cnt; }
|
if((*fi).IsS()) { (*fi).C() = vs; ++cnt; }
|
||||||
|
@ -123,12 +126,20 @@ static int FaceSelected(MeshType &m, Color4b vs=Color4b::LightBlue)
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FaceColorStrip(MeshType &m, std::vector<FacePointer> &TStripF)
|
static void FaceColorStrip(UpdateMeshType &m, std::vector<FacePointer> &TStripF)
|
||||||
{
|
{
|
||||||
Color4b::Color4b cc[7]={Color4b::White ,Color4b::Red ,Color4b::Green ,Color4b::Blue ,Color4b::Cyan ,Color4b::Yellow ,Color4b::Magenta};
|
vcg::Color4b cc[7]={
|
||||||
|
vcg::Color4b::White ,
|
||||||
|
vcg::Color4b::Red ,
|
||||||
|
vcg::Color4b::Green ,
|
||||||
|
vcg::Color4b::Blue ,
|
||||||
|
vcg::Color4b::Cyan ,
|
||||||
|
vcg::Color4b::Yellow ,
|
||||||
|
vcg::Color4b::Magenta
|
||||||
|
};
|
||||||
int cnt=0;
|
int cnt=0;
|
||||||
|
|
||||||
vector<FacePointer>::iterator fi;
|
typename std::vector<FacePointer>::iterator fi;
|
||||||
for(fi=TStripF.begin();fi!=TStripF.end();++fi)
|
for(fi=TStripF.begin();fi!=TStripF.end();++fi)
|
||||||
if(*fi) (**fi).C().ColorRamp(0,16,cnt);
|
if(*fi) (**fi).C().ColorRamp(0,16,cnt);
|
||||||
else cnt=(cnt+1)%16;
|
else cnt=(cnt+1)%16;
|
||||||
|
@ -138,10 +149,10 @@ static void FaceColorStrip(MeshType &m, std::vector<FacePointer> &TStripF)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int VertexSelected(MeshType &m, Color4b vs=Color4b::LightBlue)
|
static int VertexSelected(UpdateMeshType &m, Color4b vs=Color4b::LightBlue)
|
||||||
{
|
{
|
||||||
int cnt=0;
|
int cnt=0;
|
||||||
MeshType::VertexIterator vi;
|
typename UpdateMeshType::VertexIterator vi;
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||||
if(!(*vi).IsD())
|
if(!(*vi).IsD())
|
||||||
if((*vi).IsS()) {(*vi).C() = vs; ++cnt; }
|
if((*vi).IsS()) {(*vi).C() = vs; ++cnt; }
|
||||||
|
@ -150,27 +161,27 @@ static int VertexSelected(MeshType &m, Color4b vs=Color4b::LightBlue)
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void VertexConstant(MeshType &m, Color4b c=Color4b::White)
|
static void VertexConstant(UpdateMeshType &m, Color4b c=Color4b::White)
|
||||||
{
|
{
|
||||||
MeshType::VertexIterator vi;
|
typename UpdateMeshType::VertexIterator vi;
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
|
for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
|
||||||
(*vi).C()=c;
|
(*vi).C()=c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FaceConstant(MeshType &m, Color4b c=Color4b::White)
|
static void FaceConstant(UpdateMeshType &m, Color4b c=Color4b::White)
|
||||||
{
|
{
|
||||||
MeshType::FaceIterator fi;
|
typename UpdateMeshType::FaceIterator fi;
|
||||||
for(fi=m.face.begin();fi!=m.face.end();++fi)
|
for(fi=m.face.begin();fi!=m.face.end();++fi)
|
||||||
(*fi).C()=c;
|
(*fi).C()=c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void VertexBorderManifoldFlag(MeshType &m, Color4b vn=Color4b::White, Color4b vb=Color4b::Blue, Color4b vc=Color4b::Red)
|
static void VertexBorderManifoldFlag(UpdateMeshType &m, Color4b vn=Color4b::White, Color4b vb=Color4b::Blue, Color4b vc=Color4b::Red)
|
||||||
{
|
{
|
||||||
MeshType::VertexIterator vi;
|
typename UpdateMeshType::VertexIterator vi;
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
|
for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
|
||||||
(*vi).C()=vn;
|
(*vi).C()=vn;
|
||||||
|
|
||||||
MeshType::FaceIterator fi;
|
typename UpdateMeshType::FaceIterator fi;
|
||||||
for(fi=m.face.begin();fi!=m.face.end();++fi)
|
for(fi=m.face.begin();fi!=m.face.end();++fi)
|
||||||
if(!(*fi).IsD())
|
if(!(*fi).IsD())
|
||||||
for(int j=0;j<3;++j)
|
for(int j=0;j<3;++j)
|
||||||
|
@ -189,10 +200,10 @@ static void VertexBorderManifoldFlag(MeshType &m, Color4b vn=Color4b::White, Col
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void FaceQuality(MeshType &m)
|
static void FaceQuality(UpdateMeshType &m)
|
||||||
{
|
{
|
||||||
// step 1: find the range
|
// step 1: find the range
|
||||||
MeshType::FaceIterator fi;
|
typename UpdateMeshType::FaceIterator fi;
|
||||||
float minq=m.face[0].Q(),
|
float minq=m.face[0].Q(),
|
||||||
maxq=m.face[0].Q();
|
maxq=m.face[0].Q();
|
||||||
for(fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD())
|
for(fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD())
|
||||||
|
@ -205,27 +216,27 @@ static void FaceQuality(MeshType &m)
|
||||||
FaceQuality(m,minq,maxq);
|
FaceQuality(m,minq,maxq);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FaceQuality(MeshType &m, float minq, float maxq)
|
static void FaceQuality(UpdateMeshType &m, float minq, float maxq)
|
||||||
{
|
{
|
||||||
MeshType::FaceIterator fi;
|
typename UpdateMeshType::FaceIterator fi;
|
||||||
|
|
||||||
for(fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD())
|
for(fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD())
|
||||||
(*fi).C().ColorRamp(minq,maxq,(*fi).Q());
|
(*fi).C().ColorRamp(minq,maxq,(*fi).Q());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void VertexQuality(MeshType &m, float minq, float maxq)
|
static void VertexQuality(UpdateMeshType &m, float minq, float maxq)
|
||||||
{
|
{
|
||||||
MeshType::VertexIterator vi;
|
typename UpdateMeshType::VertexIterator vi;
|
||||||
|
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||||
if(!(*vi).IsD())
|
if(!(*vi).IsD())
|
||||||
(*vi).C().ColorRamp(minq,maxq,(*vi).Q());
|
(*vi).C().ColorRamp(minq,maxq,(*vi).Q());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void VertexQuality(MeshType &m)
|
static void VertexQuality(UpdateMeshType &m)
|
||||||
{
|
{
|
||||||
// step 1: find the range
|
// step 1: find the range
|
||||||
MeshType::VertexIterator vi;
|
typename UpdateMeshType::VertexIterator vi;
|
||||||
float minq=std::numeric_limits<float>::max(),
|
float minq=std::numeric_limits<float>::max(),
|
||||||
maxq=std::numeric_limits<float>::min();
|
maxq=std::numeric_limits<float>::min();
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||||
|
@ -237,10 +248,10 @@ static void VertexQuality(MeshType &m)
|
||||||
VertexQuality(m,minq,maxq);
|
VertexQuality(m,minq,maxq);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void VertexQualityHistEq(MeshType &m)
|
static void VertexQualityHistEq(UpdateMeshType &m)
|
||||||
{
|
{
|
||||||
// step 1: find the range
|
// step 1: find the range
|
||||||
MeshType::VertexIterator vi;
|
typename UpdateMeshType::VertexIterator vi;
|
||||||
float minq=MaxVal(0.0f),
|
float minq=MaxVal(0.0f),
|
||||||
maxq=-MaxVal(0.0f);
|
maxq=-MaxVal(0.0f);
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||||
|
@ -250,16 +261,16 @@ static void VertexQualityHistEq(MeshType &m)
|
||||||
maxq=max(maxq,(*vi).Q());
|
maxq=max(maxq,(*vi).Q());
|
||||||
}
|
}
|
||||||
// step 2; Get the distribution
|
// step 2; Get the distribution
|
||||||
Hist H;
|
// Hist H;
|
||||||
H.SetRange(minq,maxq,1024);
|
//H.SetRange(minq,maxq,1024);
|
||||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
//for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||||
if(!(*vi).IsD()) H.Add((*vi).Q());
|
// if(!(*vi).IsD()) H.Add((*vi).Q());
|
||||||
|
|
||||||
VertexQuality(m,H.Percentile(.05f),H.Percentile(.95f));
|
// VertexQuality(m,H.Percentile(.05f),H.Percentile(.95f));
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
/*@}*/
|
/*@}*/
|
||||||
}// end namespace
|
}// end namespace
|
||||||
}// end namespace
|
}// end namespace
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.1 2004/06/24 09:12:28 cignoni
|
||||||
|
Initial Release
|
||||||
|
|
||||||
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
@ -115,4 +118,4 @@ void Histogram<ScalarType>::Add(ScalarType v){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}// end namespace
|
}// end namespace
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.17 2004/07/15 12:03:07 ganovelli
|
||||||
|
minor changes
|
||||||
|
|
||||||
Revision 1.16 2004/07/15 11:31:59 ganovelli
|
Revision 1.16 2004/07/15 11:31:59 ganovelli
|
||||||
minor changes
|
minor changes
|
||||||
|
|
||||||
|
@ -145,7 +148,7 @@ public:
|
||||||
return v[j];
|
return v[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const FVTYPE * const & V( const int j ) const
|
inline FVTYPE * const & V( const int j ) const
|
||||||
{
|
{
|
||||||
assert( (_flags & DELETED) == 0 );
|
assert( (_flags & DELETED) == 0 );
|
||||||
assert( (_flags & NOTREAD) == 0 );
|
assert( (_flags & NOTREAD) == 0 );
|
||||||
|
@ -153,7 +156,7 @@ public:
|
||||||
assert(j<3);
|
assert(j<3);
|
||||||
return v[j];
|
return v[j];
|
||||||
}
|
}
|
||||||
inline const FVTYPE * const & cV( const int j ) const
|
inline FVTYPE * const cV( const int j ) const
|
||||||
{
|
{
|
||||||
assert( (_flags & DELETED) == 0 );
|
assert( (_flags & DELETED) == 0 );
|
||||||
assert( (_flags & NOTREAD) == 0 );
|
assert( (_flags & NOTREAD) == 0 );
|
||||||
|
@ -1092,7 +1095,7 @@ const ScalarType EPSILON = ScalarType(0.000001);
|
||||||
/// Return the DOUBLE of the area of the face
|
/// Return the DOUBLE of the area of the face
|
||||||
ScalarType Area() const
|
ScalarType Area() const
|
||||||
{
|
{
|
||||||
return Norm( (V(1)->P() - V(0)->P()) ^ (V(2)->P() - V(0)->P()) );
|
return ( (V(1)->cP() - V(0)->cP()) ^ (V(2)->cP() - V(0)->P()) ).Norm();
|
||||||
}
|
}
|
||||||
|
|
||||||
CoordType Barycenter() const
|
CoordType Barycenter() const
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.10 2004/07/27 09:47:49 cignoni
|
||||||
|
Added V() access function instead of V(0)
|
||||||
|
|
||||||
Revision 1.9 2004/07/18 07:45:30 cignoni
|
Revision 1.9 2004/07/18 07:45:30 cignoni
|
||||||
Removed two const modifiers from the VFIterator
|
Removed two const modifiers from the VFIterator
|
||||||
|
|
||||||
|
@ -327,7 +330,7 @@ public:
|
||||||
This class is used as an iterator over the VF adjacency.
|
This class is used as an iterator over the VF adjacency.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template <class FaceType>
|
template <typename FaceType>
|
||||||
class VFIterator
|
class VFIterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -335,14 +338,14 @@ public:
|
||||||
/// The vertex type
|
/// The vertex type
|
||||||
typedef typename FaceType::VertexType VertexType;
|
typedef typename FaceType::VertexType VertexType;
|
||||||
/// The Base face type
|
/// The Base face type
|
||||||
typedef typename FaceType VFIFaceType;
|
typedef FaceType VFIFaceType;
|
||||||
/// The vector type
|
/// The vector type
|
||||||
typedef typename VertexType::CoordType CoordType;
|
typedef typename VertexType::CoordType CoordType;
|
||||||
/// The scalar type
|
/// The scalar type
|
||||||
typedef typename VertexType::ScalarType ScalarType;
|
typedef typename VertexType::ScalarType ScalarType;
|
||||||
|
|
||||||
/// Pointer to the face of the half-edge
|
/// Pointer to the face of the half-edge
|
||||||
VFIFaceType *f;
|
FaceType *f;
|
||||||
/// Index of the vertex
|
/// Index of the vertex
|
||||||
int z;
|
int z;
|
||||||
|
|
||||||
|
@ -352,7 +355,7 @@ public:
|
||||||
VFIterator(FaceType * _f, const int & _z){f = _f; z = _z;}
|
VFIterator(FaceType * _f, const int & _z){f = _f; z = _z;}
|
||||||
|
|
||||||
VFIFaceType * F() const { return f;}
|
VFIFaceType * F() const { return f;}
|
||||||
const int I() const { return z;}
|
const int & I() const { return z;}
|
||||||
|
|
||||||
bool End() const {return f==0;}
|
bool End() const {return f==0;}
|
||||||
VFIFaceType *operator++() {
|
VFIFaceType *operator++() {
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
History
|
History
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.17 2004/07/20 15:24:53 pietroni
|
||||||
|
corrected NormalizedNormalV function...
|
||||||
|
|
||||||
Revision 1.16 2004/07/15 11:25:01 ganovelli
|
Revision 1.16 2004/07/15 11:25:01 ganovelli
|
||||||
VFb moved to VFp, userbit to bitflag,setV, inclusion of pos.h
|
VFb moved to VFp, userbit to bitflag,setV, inclusion of pos.h
|
||||||
|
|
||||||
|
@ -42,6 +45,9 @@ Revision 1.12 2004/05/10 13:31:13 ganovelli
|
||||||
function for edge adjacency added
|
function for edge adjacency added
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.17 2004/07/20 15:24:53 pietroni
|
||||||
|
corrected NormalizedNormalV function...
|
||||||
|
|
||||||
Revision 1.16 2004/07/15 11:25:01 ganovelli
|
Revision 1.16 2004/07/15 11:25:01 ganovelli
|
||||||
VFb moved to VFp, userbit to bitflag,setV, inclusion of pos.h
|
VFb moved to VFp, userbit to bitflag,setV, inclusion of pos.h
|
||||||
|
|
||||||
|
@ -840,10 +846,10 @@ template <class VERTEX_TYPE> typename VERTEX_TYPE::CoordType NormalizedNormalV(V
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vcg::face::VFIterator<VERTEX_TYPE::FaceType> VFi=vcg::face::VFIterator<VERTEX_TYPE::FaceType>();
|
vcg::face::VFIterator<typename VERTEX_TYPE::FaceType> VFi=vcg::face::VFIterator<typename VERTEX_TYPE::FaceType>();
|
||||||
VFi.f=v->VFp();
|
VFi.f=v->VFp();
|
||||||
VFi.z=v->VFi();
|
VFi.z=v->VFi();
|
||||||
VERTEX_TYPE::CoordType N=VERTEX_TYPE::CoordType(0,0,0);
|
typename VERTEX_TYPE::CoordType N= typename VERTEX_TYPE::CoordType(0,0,0);
|
||||||
int i=0;
|
int i=0;
|
||||||
while (!VFi.End())
|
while (!VFi.End())
|
||||||
{
|
{
|
||||||
|
@ -851,7 +857,7 @@ template <class VERTEX_TYPE> typename VERTEX_TYPE::CoordType NormalizedNormalV(V
|
||||||
i++;
|
i++;
|
||||||
VFi++;
|
VFi++;
|
||||||
}
|
}
|
||||||
return ((VERTEX_TYPE::CoordType) N/(VERTEX_TYPE::CoordType::ScalarType)i);
|
return ((typename VERTEX_TYPE::CoordType) N/(typename VERTEX_TYPE::CoordType::ScalarType)i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.5 2004/06/23 15:36:44 cignoni
|
||||||
|
Restructured management of error, now the standard open for any mesh type return the error code, the default success value is zero
|
||||||
|
Any import class has a method ErrorMsg that give a verbal description of an error code.
|
||||||
|
|
||||||
Revision 1.4 2004/03/18 15:30:57 cignoni
|
Revision 1.4 2004/03/18 15:30:57 cignoni
|
||||||
Removed float/double warning
|
Removed float/double warning
|
||||||
|
|
||||||
|
@ -210,4 +214,4 @@ static int OpenBinary( OpenMeshType &m, const char * filename, CallBackPos *cb=0
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue