RigsofRods
Soft-body Physics Simulation
Public Member Functions
AngelOgre::MovableObject Class Reference

Abstract class defining a movable object in a scene. More...

#include <AngelOgre_MovableObject.h>

+ Inheritance diagram for AngelOgre::MovableObject:

Public Member Functions

const string & getName (void) const
 Returns the name of this object. More...
 
const string & getMovableType (void) const
 Returns the type name of this object. More...
 
NodegetParentNode (void) const
 Returns the node to which this object is attached. More...
 
SceneNode getParentSceneNode (void) const
 Returns the scene node to which this object is attached. More...
 
bool isParentTagPoint () const
 Gets whether the parent node is a TagPoint (or a SceneNode) More...
 
bool isAttached (void) const
 Returns true if this object is attached to a SceneNode or TagPoint. More...
 
void detachFromParent (void)
 Detaches an object from a parent SceneNode or TagPoint, if attached. More...
 
bool isInScene (void) const
 Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph. More...
 
float getBoundingRadius (void) const
 Retrieves the local axis-aligned bounding box for this object. More...
 
void setVisible (bool visible)
 Tells this object whether to be visible or not, if it has a renderable component. More...
 
bool getVisible (void) const
 Gets this object whether to be visible or not, if it has a renderable component. More...
 
bool isVisible (void) const
 Returns whether or not this object is supposed to be visible or not. More...
 
void setRenderingDistance (float dist)
 Sets the distance at which the object is no longer rendered. More...
 
float getRenderingDistance (void) const
 Gets the distance at which batches are no longer rendered. More...
 
void setRenderingMinPixelSize (float pixelSize)
 Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered. More...
 
float getRenderingMinPixelSize () const
 Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered. More...
 
void setCastShadows (bool enabled)
 Return an instance of user objects binding associated with this class. More...
 
bool getCastShadows (void) const
 Returns whether shadow casting is enabled for this object. More...
 
void setDebugDisplayEnabled (bool enabled)
 Sets whether or not the debug display of this object is enabled. More...
 
bool isDebugDisplayEnabled (void) const
 Gets whether debug display of this object is enabled. More...
 

Detailed Description

Abstract class defining a movable object in a scene.

Definition at line 14 of file AngelOgre_MovableObject.h.

Member Function Documentation

◆ detachFromParent()

void AngelOgre::MovableObject::detachFromParent ( void  )

Detaches an object from a parent SceneNode or TagPoint, if attached.

◆ getBoundingRadius()

float AngelOgre::MovableObject::getBoundingRadius ( void  ) const

Retrieves the local axis-aligned bounding box for this object.

Remarks
This bounding box is in local coordinates. Retrieves the radius of the origin-centered bounding sphere for this object.

◆ getCastShadows()

bool AngelOgre::MovableObject::getCastShadows ( void  ) const

Returns whether shadow casting is enabled for this object.

◆ getMovableType()

const string& AngelOgre::MovableObject::getMovableType ( void  ) const

Returns the type name of this object.

◆ getName()

const string& AngelOgre::MovableObject::getName ( void  ) const

Returns the name of this object.

◆ getParentNode()

Node* AngelOgre::MovableObject::getParentNode ( void  ) const

Returns the node to which this object is attached.

Remarks
A MovableObject may be attached to either a SceneNode or to a TagPoint, the latter case if it's attached to a bone on an animated entity. Both are Node subclasses so this method will return either.

◆ getParentSceneNode()

SceneNode AngelOgre::MovableObject::getParentSceneNode ( void  ) const

Returns the scene node to which this object is attached.

Remarks
A MovableObject may be attached to either a SceneNode or to a TagPoint, the latter case if it's attached to a bone on an animated entity. This method will return the scene node of the parent entity if the latter is true.

◆ getRenderingDistance()

float AngelOgre::MovableObject::getRenderingDistance ( void  ) const
inline

Gets the distance at which batches are no longer rendered.

Definition at line 90 of file AngelOgre_MovableObject.h.

◆ getRenderingMinPixelSize()

float AngelOgre::MovableObject::getRenderingMinPixelSize ( ) const

Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered.

◆ getVisible()

bool AngelOgre::MovableObject::getVisible ( void  ) const

Gets this object whether to be visible or not, if it has a renderable component.

Remarks
Returns the value set by MovableObject::setVisible only.

◆ isAttached()

bool AngelOgre::MovableObject::isAttached ( void  ) const

Returns true if this object is attached to a SceneNode or TagPoint.

◆ isDebugDisplayEnabled()

bool AngelOgre::MovableObject::isDebugDisplayEnabled ( void  ) const

Gets whether debug display of this object is enabled.

◆ isInScene()

bool AngelOgre::MovableObject::isInScene ( void  ) const

Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph.

◆ isParentTagPoint()

bool AngelOgre::MovableObject::isParentTagPoint ( ) const

Gets whether the parent node is a TagPoint (or a SceneNode)

◆ isVisible()

bool AngelOgre::MovableObject::isVisible ( void  ) const

Returns whether or not this object is supposed to be visible or not.

Remarks
Takes into account both upper rendering distance and visible flag.

◆ setCastShadows()

void AngelOgre::MovableObject::setCastShadows ( bool  enabled)

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
UserObjectBindings::setUserAny.
Return an instance of user objects binding associated with this class. You can use it to associate one or more custom objects with this class instance.
UserObjectBindings::setUserAny.
Sets whether or not this object will cast shadows.
Remarks
This setting simply allows you to turn on/off shadows for a given object. An object will not cast shadows unless the scene supports it in any case (see SceneManager::setShadowTechnique), and also the material which is in use must also have shadow casting enabled. By default all entities cast shadows. If, however, for some reason you wish to disable this for a single object then you can do so using this method.
Note
This method normally refers to objects which block the light, but since Light is also a subclass of MovableObject, in that context it means whether the light causes shadows itself.

◆ setDebugDisplayEnabled()

void AngelOgre::MovableObject::setDebugDisplayEnabled ( bool  enabled)

Sets whether or not the debug display of this object is enabled.

Remarks
Some objects aren't visible themselves but it can be useful to display a debug representation of them. Or, objects may have an additional debug display on top of their regular display. This option enables / disables that debug display. Objects that are not visible never display debug geometry regardless of this setting.

◆ setRenderingDistance()

void AngelOgre::MovableObject::setRenderingDistance ( float  dist)

Sets the distance at which the object is no longer rendered.

Note
Camera::setUseRenderingDistance() needs to be called for this parameter to be used.
Parameters
distDistance beyond which the object will not be rendered (the default is 0, which means objects are always rendered).

◆ setRenderingMinPixelSize()

void AngelOgre::MovableObject::setRenderingMinPixelSize ( float  pixelSize)

Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered.

Note
Camera::setUseMinPixelSize() needs to be called for this parameter to be used.
Parameters
pixelSizeNumber of minimum pixels (the default is 0, which means objects are always rendered).

◆ setVisible()

void AngelOgre::MovableObject::setVisible ( bool  visible)

Tells this object whether to be visible or not, if it has a renderable component.


The documentation for this class was generated from the following file: