Package org.robwork.sdurw_graphics
Class DrawableNodeClonePtr
- java.lang.Object
-
- org.robwork.sdurw_graphics.DrawableNodeClonePtr
-
public class DrawableNodeClonePtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description DrawableNodeClonePtr()
Default constructor yielding a NULL-pointer.DrawableNodeClonePtr(long cPtr, boolean cMemoryOwn)
DrawableNodeClonePtr(DrawableNodeClone 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 DrawableNodeClone
__ref__()
Dereferencing operator.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()
GroupNode
asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode.DrawableNodeCloneCPtr
cptr()
void
delete()
DrawableNodeClone
deref()
The pointer stored in the object.void
draw()
draws the object.void
draw(DrawableNode.RenderInfo info)
draws the object.boolean
equals(DrawableNodeClone p)
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(DrawableNodeClonePtr obj)
DrawableNodeClone
getDeref()
Member access operator.long
getMask()
Get the DrawableTypeMask for the node.java.lang.String
getName()
Get the name of the node.float
getScale()
gets the scale of the objectTransform3D
getTransform()
gets the transformation of the drawable objectfloat
getTransparency()
Gets the color alpha value.int
getType()
Get the NodeType.boolean
hasParent(SceneNodePtr parent)
Check if the given node is a parent node.boolean
isHighlighted()
Returns whether the DrawableNode is highlighted
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipboolean
isTransparent()
Check if node is transparent.boolean
isVisible()
checks if this drawable is enabledvoid
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_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
setDrawType(DrawableNode.DrawType drawType)
Sets the DrawType
void
setHighlighted(boolean b)
enables or disables highlighting of the drawable class
void
setMask(long mask)
the group(s) that this drawable belong tovoid
setName(java.lang.String name)
Set the name of this node.void
setScale(float scale)
Specifies the scale of the objectvoid
setTransform(Transform3D t3d)
Sets the transformation of the drawable objectvoid
setTransparency(float alpha)
Sets up the color alpha value.
void
setVisible(boolean enable)
enable or disable this drawable.
-
-
-
Constructor Detail
-
DrawableNodeClonePtr
public DrawableNodeClonePtr(long cPtr, boolean cMemoryOwn)
-
DrawableNodeClonePtr
public DrawableNodeClonePtr()
Default constructor yielding a NULL-pointer.
-
DrawableNodeClonePtr
public DrawableNodeClonePtr(DrawableNodeClone ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(DrawableNodeClonePtr obj)
-
delete
public void delete()
-
deref
public DrawableNodeClone deref()
The pointer stored in the object.
-
__ref__
public DrawableNodeClone __ref__()
Dereferencing operator.
-
getDeref
public DrawableNodeClone getDeref()
Member access operator.
-
equals
public boolean equals(DrawableNodeClone 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 DrawableNodeCloneCPtr cptr()
-
draw
public void draw(DrawableNode.RenderInfo info)
draws the object.
-
draw
public void draw()
draws the object.
-
setHighlighted
public void setHighlighted(boolean b)
enables or disables highlighting of the drawable class
- Parameters:
b
- [in] a if true highlight is enabled if false disabled
-
isHighlighted
public boolean isHighlighted()
Returns whether the DrawableNode is highlighted
- Returns:
- true/false
-
setDrawType
public void setDrawType(DrawableNode.DrawType drawType)
Sets the DrawType
- Parameters:
drawType
- [in] the DrawType to be used
-
setTransparency
public void setTransparency(float alpha)
Sets up the color alpha value.
- Parameters:
alpha
- [in] 0.0 corresponds to fully transparent and
.0 to completely solid.
-
getTransparency
public float getTransparency()
Gets the color alpha value.- Returns:
- alpha value in the interval [0.0;1.0]
-
setScale
public void setScale(float scale)
Specifies the scale of the object- Parameters:
scale
- [in] the scale
-
getScale
public float getScale()
gets the scale of the object- Returns:
- scale [in] the scale
-
setVisible
public void setVisible(boolean enable)
enable or disable this drawable. When disabled the drawable
will not render anything.
-
isVisible
public boolean isVisible()
checks if this drawable is enabled
-
getTransform
public Transform3D getTransform()
gets the transformation of the drawable object- Returns:
- transform of the drawable object
-
setTransform
public void setTransform(Transform3D t3d)
Sets the transformation of the drawable object- Parameters:
t3d
- [in] transform of drawable object
-
setMask
public void setMask(long mask)
the group(s) that this drawable belong to- Parameters:
mask
- [in] drawable mask
-
getMask
public long getMask()
Get the DrawableTypeMask for the node.- Returns:
- the type mask.
-
isTransparent
public boolean isTransparent()
Check if node is transparent.- Returns:
- true if transparent, false otherwise.
-
asDrawableNode
public DrawableNode asDrawableNode()
-
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.
-
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.
-
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.
-
-