Added check with the new end and avoided dangerous updating of already updated pointers
This commit is contained in:
parent
ef0a22c229
commit
5670460684
|
@ -24,6 +24,10 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.34 2006/11/28 22:34:28 cignoni
|
||||||
|
Added default constructor with null initialization to adjacency members.
|
||||||
|
AddFaces and AddVertices NEED to know if the topology is correctly computed to update it.
|
||||||
|
|
||||||
Revision 1.33 2006/11/13 13:12:27 ponchio
|
Revision 1.33 2006/11/13 13:12:27 ponchio
|
||||||
Removed a couple of useless assert.
|
Removed a couple of useless assert.
|
||||||
|
|
||||||
|
@ -171,6 +175,7 @@ namespace vcg {
|
||||||
void Clear(){newBase=oldBase=newEnd=oldEnd=0;preventUpdateFlag=false;};
|
void Clear(){newBase=oldBase=newEnd=oldEnd=0;preventUpdateFlag=false;};
|
||||||
void Update(SimplexPointerType &vp)
|
void Update(SimplexPointerType &vp)
|
||||||
{
|
{
|
||||||
|
if(vp>=newBase && vp<newEnd) return;
|
||||||
assert(vp>=oldBase);
|
assert(vp>=oldBase);
|
||||||
assert(vp<oldEnd);
|
assert(vp<oldEnd);
|
||||||
vp=newBase+(vp-oldBase);
|
vp=newBase+(vp-oldBase);
|
||||||
|
@ -206,6 +211,7 @@ namespace vcg {
|
||||||
m.vn+=n;
|
m.vn+=n;
|
||||||
|
|
||||||
pu.newBase = &*m.vert.begin();
|
pu.newBase = &*m.vert.begin();
|
||||||
|
pu.newEnd = &m.vert.back()+1;
|
||||||
if(pu.NeedUpdate())
|
if(pu.NeedUpdate())
|
||||||
{
|
{
|
||||||
FaceIterator fi;
|
FaceIterator fi;
|
||||||
|
@ -280,6 +286,7 @@ namespace vcg {
|
||||||
m.fn+=n;
|
m.fn+=n;
|
||||||
|
|
||||||
pu.newBase = &*m.face.begin();
|
pu.newBase = &*m.face.begin();
|
||||||
|
pu.newEnd = &m.face.back()+1;
|
||||||
|
|
||||||
if(pu.NeedUpdate())
|
if(pu.NeedUpdate())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue