1
0
Fork 0

Modified the partial ssg tree deletion algorithm so it correctly preserves

subtrees that may be connected into the scene graph multiple times.
(i.e.  our random ground cover objects.)
This commit is contained in:
curt 2002-07-26 22:23:49 +00:00
parent f05e8f95e2
commit dc40db3b33

View file

@ -702,7 +702,7 @@ static int fgPartialFreeSSGtree( ssgBranch *b, int n ) {
int num_deletes = 0; int num_deletes = 0;
for ( int i = 0; i < b->getNumKids(); ++i ) { for ( int i = 0; i < b->getNumKids(); ++i ) {
ssgEntity *kid = b->getKid(i); ssgEntity *kid = b->getKid(i);
if ( kid->isAKindOf( ssgTypeBranch() ) ) { if ( kid->isAKindOf( ssgTypeBranch() ) && kid->getRef() <= 1 ) {
int result = fgPartialFreeSSGtree( (ssgBranch *)kid, n ); int result = fgPartialFreeSSGtree( (ssgBranch *)kid, n );
num_deletes += result; num_deletes += result;
n -= result; n -= result;