public override void FindVisibleObjects( Camera cam, bool onlyShadowCasters )
{
GetRenderQueue().Clear();
boxList.Clear();
visible.Clear();
if ( cullCamera )
{
Camera c = cameraList[ "CullCamera" ];
if ( c != null )
{
cameraInProgress = cameraList[ "CullCamera" ];
}
}
numObjects = 0;
//walk the octree, adding all visible Octreenodes nodes to the render queue.
WalkOctree( (OctreeCamera)cam, GetRenderQueue(), octree, false );
// Show the octree boxes & cull camera if required
if ( this.ShowBoundingBoxes || cullCamera )
{
if ( this.ShowBoundingBoxes )
{
for ( int i = 0; i < boxList.Count; i++ )
{
WireBoundingBox box = (WireBoundingBox)boxList[ i ];
GetRenderQueue().AddRenderable( box );
}
}
if ( cullCamera )
{
OctreeCamera c = (OctreeCamera)GetCamera( "CullCamera" );
if ( c != null )
{
GetRenderQueue().AddRenderable( c );
}
}
}
}