sdurw_graphics module
- class sdurw_graphics.sdurw_graphics.CameraGroup(*args, **kwargs)
Bases:
object
A group of cameras.
- __init__(*args, **kwargs)
- getCameras()
Get all cameras in group. :rtype: std::list< rw::graphics::SceneCamera::Ptr > :return: list of cameras.
- getMainCamera()
Get the main camera. :rtype: rw::graphics::SceneCamera::Ptr :return: the main camera.
- getName()
Get name of group. :rtype: string :return: the name.
- insertCamera(cam, index)
Insert a camera in group. :type cam: rw::graphics::SceneCamera::Ptr :param cam: [in] camera. :type index: int :param index: [in] the index to insert at.
- isEnabled()
Check if group is enabled. :rtype: boolean :return: true if enabled.
- isOffscreenRenderEnabled()
Check if offscreen rendering is enabled. :rtype: boolean :return: true if enabled, false otherwise.
- removeCamera(index)
Remove camera. :type index: int :param index: [in] the index of the camera to remove.
- setCopyToImage(img)
Copy to image. :type img:
Ptr
:param img: [out] image to copy to.
- setCopyToScan25D(img)
Copy to point cloud. :type img: rw::core::Ptr< rw::geometry::PointCloud > :param img: [out] point cloud to copy to.
- setEnabled(enabled)
Enable/disable group. :type enabled: boolean :param enabled: [in] true to enable, false to disable.
- setMainCamera(cam)
Set the main camera. :type cam: rw::graphics::SceneCamera::Ptr :param cam: [in] main camera.
- setMultiSample(samples)
Enable multi-sampling. :type samples: int :param samples: [in] number of samples.
- setOffscreenRenderColor(color)
Set color space for offscreen rendering. :type color: int :param color: [in] the color space to use.
- setOffscreenRenderEnabled(enable)
Enable/disable offscreen rendering. :type enable: boolean :param enable: [in] true to enable, false to disable. :rtype: boolean :return: true if offscreen rendering was enabled, false if offscreen rendering is not
possible.
- setOffscreenRenderSize(width, height)
Set size for offscreen rendering. :type width: int :param width: [in] :type height: int :param height: [in]
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableGeometryNode(*args, **kwargs)
Bases:
DrawableNode
A specific type of DrawableNode that is able to draw a rw::geometry::Geometry.
- __init__(*args, **kwargs)
- addFrameAxis(size)
add a frame axis to this geometry :type size: float :param size: [in] length of the frame axis’s
- addGeometry(geom)
add a geometry to this render :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] a geometry that should be rendered
- addLine(v1, v2)
add a single line segment to this geometry render :type v1: rw::math::Vector3D< double > :param v1: [in] line segment vertice 1 :type v2: rw::math::Vector3D< double > :param v2: [in] line segment vertice 2
- addLines(lines)
add lines to this geometry :type lines: std::vector< rw::geometry::Line > :param lines: [in] list of line segments that should be added
- getAlpha()
get alpha value :rtype: float :return: alpha
- getColor()
get the RGB color :rtype: rw::math::Vector3D< double > :return: RGB color
- setAlpha(alpha)
sets the alpha value :type alpha: float :param alpha: [in] between [0;1], 0 is completely transparent
- setColor(*args)
Overload 1:
sets the RGBA color of the geometry :type r: float :param r: [in] red [0;1] :type g: float :param g: [in] green [0;1] :type b: float :param b: [in] blue [0;1] :type alpha: float :param alpha: [in] opasity value [0;1], 0 is completely transparent
Overload 2:
sets the RGB color of the geometry :type rgb: rw::math::Vector3D< double > :param rgb: [in] red, green and blue must be between [0;1]
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableGeometryNodeCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- draw(*args)
draws the object.
- getDeref()
Member access operator.
- getMask()
Get the DrawableTypeMask for the node. :rtype: int :return: the type mask.
- getScale()
gets the scale of the object :rtype: float :return: scale [in] the scale
- getTransform()
gets the transformation of the drawable object :rtype: rw::math::Transform3D< double > :return: transform of the drawable object
- isHighlighted()
Returns whether the DrawableNode is highlighted
- Return type
boolean
- Returns
true/false
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableGeometryNodePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addFrameAxis(size)
add a frame axis to this geometry :type size: float :param size: [in] length of the frame axis’s
- addGeometry(geom)
add a geometry to this render :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] a geometry that should be rendered
- addLine(v1, v2)
add a single line segment to this geometry render :type v1: rw::math::Vector3D< double > :param v1: [in] line segment vertice 1 :type v2: rw::math::Vector3D< double > :param v2: [in] line segment vertice 2
- addLines(lines)
add lines to this geometry :type lines: std::vector< rw::geometry::Line > :param lines: [in] list of line segments that should be added
- addParent(*args)
Add a parent node. :type node:
Ptr
:param node: [in] the node to add as parent node. :type policy: int, optional :param policy: [in] the AddPolicy (default is Back).
- asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode. :rtype:
SceneCamera
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asDrawableNode()
- asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode. :rtype:
GroupNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- cptr()
- deref()
The pointer stored in the object.
- draw(*args)
draws the object.
- getAlpha()
get alpha value :rtype: float :return: alpha
- getColor()
get the RGB color :rtype: rw::math::Vector3D< double > :return: RGB color
- getDeref()
Member access operator.
- getMask()
Get the DrawableTypeMask for the node. :rtype: int :return: the type mask.
- getName()
Get the name of the node. :rtype: string :return: the name.
- getScale()
gets the scale of the object :rtype: float :return: scale [in] the scale
- getTransform()
gets the transformation of the drawable object :rtype: rw::math::Transform3D< double > :return: transform of the drawable object
- getTransparency()
Gets the color alpha value. :rtype: float :return: alpha value in the interval \([0.0;1.0]\)
- getType()
Get the NodeType. :rtype: int :return: the type of node.
- hasParent(parent)
Check if the given node is a parent node. :type parent:
Ptr
:param parent: [in] the node to look for. :rtype: boolean :return: true if parent is a parent node.
- isHighlighted()
Returns whether the DrawableNode is highlighted
- Return type
boolean
- Returns
true/false
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- isTransparent()
Check if node is transparent. :rtype: boolean :return: true if transparent, false otherwise.
- isVisible()
checks if this drawable is enabled
- removeParent(*args)
Overload 1:
erases the parent from the parent list. Notes: this node is not removed from the parents child list, using this :type node:
Ptr
:param node: [in] the parent to remove.Overload 2:
Remove a parent node. :type node:
Ptr
:param node: [in] the node. :type parent:Ptr
:param parent: [in] the parent node to remove as a parent of node.
- setAlpha(alpha)
sets the alpha value :type alpha: float :param alpha: [in] between [0;1], 0 is completely transparent
- setColor(*args)
Overload 1:
sets the RGBA color of the geometry :type r: float :param r: [in] red [0;1] :type g: float :param g: [in] green [0;1] :type b: float :param b: [in] blue [0;1] :type alpha: float :param alpha: [in] opasity value [0;1], 0 is completely transparent
Overload 2:
sets the RGB color of the geometry :type rgb: rw::math::Vector3D< double > :param rgb: [in] red, green and blue must be between [0;1]
- setDrawType(drawType)
Sets the DrawType
- Parameters
drawType (int) – [in] the DrawType to be used
- setHighlighted(b)
enables or disables highlighting of the drawable class
- Parameters
b (boolean) – [in] a if true highlight is enabled if false disabled
- setMask(mask)
the group(s) that this drawable belong to :type mask: int :param mask: [in] drawable mask
- setName(name)
Set the name of this node. :type name: string :param name: [in] a new name.
- setScale(scale)
Specifies the scale of the object :type scale: float :param scale: [in] the scale
- setTransform(t3d)
Sets the transformation of the drawable object :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform of drawable object
- setTransparency(alpha)
Sets up the color alpha value.
- Parameters
alpha (float) – [in] \(0.0\) corresponds to fully transparent and \(1.0\) to completely solid.
- setVisible(enable)
enable or disable this drawable. When disabled the drawable will not render anything.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableNode(*args, **kwargs)
Bases:
SceneNode
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 rendered. 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);
- ALL = 2147483647
- CollisionObject = 8
An object that is “just” a drawable
- DrawableObject = 4
A virtual object, e.g. lines showing camera view angle
- OUTLINE = 2
Render both solid and wireframe
- Physical = 1
- SOLID = 0
Render in solid
- User1 = 1024
An object that is also a CollisionObject
- User2 = 2048
User defined group 1… User2
- User3 = 4096
User3
- User4 = 8096
User4
- Virtual = 2
A physical object in the scene
- WIRE = 1
Render in wireframe
- __init__(*args, **kwargs)
- asDrawableNode()
Get a pointer to a DrawableNode, if this is a DrawableNode. :rtype:
DrawableNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- draw(*args)
draws the object.
- getMask()
Get the DrawableTypeMask for the node. :rtype: int :return: the type mask.
- getScale()
gets the scale of the object :rtype: float :return: scale [in] the scale
- getTransform()
gets the transformation of the drawable object :rtype: rw::math::Transform3D< double > :return: transform of the drawable object
- getTransparency()
Gets the color alpha value. :rtype: float :return: alpha value in the interval \([0.0;1.0]\)
- isHighlighted()
Returns whether the DrawableNode is highlighted
- Return type
boolean
- Returns
true/false
- isTransparent()
Check if node is transparent. :rtype: boolean :return: true if transparent, false otherwise.
- isVisible()
checks if this drawable is enabled
- setDrawType(drawType)
Sets the DrawType
- Parameters
drawType (int) – [in] the DrawType to be used
- setHighlighted(b)
enables or disables highlighting of the drawable class
- Parameters
b (boolean) – [in] a if true highlight is enabled if false disabled
- setMask(mask)
the group(s) that this drawable belong to :type mask: int :param mask: [in] drawable mask
- setScale(scale)
Specifies the scale of the object :type scale: float :param scale: [in] the scale
- setTransform(t3d)
Sets the transformation of the drawable object :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform of drawable object
- setTransparency(alpha)
Sets up the color alpha value.
- Parameters
alpha (float) – [in] \(0.0\) corresponds to fully transparent and \(1.0\) to completely solid.
- setVisible(enable)
enable or disable this drawable. When disabled the drawable will not render anything.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableNodeCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- draw(*args)
draws the object.
- getDeref()
Member access operator.
- getMask()
Get the DrawableTypeMask for the node. :rtype: int :return: the type mask.
- getScale()
gets the scale of the object :rtype: float :return: scale [in] the scale
- getTransform()
gets the transformation of the drawable object :rtype: rw::math::Transform3D< double > :return: transform of the drawable object
- isHighlighted()
Returns whether the DrawableNode is highlighted
- Return type
boolean
- Returns
true/false
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableNodeClone(name, drawable)
Bases:
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);
- __init__(name, drawable)
constructor :type name: string :param name: [in] the name of the node. :type drawable:
Ptr
:param drawable: [in] the drawable to clone - it will not make an actual clone of data,only of the visualization.
- draw(*args)
draws the object.
- getMask()
Get the DrawableTypeMask for the node. :rtype: int :return: the type mask.
- getScale()
gets the scale of the object :rtype: float :return: scale [in] the scale
- getTransform()
gets the transformation of the drawable object :rtype: rw::math::Transform3D< double > :return: transform of the drawable object
- getTransparency()
Gets the color alpha value. :rtype: float :return: alpha value in the interval \([0.0;1.0]\)
- isHighlighted()
Returns whether the DrawableNode is highlighted
- Return type
boolean
- Returns
true/false
- isVisible()
checks if this drawable is enabled
- setDrawType(drawType)
Sets the DrawType
- Parameters
drawType (int) – [in] the DrawType to be used
- setHighlighted(b)
enables or disables highlighting of the drawable class
- Parameters
b (boolean) – [in] a if true highlight is enabled if false disabled
- setMask(mask)
the group(s) that this drawable belong to :type mask: int :param mask: [in] drawable mask
- setScale(scale)
Specifies the scale of the object :type scale: float :param scale: [in] the scale
- setTransform(t3d)
Sets the transformation of the drawable object :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform of drawable object
- setTransparency(alpha)
Sets up the color alpha value.
- Parameters
alpha (float) – [in] \(0.0\) corresponds to fully transparent and .0:math:to completely solid.
- setVisible(enable)
enable or disable this drawable. When disabled the drawable will not render anything.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableNodeCloneCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- draw(*args)
draws the object.
- getDeref()
Member access operator.
- getMask()
Get the DrawableTypeMask for the node. :rtype: int :return: the type mask.
- getScale()
gets the scale of the object :rtype: float :return: scale [in] the scale
- getTransform()
gets the transformation of the drawable object :rtype: rw::math::Transform3D< double > :return: transform of the drawable object
- isHighlighted()
Returns whether the DrawableNode is highlighted
- Return type
boolean
- Returns
true/false
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableNodeClonePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addParent(*args)
Add a parent node. :type node:
Ptr
:param node: [in] the node to add as parent node. :type policy: int, optional :param policy: [in] the AddPolicy (default is Back).
- asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode. :rtype:
SceneCamera
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asDrawableNode()
- asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode. :rtype:
GroupNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- cptr()
- deref()
The pointer stored in the object.
- draw(*args)
draws the object.
- getDeref()
Member access operator.
- getMask()
Get the DrawableTypeMask for the node. :rtype: int :return: the type mask.
- getName()
Get the name of the node. :rtype: string :return: the name.
- getScale()
gets the scale of the object :rtype: float :return: scale [in] the scale
- getTransform()
gets the transformation of the drawable object :rtype: rw::math::Transform3D< double > :return: transform of the drawable object
- getTransparency()
Gets the color alpha value. :rtype: float :return: alpha value in the interval \([0.0;1.0]\)
- getType()
Get the NodeType. :rtype: int :return: the type of node.
- hasParent(parent)
Check if the given node is a parent node. :type parent:
Ptr
:param parent: [in] the node to look for. :rtype: boolean :return: true if parent is a parent node.
- isHighlighted()
Returns whether the DrawableNode is highlighted
- Return type
boolean
- Returns
true/false
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- isTransparent()
Check if node is transparent. :rtype: boolean :return: true if transparent, false otherwise.
- isVisible()
checks if this drawable is enabled
- removeParent(*args)
Overload 1:
erases the parent from the parent list. Notes: this node is not removed from the parents child list, using this :type node:
Ptr
:param node: [in] the parent to remove.Overload 2:
Remove a parent node. :type node:
Ptr
:param node: [in] the node. :type parent:Ptr
:param parent: [in] the parent node to remove as a parent of node.
- setDrawType(drawType)
Sets the DrawType
- Parameters
drawType (int) – [in] the DrawType to be used
- setHighlighted(b)
enables or disables highlighting of the drawable class
- Parameters
b (boolean) – [in] a if true highlight is enabled if false disabled
- setMask(mask)
the group(s) that this drawable belong to :type mask: int :param mask: [in] drawable mask
- setName(name)
Set the name of this node. :type name: string :param name: [in] a new name.
- setScale(scale)
Specifies the scale of the object :type scale: float :param scale: [in] the scale
- setTransform(t3d)
Sets the transformation of the drawable object :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform of drawable object
- setTransparency(alpha)
Sets up the color alpha value.
- Parameters
alpha (float) – [in] \(0.0\) corresponds to fully transparent and .0:math:to completely solid.
- setVisible(enable)
enable or disable this drawable. When disabled the drawable will not render anything.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.DrawableNodePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addParent(*args)
Add a parent node. :type node:
Ptr
:param node: [in] the node to add as parent node. :type policy: int, optional :param policy: [in] the AddPolicy (default is Back).
- asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode. :rtype:
SceneCamera
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asDrawableNode()
- asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode. :rtype:
GroupNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- cptr()
- deref()
The pointer stored in the object.
- draw(*args)
draws the object.
- getDeref()
Member access operator.
- getMask()
Get the DrawableTypeMask for the node. :rtype: int :return: the type mask.
- getName()
Get the name of the node. :rtype: string :return: the name.
- getScale()
gets the scale of the object :rtype: float :return: scale [in] the scale
- getTransform()
gets the transformation of the drawable object :rtype: rw::math::Transform3D< double > :return: transform of the drawable object
- getTransparency()
Gets the color alpha value. :rtype: float :return: alpha value in the interval \([0.0;1.0]\)
- getType()
Get the NodeType. :rtype: int :return: the type of node.
- hasParent(parent)
Check if the given node is a parent node. :type parent:
Ptr
:param parent: [in] the node to look for. :rtype: boolean :return: true if parent is a parent node.
- isHighlighted()
Returns whether the DrawableNode is highlighted
- Return type
boolean
- Returns
true/false
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- isTransparent()
Check if node is transparent. :rtype: boolean :return: true if transparent, false otherwise.
- isVisible()
checks if this drawable is enabled
- removeParent(*args)
Overload 1:
erases the parent from the parent list. Notes: this node is not removed from the parents child list, using this :type node:
Ptr
:param node: [in] the parent to remove.Overload 2:
Remove a parent node. :type node:
Ptr
:param node: [in] the node. :type parent:Ptr
:param parent: [in] the parent node to remove as a parent of node.
- setDrawType(drawType)
Sets the DrawType
- Parameters
drawType (int) – [in] the DrawType to be used
- setHighlighted(b)
enables or disables highlighting of the drawable class
- Parameters
b (boolean) – [in] a if true highlight is enabled if false disabled
- setMask(mask)
the group(s) that this drawable belong to :type mask: int :param mask: [in] drawable mask
- setName(name)
Set the name of this node. :type name: string :param name: [in] a new name.
- setScale(scale)
Specifies the scale of the object :type scale: float :param scale: [in] the scale
- setTransform(t3d)
Sets the transformation of the drawable object :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform of drawable object
- setTransparency(alpha)
Sets up the color alpha value.
- Parameters
alpha (float) – [in] \(0.0\) corresponds to fully transparent and \(1.0\) to completely solid.
- setVisible(enable)
enable or disable this drawable. When disabled the drawable will not render anything.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.GroupNode(name)
Bases:
SceneNode
a SceneNode that has a transformation and 0 to many children.
- __init__(name)
constructor
- static addChild(*args)
Overload 1:
add a child to this group node :type node:
Ptr
:param node: [in] the child to add :type policy: int, optional :param policy: [in] add it to the front or the backOverload 2:
add a child to the groupnode parent :type child:
Ptr
:param child: [in] the child to add :type parent:Ptr
:param parent: [in] the parent :type policy: int, optional :param policy: [in] add it to the front or the backOverload 3:
add a child to the groupnode parent :type child:
Ptr
:param child: [in] the child to add :type parent:Ptr
:param parent: [in] the parent :param policy: [in] add it to the front or the back
- asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode. :rtype:
GroupNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- getTransform()
get transform
- hasChild(*args)
Overload 1:
test if this group node has the node node as child :type node:
Ptr
:param node: [in] a scene node :rtype: boolean :return: true if node is child of this, false otherwiseOverload 2:
test if this group node has a child node with name nodename :type nodename: string :param nodename: [in] name of child node :rtype: boolean :return: true if nodename is child of this, false otherwise
- nrOfChildren()
get the number of children
- removeChild(*args)
Overload 1:
remove node from the children list of this node AND removes this node from the parent list of node.
- Parameters
node (
Ptr
) – [in] child node that is to be removed
Overload 2:
remove node with name name from the children list of this node AND removes this node from the parent list of node.
- Parameters
name (string) – [in] child node that is to be removed
- setTransform(t3d)
transform is relative to parent node
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.GroupNodeCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.GroupNodePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addChild(*args)
Overload 1:
add a child to this group node :type node:
Ptr
:param node: [in] the child to add :type policy: int, optional :param policy: [in] add it to the front or the backOverload 2:
add a child to the groupnode parent :type child:
Ptr
:param child: [in] the child to add :type parent:Ptr
:param parent: [in] the parent :type policy: int, optional :param policy: [in] add it to the front or the backOverload 3:
add a child to the groupnode parent :type child:
Ptr
:param child: [in] the child to add :type parent:Ptr
:param parent: [in] the parent :param policy: [in] add it to the front or the back
- addParent(*args)
Add a parent node. :type node:
Ptr
:param node: [in] the node to add as parent node. :type policy: int, optional :param policy: [in] the AddPolicy (default is Back).
- asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode. :rtype:
SceneCamera
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asDrawableNode()
Get a pointer to a DrawableNode, if this is a DrawableNode. :rtype:
DrawableNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asGroupNode()
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getName()
Get the name of the node. :rtype: string :return: the name.
- getTransform()
get transform
- getType()
Get the NodeType. :rtype: int :return: the type of node.
- hasChild(*args)
Overload 1:
test if this group node has the node node as child :type node:
Ptr
:param node: [in] a scene node :rtype: boolean :return: true if node is child of this, false otherwiseOverload 2:
test if this group node has a child node with name nodename :type nodename: string :param nodename: [in] name of child node :rtype: boolean :return: true if nodename is child of this, false otherwise
- hasParent(parent)
Check if the given node is a parent node. :type parent:
Ptr
:param parent: [in] the node to look for. :rtype: boolean :return: true if parent is a parent node.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- nrOfChildren()
get the number of children
- removeChild(*args)
Overload 1:
remove node from the children list of this node AND removes this node from the parent list of node.
- Parameters
node (
Ptr
) – [in] child node that is to be removed
Overload 2:
remove node with name name from the children list of this node AND removes this node from the parent list of node.
- Parameters
name (string) – [in] child node that is to be removed
- removeParent(*args)
Overload 1:
erases the parent from the parent list. Notes: this node is not removed from the parents child list, using this :type node:
Ptr
:param node: [in] the parent to remove.Overload 2:
Remove a parent node. :type node:
Ptr
:param node: [in] the node. :type parent:Ptr
:param parent: [in] the parent node to remove as a parent of node.
- setName(name)
Set the name of this node. :type name: string :param name: [in] a new name.
- setTransform(t3d)
transform is relative to parent node
- property thisown
The membership flag
- sdurw_graphics.sdurw_graphics.GroupNode_addChild(*args)
Overload 1:
add a child to this group node :type node:
Ptr
:param node: [in] the child to add :type policy: int, optional :param policy: [in] add it to the front or the backOverload 2:
add a child to the groupnode parent :type child:
Ptr
:param child: [in] the child to add :type parent:Ptr
:param parent: [in] the parent :type policy: int, optional :param policy: [in] add it to the front or the backOverload 3:
add a child to the groupnode parent :type child:
Ptr
:param child: [in] the child to add :type parent:Ptr
:param parent: [in] the parent :param policy: [in] add it to the front or the back
- class sdurw_graphics.sdurw_graphics.Render(*args, **kwargs)
Bases:
object
Abstract base class for all renderable classes
Classes that are able to render them self, may inherit from this class.
- __init__(*args, **kwargs)
- draw(info, type, alpha)
draws the object. :type info:
RenderInfo
:param info: [in] state and rendering specific info :type type: int :param type: [in] the drawtype which is being used :type alpha: float :param alpha: [in] the alpha value to render with
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.RenderCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- draw(info, type, alpha)
draws the object. :type info:
RenderInfo
:param info: [in] state and rendering specific info :type type: int :param type: [in] the drawtype which is being used :type alpha: float :param alpha: [in] the alpha value to render with
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.RenderInfo(*args)
Bases:
object
Information for rendering.
- __init__(*args)
Construct new rendering information. :type mask: int, optional :param mask: [in] (optional) the draw type mask. Default is DrawableObject.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.RenderPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- deref()
The pointer stored in the object.
- draw(info, type, alpha)
draws the object. :type info:
RenderInfo
:param info: [in] state and rendering specific info :type type: int :param type: [in] the drawtype which is being used :type alpha: float :param alpha: [in] the alpha value to render with
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.SceneCamera(name, subGraph)
Bases:
SceneNode
Node representing a camera in the scene. A SceneCamera sets up everything from rendering buffer to perspective transform.
- Auto = 0
The aspect is automatically adjusted to fit entire viewport
- Fixed = 4
the aspect ratio is fixed.
- Scale = 1
the aspect ratio is fixed and the scaling is performed such that the largest picure is obtained
- ScaleX = 2
the apect ratio is fixed and the scaling is performed along x-axis
- ScaleY = 3
the apect ratio is fixed and the scaling is performed along y-axis
- __init__(name, subGraph)
constructor :type name: string :param name: [in] name of camera :type subGraph:
Ptr
:param subGraph: [in] the root of the subgraph that this camera is supposed to render.
- asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode. :rtype:
SceneCamera
:return: a pointer, or NULL if the SceneNode is not of correct type.
- attachTo(snode)
Attach camera to scene node. :type snode:
Ptr
:param snode: [in] node to attach to.
- getAspectRatio()
Get the aspect ratio. :rtype: float :return: the aspect ratio.
- getAspectRatioControl()
Get current mode of aspect ratio control. :rtype: int :return: the current mode.
- getAttachedNode()
Get the node attached to. :rtype:
Ptr
:return: the node.
- getClearBufferMask()
get the clear buffer mask that describe which buffers are cleared before drawing
- getDrawMask()
Get the mask used when drawing in the scene :rtype: int :return: the draw mask - see DrawableNode::DrawableTypeMask.
- getName()
get the camera name :rtype: string :return: camera name
- getProjectionMatrix()
gets the projection matrix :rtype:
ProjectionMatrix
:return: the current camera projection matrix
- getRefNode()
get the reference node
- getTransform()
get the camera transform
- getViewport(x, y, width, height)
get viewport settings
- isClearBufferEnabled()
test if buffers is cleared before drawing
- isDepthTestEnabled()
test if depth testing is enabled
- isEnabled()
test if this camera is enabled
- isLightningEnabled()
test if lightning is enabled
- setAspectRatioControl(control)
Change the mode for aspect ratio control. :type control: int :param control: [in] new mode.
- setClearBufferEnabled(enabled)
set to true if the render buffer should be cleared before drawing
- setClearBufferMask(mask)
choose which buffers that should be cleared
- setDepthTestEnabled(enabled)
enable or disable the use of depth tests (depth buffer)
- setDrawMask(mask)
set the mask used when drawing in the scene :type mask: int :param mask: [in] The draw mask - see DrawableNode::DrawableTypeMask.
- setEnabled(enabled)
enable or disable this camera
- setLightningEnabled(enabled)
enable or disable the use of lightning
- setPerspective(fov, w, h, zNear, zFar)
sets the projection matrix of this camera to be a perspective projection :type fov: float :param fov: [in] field of view in radians. :type w: int :param w: [in] view width :type h: int :param h: [in] view height :type zNear: float :param zNear: [in] near clipping plane :type zFar: float :param zFar: [in] far clipping plane
- setProjectionMatrix(matrix)
sets the current camera projection matrix :type matrix:
ProjectionMatrix
:param matrix: [in] a projection matrix
- setRefNode(snode)
set the reference node of the camera
- setTransform(t3d)
set the camera transform relative to reference node (getRefNode)
- setViewport(x, y, width, height)
set viewport settings
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.SceneGraph(*args, **kwargs)
Bases:
object
interface for a minimalistic scenegraph that does not depend on the frame structure. See WorkCellScene for an implementation that wraps this interface to enable a more RobWork specific use.
Cameras - SceneCameras define how the world is rendered from a specific point of view, render setting, projection matrix, viewport and so on.
Cameras are ordered in CameraGroups. Each camera group can contain multiple cameras that are ordered according to how they should render the scene. A typical setup of one group would be: first camera - clear color and depth buffers, render background ibn orthographic projection second camera - render all 3D scene elements in perspective projection third camera - render foreground such as logo in orthographic projection
As can be seen the ordering is of high importance since the first camera clears the frame buffers.
- __init__(*args, **kwargs)
- addCameraGroup(cgroup)
Add a camera group. :type cgroup: rw::core::Ptr< rw::graphics::CameraGroup > :param cgroup: [in] the group to add.
- addChild(child, parent)
add a drawable to a node
- clear()
Clear the scene graph.
- draw(info)
draws the scene, using the specified render information :type info:
RenderInfo
:param info: documentation missing !
- findCameraGroup(name)
Find a camera group. :type name: string :param name: [in] name of the group. :rtype: rw::core::Ptr< rw::graphics::CameraGroup > :return: the camera group if found, else NULL.
- findDrawable(*args)
Overload 1:
Find a drawable node in the scene graph. :type name: string :param name: [in] the name of the drawable node. :rtype:
Ptr
:return: the node if found, NULL otherwise.Overload 2:
std::string&)
- Parameters
node (rw::core::Ptr< rw::graphics::SceneNode >) – [in] search only this node and all children recursively.
- findDrawables(name)
Find multiple drawable nodes in the scene graph. :type name: string :param name: [in] the name of the drawable node(s). :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a vector of all nodes with the given name.
- getCameraGroups()
Get all camera groups. :rtype: std::list< rw::core::Ptr< rw::graphics::CameraGroup > > :return: a list of camera groups.
- getDrawables(*args)
Overload 1:
get all drawables in the scene. :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return:
Overload 2:
get a vector of drawables attached to a node :type node: rw::core::Ptr< rw::graphics::SceneNode > :param node: :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return:
- getDrawablesRec(node)
get all drawable nodes in the subtree of node. nodes of type camera will not be traversed :type node: rw::core::Ptr< rw::graphics::SceneNode > :param node: [in] :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return:
- getRoot()
Get the root of the scene graph. :rtype:
Ptr
:return: the root group node.
- makeCamera(name)
Create a new scene camera. :type name: string :param name: [in] name of the camera. :rtype: rw::core::Ptr< rw::graphics::SceneCamera > :return: the new scene camera.
- makeCameraGroup(name)
Create a camera group. :type name: string :param name: [in] name of the group. :rtype: rw::core::Ptr< rw::graphics::CameraGroup > :return: a new camera group.
- makeDrawable(*args)
Overload 1:
Create a drawable node for a geometry. :type name: string :param name: [in] name of the drawable. :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] the geometry to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable geometry node.Overload 2:
Create a drawable node for lines. :type name: string :param name: [in] name of the drawable. :type lines: std::vector< rw::geometry::Line > :param lines: [in] the lines to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable geometry node.Overload 3:
Create a drawable node for lines. :type name: string :param name: [in] name of the drawable. :type lines: std::vector< rw::geometry::Line > :param lines: [in] the lines to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable geometry node.Overload 4:
Create a drawable node for an image. :type name: string :param name: [in] name of the drawable. :type img:
Image
:param img: [in] the image to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:Ptr
:return: a drawable node.Overload 5:
Create a drawable node for an image. :type name: string :param name: [in] name of the drawable. :type img:
Image
:param img: [in] the image to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:Ptr
:return: a drawable node.Overload 6:
Create a drawable node for a point cloud. :type name: string :param name: [in] name of the drawable. :type scan:
PointCloud
:param scan: [in] the point cloud to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:Ptr
:return: a drawable node.Overload 7:
Create a drawable node for a point cloud. :type name: string :param name: [in] name of the drawable. :type scan:
PointCloud
:param scan: [in] the point cloud to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:Ptr
:return: a drawable node.Overload 8:
Create a drawable node for a 3d model. :type name: string :param name: [in] name of the drawable. :type model: rw::core::Ptr< rw::geometry::Model3D > :param model: [in] the 3d model to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 9:
Create a drawable node for a 3d model. :type name: string :param name: [in] name of the drawable. :type model: rw::core::Ptr< rw::geometry::Model3D > :param model: [in] the 3d model to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 10:
Create a drawable node for a text label. :type name: string :param name: [in] name of the drawable. :type text: string :param text: [in] the text to draw. :type labelFrame: rw::core::Ptr< rw::kinematics::Frame > :param labelFrame: [in] the frame the label belongs to. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Virtual. :rtype:
Ptr
:return: a drawable node.Overload 11:
Create a drawable node for a text label. :type name: string :param name: [in] name of the drawable. :type text: string :param text: [in] the text to draw. :type labelFrame: rw::core::Ptr< rw::kinematics::Frame > :param labelFrame: [in] the frame the label belongs to. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Virtual. :rtype:
Ptr
:return: a drawable node.Overload 12:
Create a drawable node for a render. :type name: string :param name: [in] name of the drawable. :type render: rw::core::Ptr< rw::graphics::Render > :param render: [in] the render to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 13:
Create a drawable node for a render. :type name: string :param name: [in] name of the drawable. :type render: rw::core::Ptr< rw::graphics::Render > :param render: [in] the render to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 14:
Create a drawable node from a file. :type filename: string :param filename: [in] a filename (alternatively a string for a geometric primitive). :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 15:
Create a drawable node from a file. :type filename: string :param filename: [in] a filename (alternatively a string for a geometric primitive). :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.
- makeDrawableFrameAxis(*args)
Create a drawable node for a frame axis coordinate system. :type name: string :param name: [in] name of the drawable. :type size: float :param size: [in] size of the axis. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable geometry node.
- makeGroupNode(name)
Make a group node. :type name: string :param name: [in] name of the node. :rtype:
Ptr
:return: new group node.
- pickDrawable(info, x, y)
picks the drawable in the scene that intersects with the ray (x,y,-1) in camera coordinates.
- Parameters
info (
RenderInfo
) – [in] rendering information.x (int) – [in] first camera coordinate.
y (int) – [in] second camera coordinate.
- Return type
Ptr
- Returns
the picked drawable.
- project(camera, x, y, z)
this method projects a 3D coordinate to 2D screen coordinates from the last draw’n scene.
Notes: this method relies on a previously drawn scene, eg. call to draw(). Any thing drawn in the scene can be “picked” by this method.
(0,0) is located in the upper left corner, with x-axis increasing to the right and y-axis increasing to the bottom. The negative z-axis points into the scene- :type camera: rw::graphics::SceneCamera::Ptr :param camera: [in] the SceneCamera. :type x: float :param x: [in] x coordinate [0;viewport.width] :type y: float :param y: [in] y coordinate [0;viewport.height] :type z: float :param z: [in] z coordinate :rtype: rw::math::Vector3D< double > :return: the 2D point,
- removeCameraGroup(*args)
Overload 1:
Remove a camera group. :type cgroup: rw::core::Ptr< rw::graphics::CameraGroup > :param cgroup: [in] the group to remove.
Overload 2:
Remove a camera group. :type name: string :param name: [in] the name of the group.
- removeChild(name, node)
Removes child with the specified name from the node.
- Parameters
name (string) – [in] Name of child to remove
node (
Ptr
) – [in] Node to remove from
- Return type
boolean
- Returns
true if found and successfully removed.
- removeDrawable(*args)
Overload 1:
Remove a specific drawable. :type drawable:
Ptr
:param drawable: [in] the drawable. :rtype: boolean :return: true if removed, false otherwise.Overload 2:
Remove a specific drawable. :type drawable:
Ptr
:param drawable: [in] the drawable. :type node: rw::core::Ptr< rw::graphics::SceneNode > :param node: [in] only search this node and children recursively. :rtype: boolean :return: true if removed, false otherwise.Overload 3:
Remove a specific drawable with a given name. :type name: string :param name: [in] the name. :rtype: boolean :return: true if removed, false otherwise.
- removeDrawables(*args)
Overload 1:
Remove a node. :type node:
Ptr
:param node: [in] the group node to remove. :rtype: boolean :return: true if removed, false otherwise.Overload 2:
Remove all drawables with a given name. :type name: string :param name: [in] the name. :rtype: boolean :return: true if removed, false otherwise.
- setRoot(node)
Set the root of the scene graph. :type node:
Ptr
:param node: [in] the root node.
- property thisown
The membership flag
- unproject(camera, x, y)
this method unprojects a 2D screen coordinate to 3D coordinates from the last draw’n scene. Which is the closest 3d point from the intersection of the ray (x,y,-1) and the objects drawn in the scene.
Notes: this method relies on a previously drawn scene, eg. call to draw(). Any thing drawn in the scene can be “picked” by this method.
(0,0) is located in the upper left corner, with x-axis increasing to the right and y-axis increasing to the bottom. The negative z-axis points into the scene- :type camera: rw::graphics::SceneCamera::Ptr :param camera: [in] the scene camera. :type x: int :param x: [in] x coordinate [0;viewport.width] :type y: int :param y: [in] y coordinate [0;viewport.height] :rtype: rw::math::Vector3D< double > :return: the 3D point,
- update()
should be called after the structure of the scene has been changed
- class sdurw_graphics.sdurw_graphics.SceneGraphCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.SceneGraphPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addCameraGroup(cgroup)
Add a camera group. :type cgroup: rw::core::Ptr< rw::graphics::CameraGroup > :param cgroup: [in] the group to add.
- addChild(child, parent)
add a drawable to a node
- clear()
Clear the scene graph.
- cptr()
- deref()
The pointer stored in the object.
- draw(info)
draws the scene, using the specified render information :type info:
RenderInfo
:param info: documentation missing !
- findCameraGroup(name)
Find a camera group. :type name: string :param name: [in] name of the group. :rtype: rw::core::Ptr< rw::graphics::CameraGroup > :return: the camera group if found, else NULL.
- findDrawable(*args)
Overload 1:
Find a drawable node in the scene graph. :type name: string :param name: [in] the name of the drawable node. :rtype:
Ptr
:return: the node if found, NULL otherwise.Overload 2:
std::string&)
- Parameters
node (rw::core::Ptr< rw::graphics::SceneNode >) – [in] search only this node and all children recursively.
- findDrawables(name)
Find multiple drawable nodes in the scene graph. :type name: string :param name: [in] the name of the drawable node(s). :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a vector of all nodes with the given name.
- getCameraGroups()
Get all camera groups. :rtype: std::list< rw::core::Ptr< rw::graphics::CameraGroup > > :return: a list of camera groups.
- getDeref()
Member access operator.
- getDrawables(*args)
Overload 1:
get all drawables in the scene. :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return:
Overload 2:
get a vector of drawables attached to a node :type node: rw::core::Ptr< rw::graphics::SceneNode > :param node: :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return:
- getDrawablesRec(node)
get all drawable nodes in the subtree of node. nodes of type camera will not be traversed :type node: rw::core::Ptr< rw::graphics::SceneNode > :param node: [in] :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return:
- getRoot()
Get the root of the scene graph. :rtype:
Ptr
:return: the root group node.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- makeCamera(name)
Create a new scene camera. :type name: string :param name: [in] name of the camera. :rtype: rw::core::Ptr< rw::graphics::SceneCamera > :return: the new scene camera.
- makeCameraGroup(name)
Create a camera group. :type name: string :param name: [in] name of the group. :rtype: rw::core::Ptr< rw::graphics::CameraGroup > :return: a new camera group.
- makeDrawable(*args)
Overload 1:
Create a drawable node for a geometry. :type name: string :param name: [in] name of the drawable. :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] the geometry to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable geometry node.Overload 2:
Create a drawable node for lines. :type name: string :param name: [in] name of the drawable. :type lines: std::vector< rw::geometry::Line > :param lines: [in] the lines to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable geometry node.Overload 3:
Create a drawable node for lines. :type name: string :param name: [in] name of the drawable. :type lines: std::vector< rw::geometry::Line > :param lines: [in] the lines to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable geometry node.Overload 4:
Create a drawable node for an image. :type name: string :param name: [in] name of the drawable. :type img:
Image
:param img: [in] the image to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:Ptr
:return: a drawable node.Overload 5:
Create a drawable node for an image. :type name: string :param name: [in] name of the drawable. :type img:
Image
:param img: [in] the image to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:Ptr
:return: a drawable node.Overload 6:
Create a drawable node for a point cloud. :type name: string :param name: [in] name of the drawable. :type scan:
PointCloud
:param scan: [in] the point cloud to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:Ptr
:return: a drawable node.Overload 7:
Create a drawable node for a point cloud. :type name: string :param name: [in] name of the drawable. :type scan:
PointCloud
:param scan: [in] the point cloud to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:Ptr
:return: a drawable node.Overload 8:
Create a drawable node for a 3d model. :type name: string :param name: [in] name of the drawable. :type model: rw::core::Ptr< rw::geometry::Model3D > :param model: [in] the 3d model to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 9:
Create a drawable node for a 3d model. :type name: string :param name: [in] name of the drawable. :type model: rw::core::Ptr< rw::geometry::Model3D > :param model: [in] the 3d model to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 10:
Create a drawable node for a text label. :type name: string :param name: [in] name of the drawable. :type text: string :param text: [in] the text to draw. :type labelFrame: rw::core::Ptr< rw::kinematics::Frame > :param labelFrame: [in] the frame the label belongs to. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Virtual. :rtype:
Ptr
:return: a drawable node.Overload 11:
Create a drawable node for a text label. :type name: string :param name: [in] name of the drawable. :type text: string :param text: [in] the text to draw. :type labelFrame: rw::core::Ptr< rw::kinematics::Frame > :param labelFrame: [in] the frame the label belongs to. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Virtual. :rtype:
Ptr
:return: a drawable node.Overload 12:
Create a drawable node for a render. :type name: string :param name: [in] name of the drawable. :type render: rw::core::Ptr< rw::graphics::Render > :param render: [in] the render to draw. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 13:
Create a drawable node for a render. :type name: string :param name: [in] name of the drawable. :type render: rw::core::Ptr< rw::graphics::Render > :param render: [in] the render to draw. :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 14:
Create a drawable node from a file. :type filename: string :param filename: [in] a filename (alternatively a string for a geometric primitive). :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.Overload 15:
Create a drawable node from a file. :type filename: string :param filename: [in] a filename (alternatively a string for a geometric primitive). :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable node.
- makeDrawableFrameAxis(*args)
Create a drawable node for a frame axis coordinate system. :type name: string :param name: [in] name of the drawable. :type size: float :param size: [in] size of the axis. :type dmask: int, optional :param dmask: [in] (optional) the type of drawable. Default is DrawableNode::Physical. :rtype:
Ptr
:return: a drawable geometry node.
- makeGroupNode(name)
Make a group node. :type name: string :param name: [in] name of the node. :rtype:
Ptr
:return: new group node.
- pickDrawable(info, x, y)
picks the drawable in the scene that intersects with the ray (x,y,-1) in camera coordinates.
- Parameters
info (
RenderInfo
) – [in] rendering information.x (int) – [in] first camera coordinate.
y (int) – [in] second camera coordinate.
- Return type
Ptr
- Returns
the picked drawable.
- project(camera, x, y, z)
this method projects a 3D coordinate to 2D screen coordinates from the last draw’n scene.
Notes: this method relies on a previously drawn scene, eg. call to draw(). Any thing drawn in the scene can be “picked” by this method.
(0,0) is located in the upper left corner, with x-axis increasing to the right and y-axis increasing to the bottom. The negative z-axis points into the scene- :type camera: rw::graphics::SceneCamera::Ptr :param camera: [in] the SceneCamera. :type x: float :param x: [in] x coordinate [0;viewport.width] :type y: float :param y: [in] y coordinate [0;viewport.height] :type z: float :param z: [in] z coordinate :rtype: rw::math::Vector3D< double > :return: the 2D point,
- removeCameraGroup(*args)
Overload 1:
Remove a camera group. :type cgroup: rw::core::Ptr< rw::graphics::CameraGroup > :param cgroup: [in] the group to remove.
Overload 2:
Remove a camera group. :type name: string :param name: [in] the name of the group.
- removeChild(name, node)
Removes child with the specified name from the node.
- Parameters
name (string) – [in] Name of child to remove
node (
Ptr
) – [in] Node to remove from
- Return type
boolean
- Returns
true if found and successfully removed.
- removeDrawable(*args)
Overload 1:
Remove a specific drawable. :type drawable:
Ptr
:param drawable: [in] the drawable. :rtype: boolean :return: true if removed, false otherwise.Overload 2:
Remove a specific drawable. :type drawable:
Ptr
:param drawable: [in] the drawable. :type node: rw::core::Ptr< rw::graphics::SceneNode > :param node: [in] only search this node and children recursively. :rtype: boolean :return: true if removed, false otherwise.Overload 3:
Remove a specific drawable with a given name. :type name: string :param name: [in] the name. :rtype: boolean :return: true if removed, false otherwise.
- removeDrawables(*args)
Overload 1:
Remove a node. :type node:
Ptr
:param node: [in] the group node to remove. :rtype: boolean :return: true if removed, false otherwise.Overload 2:
Remove all drawables with a given name. :type name: string :param name: [in] the name. :rtype: boolean :return: true if removed, false otherwise.
- setRoot(node)
Set the root of the scene graph. :type node:
Ptr
:param node: [in] the root node.
- property thisown
The membership flag
- unproject(camera, x, y)
this method unprojects a 2D screen coordinate to 3D coordinates from the last draw’n scene. Which is the closest 3d point from the intersection of the ray (x,y,-1) and the objects drawn in the scene.
Notes: this method relies on a previously drawn scene, eg. call to draw(). Any thing drawn in the scene can be “picked” by this method.
(0,0) is located in the upper left corner, with x-axis increasing to the right and y-axis increasing to the bottom. The negative z-axis points into the scene- :type camera: rw::graphics::SceneCamera::Ptr :param camera: [in] the scene camera. :type x: int :param x: [in] x coordinate [0;viewport.width] :type y: int :param y: [in] y coordinate [0;viewport.height] :rtype: rw::math::Vector3D< double > :return: the 3D point,
- update()
should be called after the structure of the scene has been changed
- class sdurw_graphics.sdurw_graphics.SceneGraphRenderInfo
Bases:
RenderInfo
all general render information is located in this struct
- __init__()
Constructor.
- property cams
Camera groups.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.SceneNode(*args, **kwargs)
Bases:
object
a node that can have leafs (DrawableNode) or other nodes as children.
- Back = 1
Add to back of list (default).
- CameraType = 1
For a SceneCamera.
- DrawableType = 2
For a DrawableNode.
- Front = 0
Add to front of list.
- GroupType = 0
For a GroupNode.
- UserBeginType = 1024
For user defined types.
- __init__(*args, **kwargs)
- addParent(*args)
Add a parent node. :type node:
Ptr
:param node: [in] the node to add as parent node. :type policy: int, optional :param policy: [in] the AddPolicy (default is Back).
- asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode. :rtype:
SceneCamera
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asDrawableNode()
Get a pointer to a DrawableNode, if this is a DrawableNode. :rtype:
DrawableNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode. :rtype:
GroupNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- getName()
Get the name of the node. :rtype: string :return: the name.
- getType()
Get the NodeType. :rtype: int :return: the type of node.
- hasParent(parent)
Check if the given node is a parent node. :type parent:
Ptr
:param parent: [in] the node to look for. :rtype: boolean :return: true if parent is a parent node.
- static removeParent(*args)
Overload 1:
erases the parent from the parent list. Notes: this node is not removed from the parents child list, using this :type node:
Ptr
:param node: [in] the parent to remove.Overload 2:
Remove a parent node. :type node:
Ptr
:param node: [in] the node. :type parent:Ptr
:param parent: [in] the parent node to remove as a parent of node.
- setName(name)
Set the name of this node. :type name: string :param name: [in] a new name.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.SceneNodeCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.SceneNodePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addParent(*args)
Add a parent node. :type node:
Ptr
:param node: [in] the node to add as parent node. :type policy: int, optional :param policy: [in] the AddPolicy (default is Back).
- asCameraNode()
Get a pointer to a CameraNode, if this is a CameraNode. :rtype:
SceneCamera
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asDrawableNode()
Get a pointer to a DrawableNode, if this is a DrawableNode. :rtype:
DrawableNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- asGroupNode()
Get a pointer to a GroupNode, if this is a GroupNode. :rtype:
GroupNode
:return: a pointer, or NULL if the SceneNode is not of correct type.
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getName()
Get the name of the node. :rtype: string :return: the name.
- getType()
Get the NodeType. :rtype: int :return: the type of node.
- hasParent(parent)
Check if the given node is a parent node. :type parent:
Ptr
:param parent: [in] the node to look for. :rtype: boolean :return: true if parent is a parent node.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- removeParent(*args)
Overload 1:
erases the parent from the parent list. Notes: this node is not removed from the parents child list, using this :type node:
Ptr
:param node: [in] the parent to remove.Overload 2:
Remove a parent node. :type node:
Ptr
:param node: [in] the node. :type parent:Ptr
:param parent: [in] the parent node to remove as a parent of node.
- setName(name)
Set the name of this node. :type name: string :param name: [in] a new name.
- property thisown
The membership flag
- sdurw_graphics.sdurw_graphics.SceneNode_removeParent(*args)
Overload 1:
erases the parent from the parent list. Notes: this node is not removed from the parents child list, using this :type node:
Ptr
:param node: [in] the parent to remove.Overload 2:
Remove a parent node. :type node:
Ptr
:param node: [in] the node. :type parent:Ptr
:param parent: [in] the parent node to remove as a parent of node.
- class sdurw_graphics.sdurw_graphics.SceneViewer(*args, **kwargs)
Bases:
object
interface for viewing a scene graph.
The scene graph viewer
- __init__(*args, **kwargs)
- autoZoom()
Automatically fits all frames inside the viewport by moving camera in its z-axis.
- createView(name, enableBackground=False)
Create a new view. :type name: string :param name: [in] name of view. :type enableBackground: boolean, optional :param enableBackground: [in] (optional) enable the background. Default is false. :rtype: rw::graphics::SceneViewer::View::Ptr :return: the new view.
- destroyView(view)
Destroy view. :type view: rw::graphics::SceneViewer::View::Ptr :param view: [in] the view to destroy.
- getCurrentView()
Get the currently selected view. :rtype: rw::graphics::SceneViewer::View::Ptr :return: the view.
- getLogo()
get the logo that is displayed in the 3d scene
- getMainView()
Get the main view. :rtype: rw::graphics::SceneViewer::View::Ptr :return: main view.
- getPropertyMap()
get propertymap
- getScene()
get the current scene graph
- getTransform()
get the current rotation of the view :rtype: rw::math::Transform3D< double > :return: orientation of the view
- getViewCamera()
Get the view camera. :rtype: rw::graphics::SceneCamera::Ptr :return: a scene camera.
- getViewCenter()
Get the view center. :rtype: rw::math::Vector3D< double > :return: the center.
- getViews()
Get all views. :rtype: std::vector< rw::graphics::SceneViewer::View::Ptr > :return: the views.
- getWorldNode()
Get the world node. :rtype:
Ptr
:return: the world node.
- pickDrawable(*args)
Overload 1:
picks the drawable in the scene that intersects with the ray (x,y,-1) in camera coordinates.
- Parameters
x (int) – [in] first camera coordinate.
y (int) – [in] second camera coordinate.
- Return type
Ptr
- Returns
the picked drawable.
- Overload 2:
&,int,int)
- renderView(view)
Render a view. :type view: rw::graphics::SceneViewer::View::Ptr :param view: [in] the view to render
- saveBufferToFile(filename, fillR, fillG, fillB)
Saves the current 3D view to disk as either jpg, bmp or png.
If failing a std::string is thrown with a detailed description of what when wrong.
- Parameters
filename (string) – [in] Path and name of the file. The filename extension should be either “.jpg”, “.bmp” or “.png” to specify which format to use.
fillR (int) – [in] Fill color if viewport is smaller than image, red component [0,255]
fillG (int) – [in] Fill color if viewport is smaller than image, green component [0,255]
fillB (int) – [in] Fill color if viewport is smaller than image, blue component [0,255]
- selectView(view)
Select a view. :type view: rw::graphics::SceneViewer::View::Ptr :param view: [in] the view to select.
- setLogo(string)
set the logo that is displayed in the 3d scene
- setTransform(t3d)
set the orientation of the view. The view will look in the positive direction of the z-axis, with x-axis as the width and the y-axis as the height. Origin of view is in the center of the image. :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform relative to world
- setWorkCellScene(wcscene)
Set the WorkCell scene. :type wcscene: rw::core::Ptr< rw::graphics::WorkCellScene > :param wcscene: [in] the workcell scene.
- setWorldNode(wnode)
Set the world group node. :type wnode:
Ptr
:param wnode: [in] the world node.
- property thisown
The membership flag
- updateState(state)
Set a new state. :type state:
State
:param state: [in] new state.
- updateView()
Update the view.
- zoom(amount)
Move the camera along its z-axis. :type amount: float :param amount: [in] the amount of zoom.
- class sdurw_graphics.sdurw_graphics.SceneViewerCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getLogo()
get the logo that is displayed in the 3d scene
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.SceneViewerPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- autoZoom()
Automatically fits all frames inside the viewport by moving camera in its z-axis.
- cptr()
- createView(name, enableBackground=False)
Create a new view. :type name: string :param name: [in] name of view. :type enableBackground: boolean, optional :param enableBackground: [in] (optional) enable the background. Default is false. :rtype: rw::graphics::SceneViewer::View::Ptr :return: the new view.
- deref()
The pointer stored in the object.
- destroyView(view)
Destroy view. :type view: rw::graphics::SceneViewer::View::Ptr :param view: [in] the view to destroy.
- getCurrentView()
Get the currently selected view. :rtype: rw::graphics::SceneViewer::View::Ptr :return: the view.
- getDeref()
Member access operator.
- getLogo()
get the logo that is displayed in the 3d scene
- getMainView()
Get the main view. :rtype: rw::graphics::SceneViewer::View::Ptr :return: main view.
- getPropertyMap()
get propertymap
- getScene()
get the current scene graph
- getTransform()
get the current rotation of the view :rtype: rw::math::Transform3D< double > :return: orientation of the view
- getViewCamera()
Get the view camera. :rtype: rw::graphics::SceneCamera::Ptr :return: a scene camera.
- getViewCenter()
Get the view center. :rtype: rw::math::Vector3D< double > :return: the center.
- getViews()
Get all views. :rtype: std::vector< rw::graphics::SceneViewer::View::Ptr > :return: the views.
- getWorldNode()
Get the world node. :rtype:
Ptr
:return: the world node.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- pickDrawable(*args)
Overload 1:
picks the drawable in the scene that intersects with the ray (x,y,-1) in camera coordinates.
- Parameters
x (int) – [in] first camera coordinate.
y (int) – [in] second camera coordinate.
- Return type
Ptr
- Returns
the picked drawable.
- Overload 2:
&,int,int)
- renderView(view)
Render a view. :type view: rw::graphics::SceneViewer::View::Ptr :param view: [in] the view to render
- saveBufferToFile(filename, fillR, fillG, fillB)
Saves the current 3D view to disk as either jpg, bmp or png.
If failing a std::string is thrown with a detailed description of what when wrong.
- Parameters
filename (string) – [in] Path and name of the file. The filename extension should be either “.jpg”, “.bmp” or “.png” to specify which format to use.
fillR (int) – [in] Fill color if viewport is smaller than image, red component [0,255]
fillG (int) – [in] Fill color if viewport is smaller than image, green component [0,255]
fillB (int) – [in] Fill color if viewport is smaller than image, blue component [0,255]
- selectView(view)
Select a view. :type view: rw::graphics::SceneViewer::View::Ptr :param view: [in] the view to select.
- setLogo(string)
set the logo that is displayed in the 3d scene
- setTransform(t3d)
set the orientation of the view. The view will look in the positive direction of the z-axis, with x-axis as the width and the y-axis as the height. Origin of view is in the center of the image. :type t3d: rw::math::Transform3D< double > :param t3d: [in] transform relative to world
- setWorkCellScene(wcscene)
Set the WorkCell scene. :type wcscene: rw::core::Ptr< rw::graphics::WorkCellScene > :param wcscene: [in] the workcell scene.
- setWorldNode(wnode)
Set the world group node. :type wnode:
Ptr
:param wnode: [in] the world node.
- property thisown
The membership flag
- updateState(state)
Set a new state. :type state:
State
:param state: [in] new state.
- updateView()
Update the view.
- zoom(amount)
Move the camera along its z-axis. :type amount: float :param amount: [in] the amount of zoom.
- class sdurw_graphics.sdurw_graphics.TextureData(*args)
Bases:
Texture
container for storing texture data.
- __init__(*args)
- Overload 1:
constructor
Overload 2:
constructor :type name: string :param name: [in] texture id :type img:
Ptr
:param img: [in] texture dataOverload 3:
constructor :type name: string :param name: [in] texture id :type r: float :param r: [in] red value [0:1] :type g: float :param g: [in] green value [0:1] :type b: float :param b: [in] blue value [0:1]
- clone()
Clone the current texture. The image data will be shared with the clone :rtype: rw::core::Ptr< rw::geometry::Model3D::Texture > :return: rw::core::Ptr<Texture>
- getImageData()
get image data :rtype: rw::core::Ptr< rw::sensor::Image > :return:
- getName()
get id of texture :rtype: string :return:
- getRGBData()
get RGB data :rtype: rw::math::Vector3D< float > :return:
- hasImageData()
check if this texture has image data :rtype: boolean :return: true if it has image data, false otherwise
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.TextureDataCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- clone()
Clone the current texture. The image data will be shared with the clone :rtype: rw::core::Ptr< rw::geometry::Model3D::Texture > :return: rw::core::Ptr<Texture>
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getImageData()
get image data :rtype: rw::core::Ptr< rw::sensor::Image > :return:
- getName()
get id of texture :rtype: string :return:
- getRGBData()
get RGB data :rtype: rw::math::Vector3D< float > :return:
- hasImageData()
check if this texture has image data :rtype: boolean :return: true if it has image data, false otherwise
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.TextureDataPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- clone()
Clone the current texture. The image data will be shared with the clone :rtype: rw::core::Ptr< rw::geometry::Model3D::Texture > :return: rw::core::Ptr<Texture>
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getImageData()
get image data :rtype: rw::core::Ptr< rw::sensor::Image > :return:
- getName()
get id of texture :rtype: string :return:
- getRGBData()
get RGB data :rtype: rw::math::Vector3D< float > :return:
- hasImageData()
check if this texture has image data :rtype: boolean :return: true if it has image data, false otherwise
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.View(name)
Bases:
object
- __init__(name)
Construct new view. :type name: string :param name: [in] name of the view.
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.WorkCellScene(scene)
Bases:
object
class for wrapping the SceneGraph interface such that it extends the scene-graph functionality to work on frames and workcells.
The scene graph is composed of nodes which are related to Frames. Each frame can have several Drawables attached which can be considered as leafs. Beside keeping track of the mapping from frames to scenenodes, this class also adds settings such as highlighted, adding of frameaxis(per Frame), visibility and so on.
- __init__(scene)
constructor - creates a workcell with a current SceneGraph :type scene:
Ptr
:param scene: [in] scene graph to use.
- addDrawable(*args)
Overload 1:
create and add a drawable node from a filename to the scene :type filename: string :param filename: [in] name of drawable node :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable nodeOverload 2:
add a drawable node to the scene :type drawable:
Ptr
:param drawable: [in] the drawable :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed
- addFrameAxis(*args)
create and add a drawable node of a frame axis to the scene :type name: string :param name: [in] name of drawable node :type size: float :param size: [in] the length of the axis arrows in meters :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable node geometry
- addGeometry(*args)
create and add a drawable geometry node of any type of geometry to the scene :type name: string :param name: [in] name of drawable node :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] the geometry :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype: rw::core::Ptr< rw::graphics::DrawableGeometryNode > :return: the drawable node geometry
- addImage(*args)
create and add a drawable node of an image to the scene :type name: string :param name: [in] name of drawable node :type img:
Image
:param img: [in] the image :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:Ptr
:return: the drawable node geometry Notes: the size of the image in the scene will be pixel/cm. To change this please use scale.
- addLines(*args)
create and add a drawable geometry node of line geometry to the scene :type name: string :param name: [in] name of drawable node :type lines: std::vector< rw::geometry::Line > :param lines: [in] the line geometry :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype: rw::core::Ptr< rw::graphics::DrawableGeometryNode > :return: the drawable node geometry
- addModel3D(*args)
create and add a drawable node of a model3d to the scene :type name: string :param name: [in] name of drawable node :type model: rw::core::Ptr< rw::geometry::Model3D > :param model: [in] the model3d :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable node geometry
- addRender(*args)
create and add a drawable node of a render, to the scene :type name: string :param name: [in] name of drawable node :type render: rw::core::Ptr< rw::graphics::Render > :param render: [in] the render :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable node
- addScan(*args)
create and add a drawable node of a scan to the scene :type name: string :param name: [in] name of drawable node :type scan:
PointCloud
:param scan: [in] the scan :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:Ptr
:return: the drawable node
- addText(*args)
create and add a drawable node of a textlabel :type name: string :param name: [in] name of drawable node :type text: string :param text: [in] the label text :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable node
- clearCache()
any cached drawables or scene nodes are deleted
- draw(info)
renders the complete scene using the settings in info.
This basically forwards the call to SceneGraph::draw
- Parameters
info (
RenderInfo
) – [in] render settings
- findDrawable(*args)
Overload 1:
find a drawable by name name. :type name: string :param name: [in] the name of the drawable :rtype:
Ptr
:return: a drawable with name name or NULL if no such drawable exist in the sceneOverload 2:
find a drawable by name name that is attached to frame frame :type name: string :param name: [in] the name of the drawable :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] search only the subtree beginning from this frame. :rtype:
Ptr
:return: a drawable with name name or NULL if no such drawable exist in the scene
- findDrawables(name)
find all drawables by name name. :type name: string :param name: [in] the name of the drawable :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: all drawables with name name
- getDrawMask(f)
get the draw mask of the drawables of a specific frame :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: int :return: the drawmask
- getDrawType(f)
get how drawables of a specific frame is to be rendered :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the Frame :rtype: int :return: the drawtype
- getDrawables(*args)
Overload 1:
get all drawables of the WorkCellScene :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a list of drawables
Overload 2:
get all drawables of a specific frame in the WorkCellScene :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a list of drawables
- getDrawablesRec(f, state)
get all drawables of a frame and all frames that kinematicly is connected to the sub-tree of f. :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :type state:
State
:param state: [in] the current state :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a list of drawables
- getFrame(d)
get the frame that a specific drawable d is associated to :type d:
Ptr
:param d: [in] the drawable :rtype:Frame
:return: the first frame that the drawable is associated to, or NULL if there are noassociations
- getNode(frame)
Get the GroupNode corresponding to the given frame. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame. :rtype:
Ptr
:return: group node.
- getWorkCell()
get the workcell that is currently being rendered.
- getWorldNode()
gets the node of the scene graph that maps to the world frame of the workcell. :rtype:
Ptr
:return: scene node
- isFrameAxisVisible(f)
test if frame-axis is visible :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame axis of frame is set to be drawn, false otherwise
- isFrameLabelVisible(f)
test if frame-label is visible :type f:
Ptr
:param f: [in] the frame :rtype: boolean :return: true if frame label of frame is set to be drawn, false otherwise
- isHighlighted(f)
test if a frame is highlighted or not :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame is highlighted, false if not
- isVisible(f)
test if a frame is visible or not :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame is visible, false if not
- removeDrawable(*args)
Overload 1:
remove a drawable from the scene :type drawable:
Ptr
:param drawable: [in] the drawable :rtype: boolean :return: true if successfullOverload 2:
remove a drawable from a specific frame :type drawable:
Ptr
:param drawable: [in] the drawable :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if successfullOverload 3:
remove first drawable by name name :type name: string :param name: [in] the name :rtype: boolean :return: true if successfull
Overload 4:
remove drawable by name and which is attached to frame f :type name: string :param name: [in] name of drawable :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if successfull
- removeDrawables(*args)
Overload 1:
remove all drawables on a frame :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if successfull
Overload 2:
remove all drawables with name name :type name: string :param name: [in] the name :rtype: boolean :return: true if successfull
- setDrawMask(mask, f)
set the draw mask of the drawables of a specific frame :type mask: int :param mask: [in] draw mask :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame
- setDrawType(type, f)
set how drawables of a specific frame should be rendered :type type: int :param type: [in] the drawtype :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the Frame
- setFrameAxisVisible(visible, f, size=0.25)
enables the drawing of the frame-axis of a frame. :type visible: boolean :param visible: [in] true if frame axis should be drawn, false otherwise :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :type size: float, optional :param size: [in] size of the frame-axis (default = 0.25)
- setFrameLabelVisible(visible, f)
enables the drawing of the frame label of a frame. :type visible: boolean :param visible: [in] true if frame label should be drawn, false otherwise :type f:
Ptr
:param f: [in] the frame
- setHighlighted(highlighted, f)
sets a frame to be highlighted or not. :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame. :type highlighted: boolean :param highlighted: [in] true if frame should be highlighted, false otherwise
- setState(state)
state changes are updated by calling this method. That includes transformations between frames, joints and stuff. :type state:
State
:param state: [in] the new state that is to be rendered
- setTransparency(alpha, f)
set drawables of a frame to be translusent :type alpha: float :param alpha: [in] range [0-1] where 1 is fully opaque and 0 is folly transparent :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] frame
- setVisible(visible, f)
sets the visibility of a frame and its drawables. :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame. :type visible: boolean :param visible: [in] true if frame should be visible, false otherwise
- setWorkCell(wc)
set the workcell to render :type wc: rw::core::Ptr< rw::models::WorkCell > :param wc: [in] the workcell that is to be rendered
- property thisown
The membership flag
- updateSceneGraph(state)
updates the state of the scenegraph to that of state :type state:
State
:param state:
- class sdurw_graphics.sdurw_graphics.WorkCellSceneCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getDrawMask(f)
get the draw mask of the drawables of a specific frame :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: int :return: the drawmask
- getDrawType(f)
get how drawables of a specific frame is to be rendered :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the Frame :rtype: int :return: the drawtype
- getDrawables(*args)
Overload 1:
get all drawables of the WorkCellScene :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a list of drawables
Overload 2:
get all drawables of a specific frame in the WorkCellScene :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a list of drawables
- getFrame(d)
get the frame that a specific drawable d is associated to :type d:
Ptr
:param d: [in] the drawable :rtype:Frame
:return: the first frame that the drawable is associated to, or NULL if there are noassociations
- getNode(frame)
Get the GroupNode corresponding to the given frame. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame. :rtype:
Ptr
:return: group node.
- isFrameAxisVisible(f)
test if frame-axis is visible :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame axis of frame is set to be drawn, false otherwise
- isFrameLabelVisible(f)
test if frame-label is visible :type f:
Ptr
:param f: [in] the frame :rtype: boolean :return: true if frame label of frame is set to be drawn, false otherwise
- isHighlighted(f)
test if a frame is highlighted or not :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame is highlighted, false if not
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- isVisible(f)
test if a frame is visible or not :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame is visible, false if not
- property thisown
The membership flag
- class sdurw_graphics.sdurw_graphics.WorkCellScenePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addDrawable(*args)
Overload 1:
create and add a drawable node from a filename to the scene :type filename: string :param filename: [in] name of drawable node :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable nodeOverload 2:
add a drawable node to the scene :type drawable:
Ptr
:param drawable: [in] the drawable :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed
- addFrameAxis(*args)
create and add a drawable node of a frame axis to the scene :type name: string :param name: [in] name of drawable node :type size: float :param size: [in] the length of the axis arrows in meters :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable node geometry
- addGeometry(*args)
create and add a drawable geometry node of any type of geometry to the scene :type name: string :param name: [in] name of drawable node :type geom: rw::core::Ptr< rw::geometry::Geometry > :param geom: [in] the geometry :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype: rw::core::Ptr< rw::graphics::DrawableGeometryNode > :return: the drawable node geometry
- addImage(*args)
create and add a drawable node of an image to the scene :type name: string :param name: [in] name of drawable node :type img:
Image
:param img: [in] the image :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:Ptr
:return: the drawable node geometry Notes: the size of the image in the scene will be pixel/cm. To change this please use scale.
- addLines(*args)
create and add a drawable geometry node of line geometry to the scene :type name: string :param name: [in] name of drawable node :type lines: std::vector< rw::geometry::Line > :param lines: [in] the line geometry :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype: rw::core::Ptr< rw::graphics::DrawableGeometryNode > :return: the drawable node geometry
- addModel3D(*args)
create and add a drawable node of a model3d to the scene :type name: string :param name: [in] name of drawable node :type model: rw::core::Ptr< rw::geometry::Model3D > :param model: [in] the model3d :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable node geometry
- addRender(*args)
create and add a drawable node of a render, to the scene :type name: string :param name: [in] name of drawable node :type render: rw::core::Ptr< rw::graphics::Render > :param render: [in] the render :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable node
- addScan(*args)
create and add a drawable node of a scan to the scene :type name: string :param name: [in] name of drawable node :type scan:
PointCloud
:param scan: [in] the scan :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:Ptr
:return: the drawable node
- addText(*args)
create and add a drawable node of a textlabel :type name: string :param name: [in] name of drawable node :type text: string :param text: [in] the label text :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame where the drawable is to be placed :type dmask: int, optional :param dmask: [in] the drawable mask :rtype:
Ptr
:return: the drawable node
- clearCache()
any cached drawables or scene nodes are deleted
- cptr()
- deref()
The pointer stored in the object.
- draw(info)
renders the complete scene using the settings in info.
This basically forwards the call to SceneGraph::draw
- Parameters
info (
RenderInfo
) – [in] render settings
- findDrawable(*args)
Overload 1:
find a drawable by name name. :type name: string :param name: [in] the name of the drawable :rtype:
Ptr
:return: a drawable with name name or NULL if no such drawable exist in the sceneOverload 2:
find a drawable by name name that is attached to frame frame :type name: string :param name: [in] the name of the drawable :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] search only the subtree beginning from this frame. :rtype:
Ptr
:return: a drawable with name name or NULL if no such drawable exist in the scene
- findDrawables(name)
find all drawables by name name. :type name: string :param name: [in] the name of the drawable :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: all drawables with name name
- getDeref()
Member access operator.
- getDrawMask(f)
get the draw mask of the drawables of a specific frame :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: int :return: the drawmask
- getDrawType(f)
get how drawables of a specific frame is to be rendered :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the Frame :rtype: int :return: the drawtype
- getDrawables(*args)
Overload 1:
get all drawables of the WorkCellScene :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a list of drawables
Overload 2:
get all drawables of a specific frame in the WorkCellScene :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a list of drawables
- getDrawablesRec(f, state)
get all drawables of a frame and all frames that kinematicly is connected to the sub-tree of f. :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :type state:
State
:param state: [in] the current state :rtype: std::vector< rw::graphics::DrawableNode::Ptr > :return: a list of drawables
- getFrame(d)
get the frame that a specific drawable d is associated to :type d:
Ptr
:param d: [in] the drawable :rtype:Frame
:return: the first frame that the drawable is associated to, or NULL if there are noassociations
- getNode(frame)
Get the GroupNode corresponding to the given frame. :type frame: rw::core::Ptr< rw::kinematics::Frame > :param frame: [in] the frame. :rtype:
Ptr
:return: group node.
- getWorkCell()
get the workcell that is currently being rendered.
- getWorldNode()
gets the node of the scene graph that maps to the world frame of the workcell. :rtype:
Ptr
:return: scene node
- isFrameAxisVisible(f)
test if frame-axis is visible :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame axis of frame is set to be drawn, false otherwise
- isFrameLabelVisible(f)
test if frame-label is visible :type f:
Ptr
:param f: [in] the frame :rtype: boolean :return: true if frame label of frame is set to be drawn, false otherwise
- isHighlighted(f)
test if a frame is highlighted or not :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame is highlighted, false if not
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- isVisible(f)
test if a frame is visible or not :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if frame is visible, false if not
- removeDrawable(*args)
Overload 1:
remove a drawable from the scene :type drawable:
Ptr
:param drawable: [in] the drawable :rtype: boolean :return: true if successfullOverload 2:
remove a drawable from a specific frame :type drawable:
Ptr
:param drawable: [in] the drawable :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if successfullOverload 3:
remove first drawable by name name :type name: string :param name: [in] the name :rtype: boolean :return: true if successfull
Overload 4:
remove drawable by name and which is attached to frame f :type name: string :param name: [in] name of drawable :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if successfull
- removeDrawables(*args)
Overload 1:
remove all drawables on a frame :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :rtype: boolean :return: true if successfull
Overload 2:
remove all drawables with name name :type name: string :param name: [in] the name :rtype: boolean :return: true if successfull
- setDrawMask(mask, f)
set the draw mask of the drawables of a specific frame :type mask: int :param mask: [in] draw mask :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame
- setDrawType(type, f)
set how drawables of a specific frame should be rendered :type type: int :param type: [in] the drawtype :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the Frame
- setFrameAxisVisible(visible, f, size=0.25)
enables the drawing of the frame-axis of a frame. :type visible: boolean :param visible: [in] true if frame axis should be drawn, false otherwise :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame :type size: float, optional :param size: [in] size of the frame-axis (default = 0.25)
- setFrameLabelVisible(visible, f)
enables the drawing of the frame label of a frame. :type visible: boolean :param visible: [in] true if frame label should be drawn, false otherwise :type f:
Ptr
:param f: [in] the frame
- setHighlighted(highlighted, f)
sets a frame to be highlighted or not. :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame. :type highlighted: boolean :param highlighted: [in] true if frame should be highlighted, false otherwise
- setState(state)
state changes are updated by calling this method. That includes transformations between frames, joints and stuff. :type state:
State
:param state: [in] the new state that is to be rendered
- setTransparency(alpha, f)
set drawables of a frame to be translusent :type alpha: float :param alpha: [in] range [0-1] where 1 is fully opaque and 0 is folly transparent :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] frame
- setVisible(visible, f)
sets the visibility of a frame and its drawables. :type f: rw::core::Ptr< rw::kinematics::Frame > :param f: [in] the frame. :type visible: boolean :param visible: [in] true if frame should be visible, false otherwise
- setWorkCell(wc)
set the workcell to render :type wc: rw::core::Ptr< rw::models::WorkCell > :param wc: [in] the workcell that is to be rendered
- property thisown
The membership flag
- updateSceneGraph(state)
updates the state of the scenegraph to that of state :type state:
State
:param state:
- sdurw_graphics.sdurw_graphics.ownedPtr(*args)
Overload 1:
A Ptr that takes ownership over a raw pointer ptr.
Overload 2:
A Ptr that takes ownership over a raw pointer ptr.
Overload 3:
A Ptr that takes ownership over a raw pointer ptr.
Overload 4:
A Ptr that takes ownership over a raw pointer ptr.
Overload 5:
A Ptr that takes ownership over a raw pointer ptr.
Overload 6:
A Ptr that takes ownership over a raw pointer ptr.
Overload 7:
A Ptr that takes ownership over a raw pointer ptr.
Overload 8:
A Ptr that takes ownership over a raw pointer ptr.
Overload 9:
A Ptr that takes ownership over a raw pointer ptr.
Overload 10:
A Ptr that takes ownership over a raw pointer ptr.
Overload 11:
A Ptr that takes ownership over a raw pointer ptr.
Overload 12:
A Ptr that takes ownership over a raw pointer ptr.
Overload 13:
A Ptr that takes ownership over a raw pointer ptr.
Overload 14:
A Ptr that takes ownership over a raw pointer ptr.
Overload 15:
A Ptr that takes ownership over a raw pointer ptr.
Overload 16:
A Ptr that takes ownership over a raw pointer ptr.
Overload 17:
A Ptr that takes ownership over a raw pointer ptr.
Overload 18:
A Ptr that takes ownership over a raw pointer ptr.
Overload 19:
A Ptr that takes ownership over a raw pointer ptr.
Overload 20:
A Ptr that takes ownership over a raw pointer ptr.
Overload 21:
A Ptr that takes ownership over a raw pointer ptr.
Overload 22:
A Ptr that takes ownership over a raw pointer ptr.
Overload 23:
A Ptr that takes ownership over a raw pointer ptr.
Overload 24:
A Ptr that takes ownership over a raw pointer ptr.
Overload 25:
A Ptr that takes ownership over a raw pointer ptr.
Overload 26:
A Ptr that takes ownership over a raw pointer ptr.
Overload 27:
A Ptr that takes ownership over a raw pointer ptr.
Overload 28:
A Ptr that takes ownership over a raw pointer ptr.
Overload 29:
A Ptr that takes ownership over a raw pointer ptr.
Overload 30:
A Ptr that takes ownership over a raw pointer ptr.
Overload 31:
A Ptr that takes ownership over a raw pointer ptr.
Overload 32:
A Ptr that takes ownership over a raw pointer ptr.
Overload 33:
A Ptr that takes ownership over a raw pointer ptr.
Overload 34:
A Ptr that takes ownership over a raw pointer ptr.
Overload 35:
A Ptr that takes ownership over a raw pointer ptr.
Overload 36:
A Ptr that takes ownership over a raw pointer ptr.
Overload 37:
A Ptr that takes ownership over a raw pointer ptr.
Overload 38:
A Ptr that takes ownership over a raw pointer ptr.
Overload 39:
A Ptr that takes ownership over a raw pointer ptr.
Overload 40:
A Ptr that takes ownership over a raw pointer ptr.
Overload 41:
A Ptr that takes ownership over a raw pointer ptr.
Overload 42:
A Ptr that takes ownership over a raw pointer ptr.
Overload 43:
A Ptr that takes ownership over a raw pointer ptr.
Overload 44:
A Ptr that takes ownership over a raw pointer ptr.
Overload 45:
A Ptr that takes ownership over a raw pointer ptr.
Overload 46:
A Ptr that takes ownership over a raw pointer ptr.
Overload 47:
A Ptr that takes ownership over a raw pointer ptr.
Overload 48:
A Ptr that takes ownership over a raw pointer ptr.
Overload 49:
A Ptr that takes ownership over a raw pointer ptr.
Overload 50:
A Ptr that takes ownership over a raw pointer ptr.
Overload 51:
A Ptr that takes ownership over a raw pointer ptr.
Overload 52:
A Ptr that takes ownership over a raw pointer ptr.
Overload 53:
A Ptr that takes ownership over a raw pointer ptr.
Overload 54:
A Ptr that takes ownership over a raw pointer ptr.
Overload 55:
A Ptr that takes ownership over a raw pointer ptr.
Overload 56:
A Ptr that takes ownership over a raw pointer ptr.
Overload 57:
A Ptr that takes ownership over a raw pointer ptr.
Overload 58:
A Ptr that takes ownership over a raw pointer ptr.
Overload 59:
A Ptr that takes ownership over a raw pointer ptr.
Overload 60:
A Ptr that takes ownership over a raw pointer ptr.
Overload 61:
A Ptr that takes ownership over a raw pointer ptr.
Overload 62:
A Ptr that takes ownership over a raw pointer ptr.
Overload 63:
A Ptr that takes ownership over a raw pointer ptr.
Overload 64:
A Ptr that takes ownership over a raw pointer ptr.
Overload 65:
A Ptr that takes ownership over a raw pointer ptr.
Overload 66:
A Ptr that takes ownership over a raw pointer ptr.
Overload 67:
A Ptr that takes ownership over a raw pointer ptr.
Overload 68:
A Ptr that takes ownership over a raw pointer ptr.
Overload 69:
A Ptr that takes ownership over a raw pointer ptr.
Overload 70:
A Ptr that takes ownership over a raw pointer ptr.
Overload 71:
A Ptr that takes ownership over a raw pointer ptr.
Overload 72:
A Ptr that takes ownership over a raw pointer ptr.
Overload 73:
A Ptr that takes ownership over a raw pointer ptr.
Overload 74:
A Ptr that takes ownership over a raw pointer ptr.
Overload 75:
A Ptr that takes ownership over a raw pointer ptr.
Overload 76:
A Ptr that takes ownership over a raw pointer ptr.
Overload 77:
A Ptr that takes ownership over a raw pointer ptr.
Overload 78:
A Ptr that takes ownership over a raw pointer ptr.
Overload 79:
A Ptr that takes ownership over a raw pointer ptr.
Overload 80:
A Ptr that takes ownership over a raw pointer ptr.
Overload 81:
A Ptr that takes ownership over a raw pointer ptr.
Overload 82:
A Ptr that takes ownership over a raw pointer ptr.
Overload 83:
A Ptr that takes ownership over a raw pointer ptr.
Overload 84:
A Ptr that takes ownership over a raw pointer ptr.
Overload 85:
A Ptr that takes ownership over a raw pointer ptr.
Overload 86:
A Ptr that takes ownership over a raw pointer ptr.
Overload 87:
A Ptr that takes ownership over a raw pointer ptr.
Overload 88:
A Ptr that takes ownership over a raw pointer ptr.
Overload 89:
A Ptr that takes ownership over a raw pointer ptr.
Overload 90:
A Ptr that takes ownership over a raw pointer ptr.
Overload 91:
A Ptr that takes ownership over a raw pointer ptr.
Overload 92:
A Ptr that takes ownership over a raw pointer ptr.
Overload 93:
A Ptr that takes ownership over a raw pointer ptr.
Overload 94:
A Ptr that takes ownership over a raw pointer ptr.
Overload 95:
A Ptr that takes ownership over a raw pointer ptr.
Overload 96:
A Ptr that takes ownership over a raw pointer ptr.
Overload 97:
A Ptr that takes ownership over a raw pointer ptr.
Overload 98:
A Ptr that takes ownership over a raw pointer ptr.
Overload 99:
A Ptr that takes ownership over a raw pointer ptr.
Overload 100:
A Ptr that takes ownership over a raw pointer ptr.
Overload 101:
A Ptr that takes ownership over a raw pointer ptr.
Overload 102:
A Ptr that takes ownership over a raw pointer ptr.
Overload 103:
A Ptr that takes ownership over a raw pointer ptr.
Overload 104:
A Ptr that takes ownership over a raw pointer ptr.
Overload 105:
A Ptr that takes ownership over a raw pointer ptr.
Overload 106:
A Ptr that takes ownership over a raw pointer ptr.
Overload 107:
A Ptr that takes ownership over a raw pointer ptr.
Overload 108:
A Ptr that takes ownership over a raw pointer ptr.
Overload 109:
A Ptr that takes ownership over a raw pointer ptr.
Overload 110:
A Ptr that takes ownership over a raw pointer ptr.
Overload 111:
A Ptr that takes ownership over a raw pointer ptr.
Overload 112:
A Ptr that takes ownership over a raw pointer ptr.
Overload 113:
A Ptr that takes ownership over a raw pointer ptr.
Overload 114:
A Ptr that takes ownership over a raw pointer ptr.
Overload 115:
A Ptr that takes ownership over a raw pointer ptr.
Overload 116:
A Ptr that takes ownership over a raw pointer ptr.
Overload 117:
A Ptr that takes ownership over a raw pointer ptr.
Overload 118:
A Ptr that takes ownership over a raw pointer ptr.
Overload 119:
A Ptr that takes ownership over a raw pointer ptr.
Overload 120:
A Ptr that takes ownership over a raw pointer ptr.
Overload 121:
A Ptr that takes ownership over a raw pointer ptr.
Overload 122:
A Ptr that takes ownership over a raw pointer ptr.
Overload 123:
A Ptr that takes ownership over a raw pointer ptr.
Overload 124:
A Ptr that takes ownership over a raw pointer ptr.
Overload 125:
A Ptr that takes ownership over a raw pointer ptr.
Overload 126:
A Ptr that takes ownership over a raw pointer ptr.
Overload 127:
A Ptr that takes ownership over a raw pointer ptr.
Overload 128:
A Ptr that takes ownership over a raw pointer ptr.
Overload 129:
A Ptr that takes ownership over a raw pointer ptr.
Overload 130:
A Ptr that takes ownership over a raw pointer ptr.
Overload 131:
A Ptr that takes ownership over a raw pointer ptr.
Overload 132:
A Ptr that takes ownership over a raw pointer ptr.
Overload 133:
A Ptr that takes ownership over a raw pointer ptr.
Overload 134:
A Ptr that takes ownership over a raw pointer ptr.
Overload 135:
A Ptr that takes ownership over a raw pointer ptr.
Overload 136:
A Ptr that takes ownership over a raw pointer ptr.
Overload 137:
A Ptr that takes ownership over a raw pointer ptr.
Overload 138:
A Ptr that takes ownership over a raw pointer ptr.
Overload 139:
A Ptr that takes ownership over a raw pointer ptr.
Overload 140:
A Ptr that takes ownership over a raw pointer ptr.
Overload 141:
A Ptr that takes ownership over a raw pointer ptr.
Overload 142:
A Ptr that takes ownership over a raw pointer ptr.
Overload 143:
A Ptr that takes ownership over a raw pointer ptr.
Overload 144:
A Ptr that takes ownership over a raw pointer ptr.
Overload 145:
A Ptr that takes ownership over a raw pointer ptr.
Overload 146:
A Ptr that takes ownership over a raw pointer ptr.
Overload 147:
A Ptr that takes ownership over a raw pointer ptr.
Overload 148:
A Ptr that takes ownership over a raw pointer ptr.
Overload 149:
A Ptr that takes ownership over a raw pointer ptr.
Overload 150:
A Ptr that takes ownership over a raw pointer ptr.
Overload 151:
A Ptr that takes ownership over a raw pointer ptr.
Overload 152:
A Ptr that takes ownership over a raw pointer ptr.
Overload 153:
A Ptr that takes ownership over a raw pointer ptr.
Overload 154:
A Ptr that takes ownership over a raw pointer ptr.
Overload 155:
A Ptr that takes ownership over a raw pointer ptr.
Overload 156:
A Ptr that takes ownership over a raw pointer ptr.
Overload 157:
A Ptr that takes ownership over a raw pointer ptr.
Overload 158:
A Ptr that takes ownership over a raw pointer ptr.
Overload 159:
A Ptr that takes ownership over a raw pointer ptr.
Overload 160:
A Ptr that takes ownership over a raw pointer ptr.
Overload 161:
A Ptr that takes ownership over a raw pointer ptr.
Overload 162:
A Ptr that takes ownership over a raw pointer ptr.
Overload 163:
A Ptr that takes ownership over a raw pointer ptr.
Overload 164:
A Ptr that takes ownership over a raw pointer ptr.
Overload 165:
A Ptr that takes ownership over a raw pointer ptr.
Overload 166:
A Ptr that takes ownership over a raw pointer ptr.
Overload 167:
A Ptr that takes ownership over a raw pointer ptr.
Overload 168:
A Ptr that takes ownership over a raw pointer ptr.
Overload 169:
A Ptr that takes ownership over a raw pointer ptr.
Overload 170:
A Ptr that takes ownership over a raw pointer ptr.
Overload 171:
A Ptr that takes ownership over a raw pointer ptr.
Overload 172:
A Ptr that takes ownership over a raw pointer ptr.
Overload 173:
A Ptr that takes ownership over a raw pointer ptr.