Added a bunch of 'c' to component members to clarify constant access

This commit is contained in:
Paolo Cignoni 2012-11-15 19:07:34 +00:00
parent 5c266a7ccb
commit 51fe0fb938
3 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ public:
typedef typename VertexType::ScalarType ScalarType;
static void Apply( const VertexType &a, const VertexType &b, ScalarType t, VertexType &res){
/*assert (&a != &b);*/
res.P() = a.P()*(1-t) + b.P()*(t);
res.P() = a.cP()*(1-t) + b.cP()*(t);
if (a.IsB()||b.IsB()) res.SetB();
}
};
@ -639,7 +639,7 @@ static bool IsSingletFF(const FaceType& f, int wedge){
// version that uses vertex valency
static bool IsSinglet(const FaceType& f, int wedge){
return (GetValency( f.V(wedge) ) == 1) && (!f.V(wedge)->IsB() ) ;
return (GetValency( f.cV(wedge) ) == 1) && (!f.cV(wedge)->IsB() ) ;
}
static bool CollapseEdgeDirect(FaceType &f, int w0, MeshType& m){

View File

@ -65,7 +65,7 @@ namespace tri
inline void operator () (const VertexType & v0, const VertexType & v1, const VertexType & v2, const ScalarType & a, const ScalarType & b, VertexType & r) const
{
// position
r.P() = v0.P() + (v1.P() - v0.P()) * a + (v2.P() - v0.P()) * b;
r.P() = v0.cP() + (v1.cP() - v0.cP()) * a + (v2.cP() - v0.cP()) * b;
// normal
if (tri::HasPerVertexNormal(m))

View File

@ -146,7 +146,7 @@ public:
template<class BoxType>
void GetBBox( BoxType & bb ) const
{ bb.Set(this->P()); }
{ bb.Set(this->cP()); }
};