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

Method onCameraScopeQuery

Engine/source/scene/sceneObject.cpp:777–802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

775}
776
777void SceneObject::onCameraScopeQuery( NetConnection* connection, CameraScopeQuery* query )
778{
779 SceneManager* sceneManager = getSceneManager();
780 GameConnection* conn = dynamic_cast<GameConnection*> (connection);
781 if (conn && (query->visibleDistance = conn->getVisibleGhostDistance()) == 0.0f)
782 if ((query->visibleDistance = sceneManager->getVisibleGhostDistance()) == 0.0f)
783 query->visibleDistance = sceneManager->getVisibleDistance();
784
785 // Object itself is in scope.
786
787 if( this->isScopeable() )
788 connection->objectInScope( this );
789
790 // If we're mounted to something, that object is in scope too.
791
792 if( isMounted() )
793 connection->objectInScope( mMount.object );
794
795 // If we're added to a scene graph, let the graph do the scene scoping.
796 // Otherwise just put everything in the server container in scope.
797
798 if( getSceneManager() )
799 getSceneManager()->scopeScene( query, connection );
800 else
801 gServerContainer.findObjects( 0xFFFFFFFF, scopeCallback, connection );
802}
803
804//-----------------------------------------------------------------------------
805

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