#include <BaseNode.hh>
Public Member Functions | |
virtual | ~BaseNode () |
virtual void | AddChild (NodePtr _child) override |
Add the given node to this node. If the given node is already a child, no work will be done. More... | |
virtual NodePtr | ChildById (unsigned int _id) const override |
Get node with given ID. If no child exists with given ID, NULL will be returned. More... | |
virtual NodePtr | ChildByIndex (unsigned int _index) const override |
Get node at given index. If no child exists at given index, NULL will be returned. More... | |
virtual NodePtr | ChildByName (const std::string &_name) const override |
Get node with given name. If no child exists with given name, NULL will be returned. More... | |
virtual unsigned int | ChildCount () const override |
Get number of child nodes. More... | |
virtual void | Destroy () override |
Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. More... | |
virtual bool | HasChild (ConstNodePtr _child) const override |
Determine if given node is an attached child. More... | |
virtual bool | HasChildId (unsigned int _id) const override |
Determine if node with given ID is an attached child. More... | |
virtual bool | HasChildName (const std::string &_name) const override |
Determine if node with given name is an attached child. More... | |
virtual bool | HasUserData (const std::string &_key) const override |
Check if node has custom data. More... | |
virtual bool | InheritScale () const override=0 |
Determine if this node inherits scale from this parent. More... | |
virtual math::Pose3d | InitialLocalPose () const override |
Get the initial local pose. More... | |
virtual math::Pose3d | LocalPose () const override |
Get the local pose. More... | |
virtual math::Vector3d | LocalPosition () const override |
Get the local position. More... | |
virtual math::Quaterniond | LocalRotation () const override |
Get the local rotation. More... | |
virtual math::Vector3d | LocalScale () const override=0 |
Get the local scale. More... | |
virtual math::Vector3d | Origin () const override |
Get position of origin. More... | |
virtual NodePtr | Parent () const override=0 |
Get the parent Node. More... | |
virtual void | PreRender () override |
Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender. More... | |
virtual NodePtr | RemoveChild (NodePtr _child) override |
Remove (detach) the given node from this node. If the given node is not a child of this node, no work will be done. More... | |
virtual NodePtr | RemoveChildById (unsigned int _id) override |
Remove (detach) the node with the given ID from this node. If the specified node is not a child of this node, no work will be done. More... | |
virtual NodePtr | RemoveChildByIndex (unsigned int _index) override |
Remove (detach) the node at the given index from this node. If the specified node is not a child of this node, no work will be done. More... | |
virtual NodePtr | RemoveChildByName (const std::string &_name) override |
Remove (detach) the node with the given name from this node. If the specified node is not a child of this node, no work will be done. More... | |
virtual void | RemoveChildren () override |
Remove all child nodes from this node This detaches all the child nodes but does not destroy them. More... | |
virtual void | RemoveParent () override |
Detach this Node from its parent. If this Node does not have a parent, no work will be done. More... | |
virtual void | Scale (const math::Vector3d &_scale) override |
Scale the current scale by the given scalars. More... | |
virtual void | Scale (double _scale) override |
Scale the current scale by the given scalar. The given scalar will be assigned to the x, y, and z coordinates. More... | |
virtual void | Scale (double _x, double _y, double _z) override |
Scale the current scale by the given scalars. More... | |
virtual void | SetLocalPose (const math::Pose3d &_pose) override |
Set the local pose. More... | |
virtual void | SetLocalPosition (const math::Vector3d &_position) override |
Set the local position. More... | |
virtual void | SetLocalPosition (double _x, double _y, double _z) override |
Set the local position. More... | |
virtual void | SetLocalRotation (const math::Quaterniond &_rotation) override |
Set the local rotation. More... | |
virtual void | SetLocalRotation (double _r, double _p, double _y) override |
Set the local rotation. More... | |
virtual void | SetLocalRotation (double _w, double _x, double _y, double _z) override |
Set the local rotation. More... | |
virtual void | SetLocalScale (const math::Vector3d &_scale) override |
Set the local scale. More... | |
virtual void | SetLocalScale (double _scale) override |
Set the local scale. The given scale will be assigned to the x, y, and z coordinates. More... | |
virtual void | SetLocalScale (double _x, double _y, double _z) override |
Set the local scale. More... | |
virtual void | SetOrigin (const math::Vector3d &_origin) override |
Set position of origin. The position should be relative to the original origin of the geometry. More... | |
virtual void | SetOrigin (double _x, double _y, double _z) override |
Set position of origin. The position should be relative to the original origin of the geometry. More... | |
virtual void | SetUserData (const std::string &_key, Variant _value) override |
Store any custom data associated with this node. More... | |
virtual void | SetWorldPose (const math::Pose3d &_pose) override |
Set the world pose. More... | |
virtual void | SetWorldPosition (const math::Vector3d &_position) override |
Set the world position. More... | |
virtual void | SetWorldPosition (double _x, double _y, double _z) override |
Set the world position. More... | |
virtual void | SetWorldRotation (const math::Quaterniond &_rotation) override |
Set the world rotation. More... | |
virtual void | SetWorldRotation (double _r, double _p, double _y) override |
Set the world rotation. More... | |
virtual void | SetWorldRotation (double _w, double _x, double _y, double _z) override |
Set the world rotation. More... | |
virtual void | SetWorldScale (const math::Vector3d &_scale) override |
Set the world scale. More... | |
virtual void | SetWorldScale (double _scale) override |
Set the world scale. The given scale will be assigned to the x, y, and z coordinates. More... | |
virtual void | SetWorldScale (double _x, double _y, double _z) override |
Set the world scale. More... | |
virtual Variant | UserData (const std::string &_key) const override |
Get custom data stored in this node. More... | |
virtual math::Pose3d | WorldPose () const override |
Get the world pose. More... | |
virtual math::Vector3d | WorldPosition () const override |
Get the world position. More... | |
virtual math::Quaterniond | WorldRotation () const override |
Get the world rotation. More... | |
virtual math::Vector3d | WorldScale () const override |
Get the world scale. More... | |
virtual math::Pose3d | WorldToLocal (const math::Pose3d &_pose) const override |
Convert given world pose to local pose. More... | |
Public Member Functions inherited from Node | |
virtual | ~Node () |
Destructor. More... | |
virtual bool | HasParent () const =0 |
Determine if this Node is attached to another Node. More... | |
virtual void | SetInheritScale (bool _inherit)=0 |
Specify if this node inherits scale from its parent. More... | |
Public Member Functions inherited from Object | |
virtual | ~Object () |
Destructor. More... | |
virtual unsigned int | Id () const =0 |
Get the object ID. This ID will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. More... | |
virtual std::string | Name () const =0 |
Get the object name. This name will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. More... | |
virtual void | PostRender ()=0 |
Post process this object and any of its children after rendering. More... | |
virtual ScenePtr | Scene () const =0 |
Get the Scene that created this object. More... | |
Protected Member Functions | |
BaseNode () | |
virtual bool | AttachChild (NodePtr _child)=0 |
virtual NodeStorePtr | Children () const =0 |
virtual bool | DetachChild (NodePtr _child)=0 |
virtual void | PreRenderChildren () |
virtual math::Pose3d | RawLocalPose () const =0 |
virtual void | SetLocalScaleImpl (const math::Vector3d &_scale)=0 |
Implementation of the SetLocalScale function. More... | |
virtual void | SetRawLocalPose (const math::Pose3d &_pose)=0 |
Protected Attributes | |
gz::math::Pose3d | initialLocalPose |
Initial local pose for this node. More... | |
bool | initialLocalPoseSet = false |
Flag to indicate whether initial local pose is set for this node. More... | |
math::Vector3d | origin |
std::map< std::string, Variant > | userData |
A map of custom key value data. More... | |
Constructor & Destructor Documentation
◆ BaseNode()
|
protected |
◆ ~BaseNode()
|
virtual |
Member Function Documentation
◆ AddChild()
|
overridevirtual |
Add the given node to this node. If the given node is already a child, no work will be done.
- Parameters
-
[in] _child Child node to be added
Implements Node.
◆ AttachChild()
|
protectedpure virtual |
◆ ChildById()
|
overridevirtual |
Get node with given ID. If no child exists with given ID, NULL will be returned.
- Parameters
-
[in] _id ID of the desired node
- Returns
- The specified node
Implements Node.
◆ ChildByIndex()
|
overridevirtual |
Get node at given index. If no child exists at given index, NULL will be returned.
- Parameters
-
[in] _index Index of the desired node
- Returns
- The specified node
Implements Node.
◆ ChildByName()
|
overridevirtual |
Get node with given name. If no child exists with given name, NULL will be returned.
- Parameters
-
[in] _name Name of the desired node
- Returns
- The specified node
Implements Node.
◆ ChildCount()
|
overridevirtual |
◆ Children()
|
protectedpure virtual |
◆ Destroy()
|
overridevirtual |
Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior.
Implements Object.
Reimplemented in Ogre2Camera, OgreCamera, Ogre2Light, BaseVisual< Ogre2Node >, BaseVisual< OgreNode >, OgreThermalCamera, OgreLight, Ogre2GpuRays, OgreGpuRays, Ogre2ThermalCamera, OgreWideAngleCamera, Ogre2SegmentationCamera, Ogre2BoundingBoxCamera, BaseJointVisual< OgreVisual >, BaseJointVisual< Ogre2Visual >, Ogre2COMVisual, Ogre2InertiaVisual, Ogre2Node, OgreLidarVisual, Ogre2LidarVisual, OgreNode, BaseLidarVisual< OgreVisual >, BaseLidarVisual< Ogre2Visual >, Ogre2ParticleEmitter, BaseArrowVisual< OgreVisual >, BaseArrowVisual< Ogre2Visual >, BaseAxisVisual< OgreVisual >, and BaseAxisVisual< Ogre2Visual >.
◆ DetachChild()
|
protectedpure virtual |
◆ HasChild()
|
overridevirtual |
Determine if given node is an attached child.
- Returns
- True if given node is an attached child
Implements Node.
◆ HasChildId()
|
overridevirtual |
Determine if node with given ID is an attached child.
- Parameters
-
[in] _id ID of the node in question
- Returns
- True if node with given ID is an attached child
Implements Node.
◆ HasChildName()
|
overridevirtual |
Determine if node with given name is an attached child.
- Parameters
-
[in] _name Name of the node in question
- Returns
- True if node with given name is an attached child
Implements Node.
◆ HasUserData()
|
overridevirtual |
Check if node has custom data.
- Parameters
-
[in] _key Unique key
- Returns
- True if node has custom data with the specified key
Implements Node.
◆ InheritScale()
|
overridepure virtual |
Determine if this node inherits scale from this parent.
- Returns
- True if this node inherits scale from this parent
Implements Node.
◆ InitialLocalPose()
|
overridevirtual |
◆ LocalPose()
|
overridevirtual |
Get the local pose.
- Returns
- The local pose
Implements Node.
Reimplemented in BaseVisual< Ogre2Node >, and BaseVisual< OgreNode >.
◆ LocalPosition()
|
overridevirtual |
◆ LocalRotation()
|
overridevirtual |
◆ LocalScale()
|
overridepure virtual |
Get the local scale.
- Returns
- The local scale
Implements Node.
Implemented in BaseAxisVisual< OgreVisual >, and BaseAxisVisual< Ogre2Visual >.
◆ Origin()
|
overridevirtual |
◆ Parent()
|
overridepure virtual |
◆ PreRender()
|
overridevirtual |
Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender.
Implements Object.
Reimplemented in BaseVisual< Ogre2Node >, BaseVisual< OgreNode >, OgreWideAngleCamera, OgreThermalCamera, BaseCamera< Ogre2Sensor >, BaseCamera< OgreSensor >, Ogre2GpuRays, OgreGpuRays, Ogre2ThermalCamera, Ogre2SegmentationCamera, Ogre2BoundingBoxCamera, BaseGizmoVisual< OgreVisual >, BaseGizmoVisual< Ogre2Visual >, OgreCOMVisual, OgreInertiaVisual, OgreLightVisual, BaseJointVisual< OgreVisual >, BaseJointVisual< Ogre2Visual >, Ogre2COMVisual, Ogre2InertiaVisual, Ogre2LightVisual, OgreLidarVisual, BaseCOMVisual< OgreVisual >, BaseCOMVisual< Ogre2Visual >, BaseParticleEmitter< OgreVisual >, BaseParticleEmitter< Ogre2Visual >, Ogre2LidarVisual, BaseInertiaVisual< OgreVisual >, BaseInertiaVisual< Ogre2Visual >, BaseLightVisual< OgreVisual >, BaseLightVisual< Ogre2Visual >, OgreProjector, Ogre2Projector, BaseLidarVisual< OgreVisual >, and BaseLidarVisual< Ogre2Visual >.
◆ PreRenderChildren()
|
protectedvirtual |
Reimplemented in BaseVisual< Ogre2Node >, and BaseVisual< OgreNode >.
◆ RawLocalPose()
|
protectedpure virtual |
◆ RemoveChild()
Remove (detach) the given node from this node. If the given node is not a child of this node, no work will be done.
- Parameters
-
[in] _child Child node to be removed
- Returns
- The removed child node
Implements Node.
◆ RemoveChildById()
|
overridevirtual |
Remove (detach) the node with the given ID from this node. If the specified node is not a child of this node, no work will be done.
- Parameters
-
[in] _id ID of the child node to be removed
- Returns
- The removed child node
Implements Node.
◆ RemoveChildByIndex()
|
overridevirtual |
Remove (detach) the node at the given index from this node. If the specified node is not a child of this node, no work will be done.
- Parameters
-
[in] _index Index of the child node to be removed
- Returns
- The removed child node
Implements Node.
◆ RemoveChildByName()
|
overridevirtual |
Remove (detach) the node with the given name from this node. If the specified node is not a child of this node, no work will be done.
- Parameters
-
[in] _name Name of the child node to be removed
- Returns
- The removed child node
Implements Node.
◆ RemoveChildren()
|
overridevirtual |
Remove all child nodes from this node This detaches all the child nodes but does not destroy them.
Implements Node.
◆ RemoveParent()
|
overridevirtual |
◆ Scale() [1/3]
|
overridevirtual |
Scale the current scale by the given scalars.
- Parameters
-
[in] _scale Scalars to alter the current scale
Implements Node.
◆ Scale() [2/3]
|
overridevirtual |
Scale the current scale by the given scalar. The given scalar will be assigned to the x, y, and z coordinates.
- Parameters
-
[in] _scale Scalar to alter the current scale
Implements Node.
◆ Scale() [3/3]
|
overridevirtual |
Scale the current scale by the given scalars.
- Parameters
-
[in] _x Scalar to alter the current x-coordinate scale [in] _y Scalar to alter the current y-coordinate scale [in] _z Scalar to alter the current z-coordinate scale
Implements Node.
◆ SetLocalPose()
|
overridevirtual |
Set the local pose.
- Parameters
-
[in] _pose New local pose
Implements Node.
Reimplemented in BaseVisual< Ogre2Node >, and BaseVisual< OgreNode >.
◆ SetLocalPosition() [1/2]
|
overridevirtual |
◆ SetLocalPosition() [2/2]
|
overridevirtual |
Set the local position.
- Parameters
-
[in] _x X-coordinate [in] _y Y-coordinate [in] _z Z-coordinate
Implements Node.
◆ SetLocalRotation() [1/3]
|
overridevirtual |
◆ SetLocalRotation() [2/3]
|
overridevirtual |
◆ SetLocalRotation() [3/3]
|
overridevirtual |
Set the local rotation.
- Parameters
-
[in] _w W-coordinate [in] _x X-coordinate [in] _y Y-coordinate [in] _z Z-coordinate
Implements Node.
◆ SetLocalScale() [1/3]
|
overridevirtual |
Set the local scale.
- Parameters
-
[in] _scale New local scale
Implements Node.
Reimplemented in BaseAxisVisual< OgreVisual >, and BaseAxisVisual< Ogre2Visual >.
◆ SetLocalScale() [2/3]
|
overridevirtual |
Set the local scale. The given scale will be assigned to the x, y, and z coordinates.
- Parameters
-
[in] _scale New local scale
Implements Node.
◆ SetLocalScale() [3/3]
|
overridevirtual |
Set the local scale.
- Parameters
-
[in] _x New x-coordinate scale [in] _y New y-coordinate scale [in] _z New z-coordinate scale
Implements Node.
◆ SetLocalScaleImpl()
|
protectedpure virtual |
◆ SetOrigin() [1/2]
|
overridevirtual |
Set position of origin. The position should be relative to the original origin of the geometry.
- Parameters
-
[in] _origin New origin position
Implements Node.
◆ SetOrigin() [2/2]
|
overridevirtual |
Set position of origin. The position should be relative to the original origin of the geometry.
- Parameters
-
[in] _x X-coordinate [in] _y Y-coordinate [in] _z Z-coordinate
Implements Node.
◆ SetRawLocalPose()
|
protectedpure virtual |
◆ SetUserData()
|
overridevirtual |
◆ SetWorldPose()
|
overridevirtual |
◆ SetWorldPosition() [1/2]
|
overridevirtual |
◆ SetWorldPosition() [2/2]
|
overridevirtual |
Set the world position.
- Parameters
-
[in] _x X-coordinate [in] _y Y-coordinate [in] _z Z-coordinate
Implements Node.
◆ SetWorldRotation() [1/3]
|
overridevirtual |
◆ SetWorldRotation() [2/3]
|
overridevirtual |
◆ SetWorldRotation() [3/3]
|
overridevirtual |
Set the world rotation.
- Parameters
-
[in] _w W-coordinate [in] _x X-coordinate [in] _y Y-coordinate [in] _z Z-coordinate
Implements Node.
◆ SetWorldScale() [1/3]
|
overridevirtual |
◆ SetWorldScale() [2/3]
|
overridevirtual |
Set the world scale. The given scale will be assigned to the x, y, and z coordinates.
- Parameters
-
[in] _scale New world scale
Implements Node.
◆ SetWorldScale() [3/3]
|
overridevirtual |
Set the world scale.
- Parameters
-
[in] _x New x-coordinate scale [in] _y New y-coordinate scale [in] _z New z-coordinate scale
Implements Node.
◆ UserData()
|
overridevirtual |
Get custom data stored in this node.
- Parameters
-
[in] _key Unique key
- Returns
- Value in any type. If _key does not exist for the node, an empty variant is returned (i.e., no data).
Implements Node.
◆ WorldPose()
|
overridevirtual |
◆ WorldPosition()
|
overridevirtual |
◆ WorldRotation()
|
overridevirtual |
◆ WorldScale()
|
overridevirtual |
◆ WorldToLocal()
|
overridevirtual |
Convert given world pose to local pose.
- Parameters
-
[in] _pose World pose to be converted
Implements Node.
Member Data Documentation
◆ initialLocalPose
|
protected |
Initial local pose for this node.
◆ initialLocalPoseSet
|
protected |
Flag to indicate whether initial local pose is set for this node.
◆ origin
|
protected |
◆ userData
|
protected |
A map of custom key value data.
The documentation for this class was generated from the following file: