Minor cleanup for previous merge
This commit is contained in:
parent
10ee96d839
commit
798ec94b11
@ -115,15 +115,18 @@ public class Node extends Spatial implements Savable {
|
|||||||
child.setLightListRefresh();
|
child.setLightListRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure next updateGeometricState() visits this branch
|
||||||
|
// to update lights.
|
||||||
Spatial p = parent;
|
Spatial p = parent;
|
||||||
while (p != null) {
|
while (p != null) {
|
||||||
if (p.refreshFlags != 0) {
|
if (p.refreshFlags != 0) {
|
||||||
return; //any refresh flag is sufficient, as each propagates to the root Node
|
// any refresh flag is sufficient,
|
||||||
|
// as each propagates to the root Node
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
p.refreshFlags |= RF_CHILD_LIGHTLIST;
|
p.refreshFlags |= RF_CHILD_LIGHTLIST;
|
||||||
p = p.parent;
|
p = p.parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -164,8 +167,10 @@ public class Node extends Spatial implements Savable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateGeometricState(){
|
public void updateGeometricState(){
|
||||||
boolean somethingToRefresh = (refreshFlags != 0);
|
if (refreshFlags == 0) {
|
||||||
if (!somethingToRefresh) return;
|
// This branch has no geometric state that requires updates.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((refreshFlags & RF_LIGHTLIST) != 0){
|
if ((refreshFlags & RF_LIGHTLIST) != 0){
|
||||||
updateWorldLightList();
|
updateWorldLightList();
|
||||||
@ -178,6 +183,7 @@ public class Node extends Spatial implements Savable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
refreshFlags &= ~RF_CHILD_LIGHTLIST;
|
refreshFlags &= ~RF_CHILD_LIGHTLIST;
|
||||||
|
|
||||||
if (!children.isEmpty()) {
|
if (!children.isEmpty()) {
|
||||||
// the important part- make sure child geometric state is refreshed
|
// the important part- make sure child geometric state is refreshed
|
||||||
// first before updating own world bound. This saves
|
// first before updating own world bound. This saves
|
||||||
|
Loading…
x
Reference in New Issue
Block a user