mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-25 04:50:06 +00:00
HbrFace::Unrefine() needs to work with new face allocation strategy.
This commit is contained in:
parent
59edf56416
commit
0866814fb3
@ -740,13 +740,21 @@ void
|
||||
HbrFace<T>::Unrefine() {
|
||||
// Delete the children, via the mesh (so that the mesh loses
|
||||
// references to the children)
|
||||
if (children) {
|
||||
if (children.children) {
|
||||
int nchildren = mesh->GetSubdivision()->GetFaceChildrenCount(nvertices);
|
||||
for (int i = 0; i < nchildren; ++i) {
|
||||
if (children[i]) mesh->DeleteFace(children[i]);
|
||||
if (nchildren > 4) {
|
||||
for (int i = 0; i < nchildren; ++i) {
|
||||
if (children.extrachildren[i]) mesh->DeleteFace(children.extrachildren[i]);
|
||||
}
|
||||
delete[] children.extrachildren;
|
||||
children.extrachildren = 0;
|
||||
} else {
|
||||
for (int i = 0; i < nchildren; ++i) {
|
||||
if ((*children.children)[i]) mesh->DeleteFace((*children.children)[i]);
|
||||
}
|
||||
mesh->DeleteFaceChildren(children.children);
|
||||
children.children = 0;
|
||||
}
|
||||
delete[] children;
|
||||
children = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user