Package org.robwork.sdurw_graphics
Class DrawableNodeClone
- java.lang.Object
-
- org.robwork.sdurw_graphics.SceneNode
-
- org.robwork.sdurw_graphics.DrawableNode
-
- org.robwork.sdurw_graphics.DrawableNodeClone
-
public class DrawableNodeClone extends DrawableNode
Abstract base class for all drawable classes
Classes that are able to draw them self, may inherit from this class.
The drawable class use a draw mask to distinguish between different
groups to draw. E.g. when taking snapshots with a simulated camera
virtual objects such as the red laser vector or the lines showing
the camera view angle is should not be renered. Hence objects that
are virtual should be set to virtual.
A call to draw enabling Physical and User1 defined objects look like:
drawable->draw(DrawableNode::Physical | DrawableNode::User1);
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robwork.sdurw_graphics.DrawableNode
DrawableNode.DrawableTypeMask, DrawableNode.DrawType, DrawableNode.RenderInfo
-
Nested classes/interfaces inherited from class org.robwork.sdurw_graphics.SceneNode
SceneNode.AddPolicy, SceneNode.NodeType
-
-
Constructor Summary
Constructors Constructor Description DrawableNodeClone(long cPtr, boolean cMemoryOwn)DrawableNodeClone(java.lang.String name, DrawableNodePtr drawable)constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()voiddraw()draws the object.voiddraw(DrawableNode.RenderInfo info)draws the object.static longgetCPtr(DrawableNodeClone obj)longgetMask()Get the DrawableTypeMask for the node.floatgetScale()gets the scale of the objectTransform3DgetTransform()gets the transformation of the drawable objectfloatgetTransparency()Gets the color alpha value.booleanisHighlighted()Returns whether the DrawableNode is highlighted
booleanisVisible()checks if this drawable is enabledvoidsetDrawType(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 tovoidsetScale(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.-
Methods inherited from class org.robwork.sdurw_graphics.DrawableNode
asDrawableNode, getCPtr, isTransparent
-
Methods inherited from class org.robwork.sdurw_graphics.SceneNode
addParent, addParent, asCameraNode, asGroupNode, get_name, get_parentNodes, get_type, getCPtr, getName, getType, hasParent, removeParent, removeParent, set_name, set_parentNodes, set_type, setName
-
-
-
-
Constructor Detail
-
DrawableNodeClone
public DrawableNodeClone(long cPtr, boolean cMemoryOwn)
-
DrawableNodeClone
public DrawableNodeClone(java.lang.String name, DrawableNodePtr drawable)constructor- Parameters:
name- [in] the name of the node.drawable- [in] the drawable to clone - it will not make an actual clone of data,
only of the visualization.
-
-
Method Detail
-
getCPtr
public static long getCPtr(DrawableNodeClone obj)
-
delete
public void delete()
- Overrides:
deletein classDrawableNode
-
draw
public void draw(DrawableNode.RenderInfo info)
draws the object.- Overrides:
drawin classDrawableNode
-
draw
public void draw()
draws the object.- Overrides:
drawin classDrawableNode
-
setHighlighted
public void setHighlighted(boolean b)
enables or disables highlighting of the drawable class
- Overrides:
setHighlightedin classDrawableNode- Parameters:
b- [in] a if true highlight is enabled if false disabled
-
isHighlighted
public boolean isHighlighted()
Returns whether the DrawableNode is highlighted
- Overrides:
isHighlightedin classDrawableNode- Returns:
- true/false
-
setDrawType
public void setDrawType(DrawableNode.DrawType drawType)
Sets the DrawType
- Overrides:
setDrawTypein classDrawableNode- Parameters:
drawType- [in] the DrawType to be used
-
setTransparency
public void setTransparency(float alpha)
Sets up the color alpha value.
- Overrides:
setTransparencyin classDrawableNode- Parameters:
alpha- [in] 0.0 corresponds to fully transparent and
.0 to completely solid.
-
getTransparency
public float getTransparency()
Gets the color alpha value.- Overrides:
getTransparencyin classDrawableNode- Returns:
- alpha value in the interval [0.0;1.0]
-
setScale
public void setScale(float scale)
Specifies the scale of the object- Overrides:
setScalein classDrawableNode- Parameters:
scale- [in] the scale
-
getScale
public float getScale()
gets the scale of the object- Overrides:
getScalein classDrawableNode- Returns:
- scale [in] the scale
-
setVisible
public void setVisible(boolean enable)
enable or disable this drawable. When disabled the drawable
will not render anything.- Overrides:
setVisiblein classDrawableNode
-
isVisible
public boolean isVisible()
checks if this drawable is enabled- Overrides:
isVisiblein classDrawableNode
-
getTransform
public Transform3D getTransform()
gets the transformation of the drawable object- Overrides:
getTransformin classDrawableNode- Returns:
- transform of the drawable object
-
setTransform
public void setTransform(Transform3D t3d)
Sets the transformation of the drawable object- Overrides:
setTransformin classDrawableNode- Parameters:
t3d- [in] transform of drawable object
-
setMask
public void setMask(long mask)
the group(s) that this drawable belong to- Overrides:
setMaskin classDrawableNode- Parameters:
mask- [in] drawable mask
-
getMask
public long getMask()
Get the DrawableTypeMask for the node.- Overrides:
getMaskin classDrawableNode- Returns:
- the type mask.
-
-