Package org.robwork.sdurw_graphics
Class GroupNodePtr
- java.lang.Object
-
- org.robwork.sdurw_graphics.GroupNodePtr
-
public class GroupNodePtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description GroupNodePtr()
Default constructor yielding a NULL-pointer.GroupNodePtr(long cPtr, boolean cMemoryOwn)
GroupNodePtr(GroupNode ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupNode
__ref__()
Dereferencing operator.void
addChild(SceneNodePtr node)
add a child to this group nodevoid
addChild(SceneNodePtr child, GroupNodePtr parent)
add a child to the groupnode parentvoid
addChild(SceneNodePtr child, GroupNodePtr parent, SceneNode.AddPolicy policy)
add a child to the groupnode parentvoid
addChild(SceneNodePtr node, SceneNode.AddPolicy policy)
add a child to this group nodevoid
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()
GroupNodeCPtr
cptr()
void
delete()
GroupNode
deref()
The pointer stored in the object.boolean
equals(GroupNode p)
SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t
get_childNodes()
List of child nodes.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.Transform3D
get_t3d()
The transform.int
get_type()
The NodeType.static long
getCPtr(GroupNodePtr obj)
GroupNode
getDeref()
Member access operator.java.lang.String
getName()
Get the name of the node.Transform3D
getTransform()
get transformint
getType()
Get the NodeType.boolean
hasChild(java.lang.String nodename)
test if this group node has a child node with name nodenameboolean
hasChild(SceneNodePtr node)
test if this group node has the node node as childboolean
hasParent(SceneNodePtr parent)
Check if the given node is a parent node.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershiplong
nrOfChildren()
get the number of childrenvoid
removeChild(java.lang.String name)
remove node with name name from the children list of this node AND removes this
node from the parent list of node.
void
removeChild(SceneNodePtr node)
remove node from the children list of this node AND removes this
node from the parent list of node.
void
removeParent(SceneNodePtr node)
erases the parent from the parent list.
Note: this node is not removed from the parents child list, using thisvoid
removeParent(SceneNodePtr node, SceneNodePtr parent)
Remove a parent node.void
set_childNodes(SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t value)
List of child nodes.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_t3d(Transform3D value)
The transform.void
set_type(int value)
The NodeType.void
setName(java.lang.String name)
Set the name of this node.void
setTransform(Transform3D t3d)
transform is relative to parent node
-
-
-
Constructor Detail
-
GroupNodePtr
public GroupNodePtr(long cPtr, boolean cMemoryOwn)
-
GroupNodePtr
public GroupNodePtr()
Default constructor yielding a NULL-pointer.
-
GroupNodePtr
public GroupNodePtr(GroupNode ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(GroupNodePtr obj)
-
delete
public void delete()
-
deref
public GroupNode deref()
The pointer stored in the object.
-
__ref__
public GroupNode __ref__()
Dereferencing operator.
-
getDeref
public GroupNode getDeref()
Member access operator.
-
equals
public boolean equals(GroupNode p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public GroupNodeCPtr cptr()
-
asGroupNode
public GroupNode asGroupNode()
-
nrOfChildren
public long nrOfChildren()
get the number of children
-
addChild
public void addChild(SceneNodePtr node, SceneNode.AddPolicy policy)
add a child to this group node- Parameters:
node
- [in] the child to addpolicy
- [in] add it to the front or the back
-
addChild
public void addChild(SceneNodePtr node)
add a child to this group node- Parameters:
node
- [in] the child to add
-
addChild
public void addChild(SceneNodePtr child, GroupNodePtr parent, SceneNode.AddPolicy policy)
add a child to the groupnode parent- Parameters:
child
- [in] the child to addparent
- [in] the parentpolicy
- [in] add it to the front or the back
-
addChild
public void addChild(SceneNodePtr child, GroupNodePtr parent)
add a child to the groupnode parent- Parameters:
child
- [in] the child to addparent
- [in] the parent
-
hasChild
public boolean hasChild(SceneNodePtr node)
test if this group node has the node node as child- Parameters:
node
- [in] a scene node- Returns:
- true if node is child of this, false otherwise
-
hasChild
public boolean hasChild(java.lang.String nodename)
test if this group node has a child node with name nodename- Parameters:
nodename
- [in] name of child node- Returns:
- true if nodename is child of this, false otherwise
-
removeChild
public void removeChild(SceneNodePtr node)
remove node from the children list of this node AND removes this
node from the parent list of node.
- Parameters:
node
- [in] child node that is to be removed
-
removeChild
public void removeChild(java.lang.String name)
remove node with name name from the children list of this node AND removes this
node from the parent list of node.
- Parameters:
name
- [in] child node that is to be removed
-
setTransform
public void setTransform(Transform3D t3d)
transform is relative to parent node
-
getTransform
public Transform3D getTransform()
get transform
-
set_t3d
public void set_t3d(Transform3D value)
The transform.
-
get_t3d
public Transform3D get_t3d()
The transform.
-
set_childNodes
public void set_childNodes(SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t value)
List of child nodes.
-
get_childNodes
public SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t get_childNodes()
List of child nodes.
-
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 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.
-
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.
-
-