#include <scene.h>

Public Types | |
| enum | Mode { POINT = GL_POINT, LINE = GL_LINE, FILL = GL_FILL } |
| enum | Face { FRONT, BACK, FRONT_AND_BACK } |
Public Member Functions | |
| Scene (const std::string &name="scene") | |
| osg::Group * | GetSceneNode () |
| Get a pointer to the internal scene node. | |
| void | SetSceneNode (osg::Group *newSceneNode) |
| void | AddDrawable (DeltaDrawable *drawable) |
| Add a DeltaDrawable to the Scene to be viewed. | |
| void | RemoveDrawable (DeltaDrawable *drawable) |
| Remove a DeltaDrawable from the Scene. | |
| void | RemoveAllDrawables () |
| clears the scene. | |
| DeltaDrawable * | GetDrawable (unsigned int i) |
| Get a handle to the DeltaDrawable with the supplied index number. | |
| void | SetRenderState (Face face, Mode mode) |
| const std::pair< Face, Mode > | GetRenderState () const |
| float | GetHeightOfTerrain (float x, float y) |
| Get the height of terrain at a given x,y. | |
| dSpaceID | GetSpaceID () const |
| Get the ODE space ID. | |
| dWorldID | GetWorldID () const |
| Get the ODE world ID. | |
| dJointGroupID | GetContactJoinGroupID () const |
| Get the ODE contact join group ID. | |
| void | SetGravity (const osg::Vec3 &gravity) |
| Set the gravity vector. | |
| void | SetGravity (float x, float y, float z) |
| Set the gravity vector. | |
| void | GetGravity (osg::Vec3 &vec) const |
| Get the gravity vector. | |
| osg::Vec3 | GetGravity () const |
| Get the gravity vector. | |
| void | GetGravity (float &x, float &y, float &z) const |
| Get the gravity vector. | |
| virtual void | OnMessage (MessageData *data) |
| Performs collision detection and updates physics. | |
| void | SetUserCollisionCallback (dNearCallback *func, void *data=0) |
| Supply a user-defined collision callback to replace the internal one. | |
| double | GetPhysicsStepSize () const |
| Get the step size of the physics. | |
| void | SetPhysicsStepSize (double stepSize=0.0) |
| |
| void | RegisterCollidable (Transformable *collidable) |
| Register a Transformable with the Scene. | |
| void | UnRegisterCollidable (Transformable *collidable) |
| UnRegister a Transformable with the Scene. | |
| Light * | GetLight (const int number) |
| Returns a pointer to the light specified by the param number. | |
| const Light * | GetLight (const int number) const |
| Light * | GetLight (const std::string &name) |
| Returns a pointer to the light specified by the current string. | |
| const Light * | GetLight (const std::string &name) const |
| void | RegisterLight (Light *light) |
| Registers a light using the light number. | |
| void | UnRegisterLight (Light *light) |
| Unreferences the current light, by number, Note: does not erase. | |
| void | UseSceneLight (bool lightState=true) |
| Use the internal scene light. | |
| unsigned int | GetDrawableIndex (const DeltaDrawable *drawable) const |
| Get the index number of the supplied drawable. | |
| unsigned int | GetNumberOfAddedDrawable () const |
| Get the number of Drawables which have been directly added to the Scene. | |
| void | EnablePaging () |
| Enables paging when called ONLY AFTER a page-able node has been added to the scene. | |
| void | DisablePaging () |
| Disables Paging, after enabled called on scene cleanup. | |
| bool | IsPagingEnabled () const |
| Returns if paging is enabled. | |
| void | SetPagingCleanup (double pCleanup) |
| Set's Slice time allocated for scene cleanup default 0.0025. | |
| double | GetPagingCleanup () |
| Get the cleanup time for paging. | |
Protected Member Functions | |
| virtual | ~Scene () |
| void | RemoveView (dtCore::View *view) |
| define the owner mView of this instance | |
| void | AddView (dtCore::View *view) |
Friends | |
| class | View |
Classes | |
| struct | CollisionData |
| The user data associated with "collision" messages. More... | |
| class | ParticleSystemFreezer |
| enum dtCore::Scene::Mode |
| enum dtCore::Scene::Face |
| dtCore::Scene::Scene | ( | const std::string & | name = "scene" |
) |
| dtCore::Scene::~Scene | ( | ) | [protected, virtual] |
| osg::Group* dtCore::Scene::GetSceneNode | ( | ) | [inline] |
Get a pointer to the internal scene node.
| void dtCore::Scene::SetSceneNode | ( | osg::Group * | newSceneNode | ) |
| void dtCore::Scene::AddDrawable | ( | DeltaDrawable * | drawable | ) |
Add a DeltaDrawable to the Scene to be viewed.
| void dtCore::Scene::RemoveDrawable | ( | DeltaDrawable * | drawable | ) |
Remove a DeltaDrawable from the Scene.
| void dtCore::Scene::RemoveAllDrawables | ( | ) |
clears the scene.
| DeltaDrawable* dtCore::Scene::GetDrawable | ( | unsigned int | i | ) | [inline] |
Get a handle to the DeltaDrawable with the supplied index number.
| float dtCore::Scene::GetHeightOfTerrain | ( | float | x, | |
| float | y | |||
| ) |
Get the height of terrain at a given x,y.
Get the height of terrain at the specified (X,Y). This essentially does an intersection check of the whole scene from (X,Y,10k) to (X,Y,-10k). Any geometry that intersects is considered the "terrain".
| x | : The X location to check for HOT | |
| y | : The Y location to check for HOT |
| dSpaceID dtCore::Scene::GetSpaceID | ( | ) | const |
Get the ODE space ID.
| dWorldID dtCore::Scene::GetWorldID | ( | ) | const |
Get the ODE world ID.
| dJointGroupID dtCore::Scene::GetContactJoinGroupID | ( | ) | const |
Get the ODE contact join group ID.
| void dtCore::Scene::SetGravity | ( | const osg::Vec3 & | gravity | ) |
Set the gravity vector.
| void dtCore::Scene::SetGravity | ( | float | x, | |
| float | y, | |||
| float | z | |||
| ) | [inline] |
Set the gravity vector.
| void dtCore::Scene::GetGravity | ( | osg::Vec3 & | vec | ) | const [inline] |
Get the gravity vector.
| osg::Vec3 dtCore::Scene::GetGravity | ( | ) | const [inline] |
Get the gravity vector.
| void dtCore::Scene::GetGravity | ( | float & | x, | |
| float & | y, | |||
| float & | z | |||
| ) | const [inline] |
Get the gravity vector.
| void dtCore::Scene::OnMessage | ( | MessageData * | data | ) | [virtual] |
| void dtCore::Scene::SetUserCollisionCallback | ( | dNearCallback * | func, | |
| void * | data = 0 | |||
| ) |
Supply a user-defined collision callback to replace the internal one.
The supplied function will be used instead of the built-in collision callback.
| func | : The function to handle collision detection | |
| data | : A void pointer to user data. This gets passed directly to func. |
| double dtCore::Scene::GetPhysicsStepSize | ( | ) | const [inline] |
Get the step size of the physics.
The physics will be updated numerous times per frame based on this number. For example, if the delta frame rate is 33ms and the step size is 2ms, the physics will be updated 16 times.
| void dtCore::Scene::SetPhysicsStepSize | ( | double | stepSize = 0.0 |
) | [inline] |
| void dtCore::Scene::RegisterCollidable | ( | Transformable * | collidable | ) |
Register a Transformable with the Scene.
| void dtCore::Scene::UnRegisterCollidable | ( | Transformable * | collidable | ) |
UnRegister a Transformable with the Scene.
| Light* dtCore::Scene::GetLight | ( | const int | number | ) | [inline] |
Returns a pointer to the light specified by the param number.
| const Light* dtCore::Scene::GetLight | ( | const int | number | ) | const [inline] |
| Light * dtCore::Scene::GetLight | ( | const std::string & | name | ) |
Returns a pointer to the light specified by the current string.
| const Light * dtCore::Scene::GetLight | ( | const std::string & | name | ) | const |
| void dtCore::Scene::RegisterLight | ( | Light * | light | ) |
Registers a light using the light number.
registers a light using the light number
| void dtCore::Scene::UnRegisterLight | ( | Light * | light | ) |
Unreferences the current light, by number, Note: does not erase.
unreferences the current light, by number, Note: does not erase
| void dtCore::Scene::UseSceneLight | ( | bool | lightState = true |
) |
Use the internal scene light.
| unsigned int dtCore::Scene::GetDrawableIndex | ( | const DeltaDrawable * | drawable | ) | const |
Get the index number of the supplied drawable.
| unsigned int dtCore::Scene::GetNumberOfAddedDrawable | ( | ) | const [inline] |
Get the number of Drawables which have been directly added to the Scene.
| void dtCore::Scene::EnablePaging | ( | ) | [inline] |
Enables paging when called ONLY AFTER a page-able node has been added to the scene.
| void dtCore::Scene::DisablePaging | ( | ) | [inline] |
Disables Paging, after enabled called on scene cleanup.
| bool dtCore::Scene::IsPagingEnabled | ( | ) | const [inline] |
Returns if paging is enabled.
| void dtCore::Scene::SetPagingCleanup | ( | double | pCleanup | ) | [inline] |
Set's Slice time allocated for scene cleanup default 0.0025.
| allocated | cleanup time in seconds |
| double dtCore::Scene::GetPagingCleanup | ( | ) | [inline] |
Get the cleanup time for paging.
| void dtCore::Scene::RemoveView | ( | dtCore::View * | view | ) | [inline, protected] |
define the owner mView of this instance
| void dtCore::Scene::AddView | ( | dtCore::View * | view | ) | [inline, protected] |
friend class View [friend] |