![]() |
RobWorkProject
24.12.4-
|
a SceneNode that has a transformation and 0 to many children. More...
#include <GroupNode.hpp>
Inherits SceneNode.
Public Types | |
typedef rw::core::Ptr< GroupNode > | Ptr |
smart pointer type of this class | |
![]() | |
enum | AddPolicy { Front , Back } |
Policy for adding parent nodes. More... | |
enum | NodeType { GroupType = 0 , CameraType , DrawableType , UserBeginType = 1024 } |
Node types. More... | |
typedef rw::core::Ptr< SceneNode > | Ptr |
Smart pointer type for SceneNode. | |
typedef std::list< SceneNode::Ptr > | NodeList |
Type for the list of nodes. | |
typedef const std::list< SceneNode::Ptr > | NodeListConst |
Type for a const list of nodes. | |
Public Member Functions | |
GroupNode (const std::string &name) | |
constructor | |
GroupNode * | asGroupNode () |
Get a pointer to a GroupNode, if this is a GroupNode. More... | |
size_t | nrOfChildren () |
get the number of children | |
void | addChild (SceneNode::Ptr node, AddPolicy policy=Back) |
add a child to this group node More... | |
bool | hasChild (SceneNode::Ptr node) |
test if this group node has the node node as child More... | |
bool | hasChild (const std::string &nodename) |
test if this group node has a child node with name nodename More... | |
void | removeChild (SceneNode::Ptr node) |
remove node from the children list of this node AND removes this node from the parent list of node. More... | |
void | removeChild (const std::string &name) |
remove node with name name from the children list of this node AND removes this node from the parent list of node. More... | |
void | setTransform (const rw::math::Transform3D<> &t3d) |
transform is relative to parent node | |
rw::math::Transform3D | getTransform () |
get transform | |
![]() | |
virtual | ~SceneNode () |
Destructor. | |
void | addParent (SceneNode::Ptr node, AddPolicy policy=Back) |
Add a parent node. More... | |
bool | hasParent (SceneNode::Ptr parent) |
Check if the given node is a parent node. More... | |
void | removeParent (SceneNode::Ptr node) |
erases the parent from the parent list. More... | |
virtual SceneCamera * | asCameraNode () |
Get a pointer to a CameraNode, if this is a CameraNode. More... | |
virtual DrawableNode * | asDrawableNode () |
Get a pointer to a DrawableNode, if this is a DrawableNode. More... | |
int | getType () |
Get the NodeType. More... | |
const std::string & | getName () |
Get the name of the node. More... | |
void | setName (const std::string &name) |
Set the name of this node. More... | |
Static Public Member Functions | |
static void | addChild (SceneNode::Ptr child, GroupNode::Ptr parent, AddPolicy policy=Back) |
add a child to the groupnode parent More... | |
![]() | |
static void | removeParent (SceneNode::Ptr node, SceneNode::Ptr parent) |
Remove a parent node. More... | |
Public Attributes | |
rw::math::Transform3D | _t3d |
The transform. | |
std::list< SceneNode::Ptr > | _childNodes |
List of child nodes. | |
![]() | |
std::string | _name |
The name of the node. | |
std::list< SceneNode::Ptr > | _parentNodes |
The list of parent nodes. | |
int | _type |
The NodeType. | |
Additional Inherited Members | |
![]() | |
SceneNode (const std::string &name, int type) | |
Construct new scene node. More... | |
a SceneNode that has a transformation and 0 to many children.
|
static |
add a child to the groupnode parent
child | [in] the child to add |
parent | [in] the parent |
policy | [in] add it to the front or the back |
void addChild | ( | SceneNode::Ptr | node, |
AddPolicy | policy = Back |
||
) |
add a child to this group node
node | [in] the child to add |
policy | [in] add it to the front or the back |
|
virtual |
bool hasChild | ( | const std::string & | nodename | ) |
test if this group node has a child node with name nodename
nodename | [in] name of child node |
bool hasChild | ( | SceneNode::Ptr | node | ) |
test if this group node has the node node as child
node | [in] a scene node |
void removeChild | ( | const std::string & | name | ) |
remove node with name name from the children list of this node AND removes this node from the parent list of node.
name | [in] child node that is to be removed |
void removeChild | ( | SceneNode::Ptr | node | ) |
remove node from the children list of this node AND removes this node from the parent list of node.
node | [in] child node that is to be removed |