#include <deltadrawable.h>

Public Member Functions | |
| virtual osg::Node * | GetOSGNode ()=0 |
| Get the internal node. | |
| virtual const osg::Node * | GetOSGNode () const =0 |
| virtual void | AddedToScene (Scene *scene) |
| Supply the Scene this Drawable has been added to. | |
| virtual void | SetParent (DeltaDrawable *parent) |
| Override function for derived object to know when attaching to scene. | |
| DeltaDrawable * | GetParent () |
| const DeltaDrawable * | GetParent () const |
| Scene * | GetSceneParent () |
| Get a pointer to the Scene this Drawable has been added to. | |
| const Scene * | GetSceneParent () const |
| virtual bool | AddChild (DeltaDrawable *child) |
| Add a child to this DeltaDrawable. | |
| virtual void | RemoveChild (DeltaDrawable *child) |
| Remove a DeltaDrawable child. | |
| void | Emancipate () |
| Remove this DeltaDrawable from it's parent. | |
| unsigned int | GetNumChildren () const |
| Return the number of DeltaDrawable children added. | |
| DeltaDrawable * | GetChild (unsigned int idx) |
| Get the child specified by idx (0 to number of children-1). | |
| const DeltaDrawable * | GetChild (unsigned int idx) const |
| Get the child specified by idx (0 to number of children-1). | |
| unsigned int | GetChildIndex (const DeltaDrawable *child) const |
| Get the index number of child. | |
| bool | CanBeChild (DeltaDrawable *child) const |
| Check if the supplied DeltaDrawable can actually be a chil of this instance. | |
| virtual void | RenderProxyNode (bool enable=true) |
| void | GetBoundingSphere (osg::Vec3 *center, float *radius) |
| Get the bounding sphere information for this Drawable. | |
Protected Member Functions | |
| DeltaDrawable (const std::string &name="DeltaDrawable") | |
| virtual | ~DeltaDrawable () |
| osg::Node * | GetProxyNode () |
| const osg::Node * | GetProxyNode () const |
| void | SetProxyNode (osg::Node *proxyNode) |
| virtual void | OnOrphaned () |
| Callback which is called when this drawable's parent is removed. | |
A Drawable is a virtual base class which cannot be created, but rather must be derived. The derived class must instantiate the mNode protected variable which is some type of osg::Node. A Drawable instance must be added to the Scene for it to be rendered.
| DeltaDrawable::DeltaDrawable | ( | const std::string & | name = "DeltaDrawable" |
) | [protected] |
| DeltaDrawable::~DeltaDrawable | ( | ) | [protected, virtual] |
| virtual osg::Node* dtCore::DeltaDrawable::GetOSGNode | ( | ) | [pure virtual] |
Get the internal node.
Returns this object's OpenSceneGraph node.
Implemented in dtABC::Action, dtABC::AutoTrigger, dtABC::Trigger, dtAI::WaypointManager, dtCore::EffectManager, dtCore::EnvEffect, dtCore::Environment, dtCore::Transformable, dtCore::Tripod, dtDAL::ActorProxyIcon::BillBoardDrawable, and dtGUI::CEUIDrawable.
| virtual const osg::Node* dtCore::DeltaDrawable::GetOSGNode | ( | ) | const [pure virtual] |
| void DeltaDrawable::AddedToScene | ( | Scene * | scene | ) | [virtual] |
Supply the Scene this Drawable has been added to.
Notifies this drawable object that it has been added to a scene.
This is typically called from Scene::AddDrawable().
This method will iterate through the list of children DeltaDrawable's (if any) and call AddedToScene() with the supplied Scene.
| scene | the scene to which this drawable object has been added. Note: Can be NULL. |
Reimplemented in dtActors::Cal3DGameActor, dtActors::GameMeshActor, dtActors::MeshTerrainActor, dtCore::Camera, dtCore::Environment, dtCore::Light, and dtCore::Transformable.
| virtual void dtCore::DeltaDrawable::SetParent | ( | DeltaDrawable * | parent | ) | [inline, virtual] |
Override function for derived object to know when attaching to scene.
| DeltaDrawable* dtCore::DeltaDrawable::GetParent | ( | ) | [inline] |
Reimplemented in dtABC::BezierControlPoint, and dtABC::MotionAction.
| const DeltaDrawable* dtCore::DeltaDrawable::GetParent | ( | ) | const [inline] |
Reimplemented in dtABC::BezierControlPoint, and dtABC::MotionAction.
| Scene* dtCore::DeltaDrawable::GetSceneParent | ( | ) | [inline] |
Get a pointer to the Scene this Drawable has been added to.
| const Scene* dtCore::DeltaDrawable::GetSceneParent | ( | ) | const [inline] |
| bool DeltaDrawable::AddChild | ( | DeltaDrawable * | child | ) | [virtual] |
Add a child to this DeltaDrawable.
This virtual method can be overwritten to perform specific functionality.
The default method will store the child in a list and set the child's parent.
| child | : The child to add to this Drawable |
Reimplemented in dtCore::Environment, dtCore::Light, dtCore::Transformable, dtDAL::ActorProxyIcon::BillBoardDrawable, and dtGUI::CEUIDrawable.
| void DeltaDrawable::RemoveChild | ( | DeltaDrawable * | child | ) | [virtual] |
Remove a DeltaDrawable child.
Remove a child from this DeltaDrawable. This will detach the child from its parent so that its free to be repositioned on its own.
| *child | : The child DeltaDrawable to be removed |
Reimplemented in dtCore::Environment, dtCore::Light, dtCore::Transformable, and dtDAL::ActorProxyIcon::BillBoardDrawable.
| void DeltaDrawable::Emancipate | ( | ) |
Remove this DeltaDrawable from it's parent.
Remove this DeltaDrawable from it's parent DeltaDrawable if it has one.
Each DeltaDrawable may have only one parent and it must be removed from it's parent before adding it as a child to another.
| unsigned int dtCore::DeltaDrawable::GetNumChildren | ( | ) | const [inline] |
Return the number of DeltaDrawable children added.
| DeltaDrawable* dtCore::DeltaDrawable::GetChild | ( | unsigned int | idx | ) | [inline] |
Get the child specified by idx (0 to number of children-1).
| const DeltaDrawable* dtCore::DeltaDrawable::GetChild | ( | unsigned int | idx | ) | const [inline] |
Get the child specified by idx (0 to number of children-1).
| unsigned int DeltaDrawable::GetChildIndex | ( | const DeltaDrawable * | child | ) | const |
Get the index number of child.
Return a value between 0 and the number of children-1 if found, if not found then return the number of children.
Return a value between 0 and the number of children-1 if found, if not found then return the number of children.
| bool DeltaDrawable::CanBeChild | ( | DeltaDrawable * | child | ) | const |
Check if the supplied DeltaDrawable can actually be a chil of this instance.
| child | : The child to test |
| *child | : The candidate child to be tested |
| void DeltaDrawable::RenderProxyNode | ( | bool | enable = true |
) | [virtual] |
Reimplemented in dtABC::BezierController, and dtCore::Transformable.
| void DeltaDrawable::GetBoundingSphere | ( | osg::Vec3 * | center, | |
| float * | radius | |||
| ) |
Get the bounding sphere information for this Drawable.
| center | : pointer to fill out with the sphere's center position | |
| radius | : float pointer to fill out with the sphere's radius |
| osg::Node* dtCore::DeltaDrawable::GetProxyNode | ( | ) | [inline, protected] |
| const osg::Node* dtCore::DeltaDrawable::GetProxyNode | ( | ) | const [inline, protected] |
| void DeltaDrawable::SetProxyNode | ( | osg::Node * | proxyNode | ) | [protected] |
| void DeltaDrawable::OnOrphaned | ( | ) | [protected, virtual] |
Callback which is called when this drawable's parent is removed.