Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/Graphs/SceneNode.cpp

Diff revisions: vs.
  @@ -44,7 +44,8 @@
44 44 F32 cameraDistance = center.distance( eye );
45 45 F32 visibilityDistance = GET_ACTIVE_SCENE()->state().getGeneralVisibility() + sphere.getRadius();
46 46 if ( distanceCheck && cameraDistance > visibilityDistance ) {
47 - if ( boundingBox.nearestDistanceFromPointSquared( eye ) > std::min( visibilityDistance, sceneRenderState.getCameraConst().getZPlanes().y ) ) {
47 + if ( boundingBox.nearestDistanceFromPointSquared( eye ) > std::min(visibilityDistance,
48 + sceneRenderState.getCameraConst().getZPlanes().y)) {
48 49 return false;
49 50 }
50 51 }
  @@ -62,8 +63,9 @@
62 63 }
63 64 }
64 65
65 - if (sgn->getComponent<RenderingComponent>()) {
66 - sgn->getComponent<RenderingComponent>()->lodLevel((cameraDistance > Config::SCENE_NODE_LOD0) ? ((cameraDistance > Config::SCENE_NODE_LOD1) ? 2 : 1) : 0);
66 + RenderingComponent* rComp = sgn->getComponent<RenderingComponent>();
67 + if (rComp) {
68 + rComp->lodLevel((cameraDistance > Config::SCENE_NODE_LOD0) ? ((cameraDistance > Config::SCENE_NODE_LOD1) ? 2 : 1) : 0);
67 69 }
68 70
69 71 return true;