#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. | |
virtual NodePtr | ChildById (unsigned int _id) const override |
Get node with given ID. If no child exists with given ID, NULL will be returned. | |
virtual NodePtr | ChildByIndex (unsigned int _index) const override |
Get node at given index. If no child exists at given index, NULL will be returned. | |
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. | |
virtual unsigned int | ChildCount () const override |
Get number of child nodes. | |
virtual void | Destroy () override |
Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. | |
virtual bool | HasChild (ConstNodePtr _child) const override |
Determine if given node is an attached child. | |
virtual bool | HasChildId (unsigned int _id) const override |
Determine if node with given ID is an attached child. | |
virtual bool | HasChildName (const std::string &_name) const override |
Determine if node with given name is an attached child. | |
virtual bool | HasUserData (const std::string &_key) const override |
Check if node has custom data. | |
virtual bool | InheritScale () const override=0 |
Determine if this node inherits scale from this parent. | |
virtual math::Pose3d | InitialLocalPose () const override |
Get the initial local pose. | |
virtual math::Pose3d | LocalPose () const override |
Get the local pose. | |
virtual math::Vector3d | LocalPosition () const override |
Get the local position. | |
virtual math::Quaterniond | LocalRotation () const override |
Get the local rotation. | |
virtual math::Vector3d | LocalScale () const override=0 |
Get the local scale. | |
virtual math::Vector3d | Origin () const override |
Get position of origin. | |
virtual NodePtr | Parent () const override=0 |
Get the parent Node. | |
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. | |
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. | |
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. | |
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. | |
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. | |
virtual void | RemoveChildren () override |
Remove all child nodes from this node This detaches all the child nodes but does not destroy them. | |
virtual void | RemoveParent () override |
Detach this Node from its parent. If this Node does not have a parent, no work will be done. | |
virtual void | Scale (const math::Vector3d &_scale) override |
Scale the current scale by the given scalars. | |
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. | |
virtual void | Scale (double _x, double _y, double _z) override |
Scale the current scale by the given scalars. | |
virtual void | SetLocalPose (const math::Pose3d &_pose) override |
Set the local pose. | |
virtual void | SetLocalPosition (const math::Vector3d &_position) override |
Set the local position. | |
virtual void | SetLocalPosition (double _x, double _y, double _z) override |
Set the local position. | |
virtual void | SetLocalRotation (const math::Quaterniond &_rotation) override |
Set the local rotation. | |
virtual void | SetLocalRotation (double _r, double _p, double _y) override |
Set the local rotation. | |
virtual void | SetLocalRotation (double _w, double _x, double _y, double _z) override |
Set the local rotation. | |
virtual void | SetLocalScale (const math::Vector3d &_scale) override |
Set the local scale. | |
virtual void | SetLocalScale (double _scale) override |
Set the local scale. The given scale will be assigned to the x, y, and z coordinates. | |
virtual void | SetLocalScale (double _x, double _y, double _z) override |
Set the local scale. | |
virtual void | SetOrigin (const math::Vector3d &_origin) override |
Set position of origin. The position should be relative to the original origin of the geometry. | |
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. | |
virtual void | SetUserData (const std::string &_key, Variant _value) override |
Store any custom data associated with this node. | |
virtual void | SetWorldPose (const math::Pose3d &_pose) override |
Set the world pose. | |
virtual void | SetWorldPosition (const math::Vector3d &_position) override |
Set the world position. | |
virtual void | SetWorldPosition (double _x, double _y, double _z) override |
Set the world position. | |
virtual void | SetWorldRotation (const math::Quaterniond &_rotation) override |
Set the world rotation. | |
virtual void | SetWorldRotation (double _r, double _p, double _y) override |
Set the world rotation. | |
virtual void | SetWorldRotation (double _w, double _x, double _y, double _z) override |
Set the world rotation. | |
virtual void | SetWorldScale (const math::Vector3d &_scale) override |
Set the world scale. | |
virtual void | SetWorldScale (double _scale) override |
Set the world scale. The given scale will be assigned to the x, y, and z coordinates. | |
virtual void | SetWorldScale (double _x, double _y, double _z) override |
Set the world scale. | |
virtual Variant | UserData (const std::string &_key) const override |
Get custom data stored in this node. | |
virtual math::Pose3d | WorldPose () const override |
Get the world pose. | |
virtual math::Vector3d | WorldPosition () const override |
Get the world position. | |
virtual math::Quaterniond | WorldRotation () const override |
Get the world rotation. | |
virtual math::Vector3d | WorldScale () const override |
Get the world scale. | |
virtual math::Pose3d | WorldToLocal (const math::Pose3d &_pose) const override |
Convert given world pose to local pose. | |
Public Member Functions inherited from Node | |
virtual | ~Node () |
Destructor. | |
virtual bool | HasParent () const =0 |
Determine if this Node is attached to another Node. | |
virtual void | SetInheritScale (bool _inherit)=0 |
Specify if this node inherits scale from its parent. | |
Public Member Functions inherited from Object | |
virtual | ~Object () |
Destructor. | |
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. | |
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. | |
virtual void | PostRender ()=0 |
Post process this object and any of its children after rendering. | |
virtual ScenePtr | Scene () const =0 |
Get the Scene that created this object. | |
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. | |
virtual void | SetRawLocalPose (const math::Pose3d &_pose)=0 |
Protected Attributes | |
gz::math::Pose3d | initialLocalPose |
Initial local pose for this node. | |
bool | initialLocalPoseSet = false |
Flag to indicate whether initial local pose is set for this node. | |
math::Vector3d | origin |
std::map< std::string, Variant > | userData |
A map of custom key value data. | |
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.
References std::endl(), and gzerr.
◆ 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 BaseArrowVisual< Ogre2Visual >, BaseArrowVisual< OgreVisual >, BaseAxisVisual< Ogre2Visual >, BaseAxisVisual< OgreVisual >, BaseJointVisual< Ogre2Visual >, BaseJointVisual< OgreVisual >, BaseLidarVisual< Ogre2Visual >, BaseLidarVisual< OgreVisual >, BaseVisual< Ogre2Node >, BaseVisual< OgreNode >, OgreCamera, OgreDepthCamera, OgreGpuRays, OgreLidarVisual, OgreLight, OgreNode, OgreThermalCamera, OgreWideAngleCamera, Ogre2BoundingBoxCamera, Ogre2Camera, Ogre2COMVisual, Ogre2DepthCamera, Ogre2GpuRays, Ogre2InertiaVisual, Ogre2LidarVisual, Ogre2Light, Ogre2Node, Ogre2ParticleEmitter, Ogre2SegmentationCamera, Ogre2ThermalCamera, and Ogre2WideAngleCamera.
◆ 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 |
◆ InitialLocalPose()
|
overridevirtual |
◆ LocalPose()
|
overridevirtual |
Get the local pose.
- Returns
- The local pose
Implements Node.
Reimplemented in BaseVisual< Ogre2Node >, and BaseVisual< OgreNode >.
References Pose3< typename T >::Pos(), and Pose3< typename T >::Rot().
◆ LocalPosition()
|
overridevirtual |
◆ LocalRotation()
|
overridevirtual |
◆ LocalScale()
|
overridepure virtual |
Get the local scale.
- Returns
- The local scale
Implements Node.
Implemented in BaseAxisVisual< Ogre2Visual >, BaseAxisVisual< OgreVisual >, OgreNode, and Ogre2Node.
◆ 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 BaseCamera< Ogre2Sensor >, BaseCamera< OgreSensor >, BaseCOMVisual< Ogre2Visual >, BaseCOMVisual< OgreVisual >, BaseGizmoVisual< Ogre2Visual >, BaseGizmoVisual< OgreVisual >, BaseInertiaVisual< Ogre2Visual >, BaseInertiaVisual< OgreVisual >, BaseJointVisual< Ogre2Visual >, BaseJointVisual< OgreVisual >, BaseLidarVisual< Ogre2Visual >, BaseLidarVisual< OgreVisual >, BaseLightVisual< Ogre2Visual >, BaseLightVisual< OgreVisual >, BaseParticleEmitter< Ogre2Visual >, BaseParticleEmitter< OgreVisual >, BaseVisual< Ogre2Node >, BaseVisual< OgreNode >, OgreCOMVisual, OgreDepthCamera, OgreGpuRays, OgreInertiaVisual, OgreLidarVisual, OgreLightVisual, OgreProjector, OgreThermalCamera, OgreWideAngleCamera, Ogre2BoundingBoxCamera, Ogre2COMVisual, Ogre2DepthCamera, Ogre2GpuRays, Ogre2InertiaVisual, Ogre2LidarVisual, Ogre2LightVisual, Ogre2ParticleEmitter, Ogre2Projector, Ogre2SegmentationCamera, Ogre2ThermalCamera, and Ogre2WideAngleCamera.
◆ 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 |
Detach this Node from its parent. If this Node does not have a parent, no work will be done.
Implements Node.
References std::dynamic_pointer_cast().
◆ 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 >.
References std::endl(), gzerr, Pose3< typename T >::IsFinite(), Pose3< typename T >::Pos(), and Pose3< typename T >::Rot().
◆ SetLocalPosition() [1/2]
|
overridevirtual |
Set the local position.
- Parameters
-
[in] _position New local position
Implements Node.
Reimplemented in Ogre2Light.
References std::endl(), gzerr, Vector3< typename T >::IsFinite(), and Pose3< typename T >::Pos().
◆ 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 |
Set the local rotation.
- Parameters
-
[in] _rotation New local rotation
Implements Node.
References std::endl(), gzerr, Quaternion< typename T >::IsFinite(), and Pose3< typename T >::Rot().
◆ 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< Ogre2Visual >, and BaseAxisVisual< OgreVisual >.
◆ 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.
References std::endl(), gzerr, and Vector3< typename T >::IsFinite().
◆ 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 |
Set the world position.
- Parameters
-
[in] _position New world position
Implements Node.
References Pose3< typename T >::Pos().
◆ 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 |
Set the world rotation.
- Parameters
-
[in] _rotation New world rotation
Implements Node.
References Pose3< typename T >::Rot().
◆ 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 |
Set the world scale.
- Parameters
-
[in] _scale New world scale
Implements Node.
References Vector3< typename T >::One.
◆ 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: