Package org.robwork.sdurw_graphics
Class DrawableNodeClonePtr
- java.lang.Object
-
- org.robwork.sdurw_graphics.DrawableNodeClonePtr
-
public class DrawableNodeClonePtr extends java.lang.ObjectPtr 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.voidaddParent(SceneNodePtr node)Add a parent node.voidaddParent(SceneNodePtr node, SceneNode.AddPolicy policy)Add a parent node.SceneCameraasCameraNode()Get a pointer to a CameraNode, if this is a CameraNode.DrawableNodeasDrawableNode()GroupNodeasGroupNode()Get a pointer to a GroupNode, if this is a GroupNode.DrawableNodeCloneCPtrcptr()voiddelete()DrawableNodeClonederef()The pointer stored in the object.voiddraw()draws the object.voiddraw(DrawableNode.RenderInfo info)draws the object.booleanequals(DrawableNodeClone p)java.lang.Stringget_name()The name of the node.SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_tget_parentNodes()The list of parent nodes.intget_type()The NodeType.static longgetCPtr(DrawableNodeClonePtr obj)DrawableNodeClonegetDeref()Member access operator.longgetMask()Get the DrawableTypeMask for the node.java.lang.StringgetName()Get the name of the node.floatgetScale()gets the scale of the objectTransform3DgetTransform()gets the transformation of the drawable objectfloatgetTransparency()Gets the color alpha value.intgetType()Get the NodeType.booleanhasParent(SceneNodePtr parent)Check if the given node is a parent node.booleanisHighlighted()Returns whether the DrawableNode is highlighted
booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipbooleanisTransparent()Check if node is transparent.booleanisVisible()checks if this drawable is enabledvoidremoveParent(SceneNodePtr node)erases the parent from the parent list.
Note: this node is not removed from the parents child list, using thisvoidremoveParent(SceneNodePtr node, SceneNodePtr parent)Remove a parent node.voidset_name(java.lang.String value)The name of the node.voidset_parentNodes(SWIGTYPE_p_std__listT_rw__core__PtrT_rw__graphics__SceneNode_t_t value)The list of parent nodes.voidset_type(int value)The NodeType.voidsetDrawType(DrawableNode.DrawType drawType)Sets the DrawType
voidsetHighlighted(boolean b)enables or disables highlighting of the drawable class
voidsetMask(long mask)the group(s) that this drawable belong tovoidsetName(java.lang.String name)Set the name of this node.voidsetScale(float scale)Specifies the scale of the objectvoidsetTransform(Transform3D t3d)Sets the transformation of the drawable objectvoidsetTransparency(float alpha)Sets up the color alpha value.
voidsetVisible(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.
-
-