Added a bunch of 'c' to component members to clarify constant access
This commit is contained in:
parent
5c266a7ccb
commit
51fe0fb938
|
@ -70,7 +70,7 @@ public:
|
||||||
typedef typename VertexType::ScalarType ScalarType;
|
typedef typename VertexType::ScalarType ScalarType;
|
||||||
static void Apply( const VertexType &a, const VertexType &b, ScalarType t, VertexType &res){
|
static void Apply( const VertexType &a, const VertexType &b, ScalarType t, VertexType &res){
|
||||||
/*assert (&a != &b);*/
|
/*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();
|
if (a.IsB()||b.IsB()) res.SetB();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -639,7 +639,7 @@ static bool IsSingletFF(const FaceType& f, int wedge){
|
||||||
|
|
||||||
// version that uses vertex valency
|
// version that uses vertex valency
|
||||||
static bool IsSinglet(const FaceType& f, int wedge){
|
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){
|
static bool CollapseEdgeDirect(FaceType &f, int w0, MeshType& m){
|
||||||
|
|
|
@ -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
|
inline void operator () (const VertexType & v0, const VertexType & v1, const VertexType & v2, const ScalarType & a, const ScalarType & b, VertexType & r) const
|
||||||
{
|
{
|
||||||
// position
|
// 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
|
// normal
|
||||||
if (tri::HasPerVertexNormal(m))
|
if (tri::HasPerVertexNormal(m))
|
||||||
|
|
|
@ -146,7 +146,7 @@ public:
|
||||||
|
|
||||||
template<class BoxType>
|
template<class BoxType>
|
||||||
void GetBBox( BoxType & bb ) const
|
void GetBBox( BoxType & bb ) const
|
||||||
{ bb.Set(this->P()); }
|
{ bb.Set(this->cP()); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue