Package org.robwork.sdurw_graphics
Class SceneNode
- java.lang.Object
-
- org.robwork.sdurw_graphics.SceneNode
-
- Direct Known Subclasses:
DrawableNode
,GroupNode
,SceneCamera
public class SceneNode extends java.lang.Object
a node that can have leafs (DrawableNode) or other nodes as children.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SceneNode.AddPolicy
Policy for adding parent nodes.static class
SceneNode.NodeType
Node types.
-
Constructor Summary
Constructors Constructor Description SceneNode(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParent(SceneNodePtr node)
Add a parent node.void
addParent(SceneNodePtr node, SceneNode.AddPolicy policy)
Add a parent node.SceneCamera
asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode.DrawableNode
asDrawableNode()
Get a pointer to a DrawableNode, if this is a DrawableNode.GroupNode
asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode.void
delete()
java.lang.String
get_name()
The name of the node.SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t
get_parentNodes()
The list of parent nodes.int
get_type()
The NodeType.static long
getCPtr(SceneNode obj)
java.lang.String
getName()
Get the name of the node.int
getType()
Get the NodeType.boolean
hasParent(SceneNodePtr parent)
Check if the given node is a parent node.void
removeParent(SceneNodePtr node)
erases the parent from the parent list.
Note: this node is not removed from the parents child list, using thisstatic void
removeParent(SceneNodePtr node, SceneNodePtr parent)
Remove a parent node.void
set_name(java.lang.String value)
The name of the node.void
set_parentNodes(SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t value)
The list of parent nodes.void
set_type(int value)
The NodeType.void
setName(java.lang.String name)
Set the name of this node.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(SceneNode obj)
-
delete
public void delete()
-
addParent
public void addParent(SceneNodePtr node, SceneNode.AddPolicy policy)
Add a parent node.- Parameters:
node
- [in] the node to add as parent node.policy
- [in] the AddPolicy (default is Back).
-
addParent
public void addParent(SceneNodePtr node)
Add a parent node.- Parameters:
node
- [in] the node to add as parent node.
-
hasParent
public boolean hasParent(SceneNodePtr parent)
Check if the given node is a parent node.- Parameters:
parent
- [in] the node to look for.- Returns:
- true if parent is a parent node.
-
removeParent
public void removeParent(SceneNodePtr node)
erases the parent from the parent list.
Note: this node is not removed from the parents child list, using this- Parameters:
node
- [in] the parent to remove.
-
removeParent
public static void removeParent(SceneNodePtr node, SceneNodePtr parent)
Remove a parent node.- Parameters:
node
- [in] the node.parent
- [in] the parent node to remove as a parent of node.
-
asGroupNode
public GroupNode asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode.- Returns:
- a pointer, or NULL if the SceneNode is not of correct type.
-
asCameraNode
public SceneCamera asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode.- Returns:
- a pointer, or NULL if the SceneNode is not of correct type.
-
asDrawableNode
public DrawableNode asDrawableNode()
Get a pointer to a DrawableNode, if this is a DrawableNode.- Returns:
- a pointer, or NULL if the SceneNode is not of correct type.
-
getType
public int getType()
Get the NodeType.- Returns:
- the type of node.
-
getName
public java.lang.String getName()
Get the name of the node.- Returns:
- the name.
-
setName
public void setName(java.lang.String name)
Set the name of this node.- Parameters:
name
- [in] a new name.
-
set_name
public void set_name(java.lang.String value)
The name of the node.
-
get_name
public java.lang.String get_name()
The name of the node.
-
set_parentNodes
public void set_parentNodes(SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t value)
The list of parent nodes.
-
get_parentNodes
public SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t get_parentNodes()
The list of parent nodes.
-
set_type
public void set_type(int value)
The NodeType.
-
get_type
public int get_type()
The NodeType.
-
-