MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / onCameraScopeQuery

Method onCameraScopeQuery

Engine/source/scene/sceneObject.cpp:671–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669}
670
671void SceneObject::onCameraScopeQuery( NetConnection* connection, CameraScopeQuery* query )
672{
673 SceneManager* sceneManager = getSceneManager();
674 GameConnection* conn = dynamic_cast<GameConnection*> (connection);
675 if (conn && (query->visibleDistance = conn->getVisibleGhostDistance()) == 0.0f)
676 if ((query->visibleDistance = sceneManager->getVisibleGhostDistance()) == 0.0f)
677 query->visibleDistance = sceneManager->getVisibleDistance();
678
679 // Object itself is in scope.
680
681 if( this->isScopeable() )
682 connection->objectInScope( this );
683
684 // If we're mounted to something, that object is in scope too.
685
686 if( isMounted() )
687 connection->objectInScope( mMount.object );
688
689 // If we're added to a scene graph, let the graph do the scene scoping.
690 // Otherwise just put everything in the server container in scope.
691
692 if( getSceneManager() )
693 getSceneManager()->scopeScene( query, connection );
694 else
695 gServerContainer.findObjects( 0xFFFFFFFF, scopeCallback, connection );
696}
697
698//-----------------------------------------------------------------------------
699

Callers

nothing calls this directly

Calls 6

getVisibleDistanceMethod · 0.80
isScopeableMethod · 0.80
objectInScopeMethod · 0.80
scopeSceneMethod · 0.80
findObjectsMethod · 0.80

Tested by

no test coverage detected