Package org.robwork.sdurw_graphics
Class DrawableGeometryNodePtr
- java.lang.Object
-
- org.robwork.sdurw_graphics.DrawableGeometryNodePtr
-
public class DrawableGeometryNodePtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description DrawableGeometryNodePtr()
Default constructor yielding a NULL-pointer.DrawableGeometryNodePtr(long cPtr, boolean cMemoryOwn)
DrawableGeometryNodePtr(DrawableGeometryNode 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 DrawableGeometryNode
__ref__()
Dereferencing operator.void
addFrameAxis(double size)
add a frame axis to this geometryvoid
addGeometry(GeometryPtr geom)
add a geometry to this rendervoid
addLine(Vector3D v1, Vector3D v2)
add a single line segment to this geometry rendervoid
addLines(VectorLine lines)
add lines to this geometryvoid
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.DrawableGeometryNodeCPtr
cptr()
void
delete()
DrawableGeometryNode
deref()
The pointer stored in the object.void
draw()
draws the object.void
draw(DrawableNode.RenderInfo info)
draws the object.boolean
equals(DrawableGeometryNode 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.double
getAlpha()
get alpha valueVector3D
getColor()
get the RGB colorstatic long
getCPtr(DrawableGeometryNodePtr obj)
DrawableGeometryNode
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
setAlpha(double alpha)
sets the alpha valuevoid
setColor(double r, double g, double b, double alpha)
sets the RGBA color of the geometryvoid
setColor(Vector3D rgb)
sets the RGB color of the geometryvoid
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
-
DrawableGeometryNodePtr
public DrawableGeometryNodePtr(long cPtr, boolean cMemoryOwn)
-
DrawableGeometryNodePtr
public DrawableGeometryNodePtr()
Default constructor yielding a NULL-pointer.
-
DrawableGeometryNodePtr
public DrawableGeometryNodePtr(DrawableGeometryNode ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(DrawableGeometryNodePtr obj)
-
delete
public void delete()
-
deref
public DrawableGeometryNode deref()
The pointer stored in the object.
-
__ref__
public DrawableGeometryNode __ref__()
Dereferencing operator.
-
getDeref
public DrawableGeometryNode getDeref()
Member access operator.
-
equals
public boolean equals(DrawableGeometryNode 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 DrawableGeometryNodeCPtr cptr()
-
setColor
public void setColor(double r, double g, double b, double alpha)
sets the RGBA color of the geometry- Parameters:
r
- [in] red [0;1]g
- [in] green [0;1]b
- [in] blue [0;1]alpha
- [in] opasity value [0;1], 0 is completely transparent
-
setColor
public void setColor(Vector3D rgb)
sets the RGB color of the geometry- Parameters:
rgb
- [in] red, green and blue must be between [0;1]
-
setAlpha
public void setAlpha(double alpha)
sets the alpha value- Parameters:
alpha
- [in] between [0;1], 0 is completely transparent
-
getColor
public Vector3D getColor()
get the RGB color- Returns:
- RGB color
-
getAlpha
public double getAlpha()
get alpha value- Returns:
- alpha
-
addLines
public void addLines(VectorLine lines)
add lines to this geometry- Parameters:
lines
- [in] list of line segments that should be added
-
addLine
public void addLine(Vector3D v1, Vector3D v2)
add a single line segment to this geometry render- Parameters:
v1
- [in] line segment vertice 1v2
- [in] line segment vertice 2
-
addGeometry
public void addGeometry(GeometryPtr geom)
add a geometry to this render- Parameters:
geom
- [in] a geometry that should be rendered
-
addFrameAxis
public void addFrameAxis(double size)
add a frame axis to this geometry- Parameters:
size
- [in] length of the frame axis's
-
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
1.0 to completely solid.
-
getTransparency
public float getTransparency()
Gets the color alpha value.- Returns:
- alpha value in the interval [0.0;1.0]
-
isTransparent
public boolean isTransparent()
Check if node is transparent.- Returns:
- true if transparent, false otherwise.
-
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.
-
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.
-
-