corrected the use of default copy constructor with the more or less standard importLocal
This commit is contained in:
parent
e54e0a7124
commit
06bda0acae
|
@ -288,15 +288,21 @@ static void MakePureByRefine(MeshType &m){
|
|||
{
|
||||
assert(nvi!=m.vert.end());
|
||||
VertexType *nv = &*nvi; nvi++;
|
||||
*nv = *fi->V0( 0 ); // lazy: copy everything from the old vertex
|
||||
nv->ImportLocal(*(fi->V0( 0 ))); // lazy: copy everything from the old vertex
|
||||
nv->P() = ( fi->V(0)->P() + fi->V(1)->P() + fi->V(2)->P() ) /3.0;
|
||||
FaceType *fa = &*fi;
|
||||
FaceType *fb = &*nfi; nfi++;
|
||||
FaceType *fc = &*nfi; nfi++;
|
||||
*fb = *fc = *fa; // lazy: copy everything from the old faces
|
||||
|
||||
fb->ImportLocal(*fi);
|
||||
fc->ImportLocal(*fi);
|
||||
|
||||
fb->V(1) = nv; fb->V(0)=fa->V(0); fb->V(2)=fa->V(2);
|
||||
fc->V(2) = nv; fc->V(0)=fa->V(0); fc->V(1)=fa->V(1);
|
||||
fa->V(0) = nv;
|
||||
fb->V(1) = nv;
|
||||
fc->V(2) = nv;
|
||||
|
||||
fb->FFp(2)=fa->FFp(2); fb->FFi(2)=fa->FFi(2);
|
||||
fc->FFp(0)=fa->FFp(0); fc->FFi(0)=fa->FFi(0);
|
||||
|
||||
assert( fa->FFp(1)->FFp(fa->FFi(1)) == fa );
|
||||
/* */fb->FFp(2)->FFp(fb->FFi(2)) = fb;
|
||||
|
@ -501,7 +507,7 @@ static void MakePureByRefine(MeshType &m){
|
|||
static void MakePureByCatmullClark(MeshType &m){
|
||||
MakePureByRefine(m);
|
||||
MakePureByRefine(m);
|
||||
// et-voilà!!!
|
||||
// et-voil‡!!!
|
||||
}
|
||||
|
||||
// Helper funcion:
|
||||
|
|
Loading…
Reference in New Issue