completed the correct working of temporary data inside the refinement functions
This commit is contained in:
parent
2c3da1c3c9
commit
eae78a0251
|
@ -440,7 +440,7 @@ void Sphere(MeshType &in, const int subdiv = 3 )
|
|||
size_t lastsize = 0;
|
||||
for(int i = 0 ; i < subdiv; ++i)
|
||||
{
|
||||
Refine< MeshType, MidPoint<MeshType> >(in, MidPoint<MeshType>(), 0);
|
||||
Refine< MeshType, MidPoint<MeshType> >(in, MidPoint<MeshType>(&in), 0);
|
||||
|
||||
for(vi = in.vert.begin() + lastsize; vi != in.vert.end(); ++vi)
|
||||
vi->P().Normalize();
|
||||
|
|
|
@ -440,8 +440,11 @@ bool RefineE(MESH_TYPE &m, MIDPOINT mid, EDGEPRED ep,bool RefineSelected=false,
|
|||
for(i=1;i<SplitTab[ind].TriNum;++i){
|
||||
nf[i]=&*lastf; ++lastf; fca++;
|
||||
if(RefineSelected || (*fi).IsS()) (*nf[i]).SetS();
|
||||
if(tri::HasPerFaceColor(m))
|
||||
nf[i]->C()=(*fi).cC();
|
||||
}
|
||||
|
||||
|
||||
if(tri::HasPerWedgeTexCoord(m))
|
||||
for(i=0;i<3;++i) {
|
||||
wtt[i]=(*fi).WT(i);
|
||||
|
|
|
@ -538,7 +538,11 @@ public:
|
|||
assert((*this).Base().ColorEnabled);
|
||||
return (*this).Base().CV[(*this).Index()];
|
||||
}
|
||||
const ColorType C() const {
|
||||
const ColorType C() const {
|
||||
assert((*this).Base().ColorEnabled);
|
||||
return (*this).Base().CV[(*this).Index()];
|
||||
}
|
||||
const ColorType cC() const {
|
||||
assert((*this).Base().ColorEnabled);
|
||||
return (*this).Base().CV[(*this).Index()];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue