![]() |
RobWorkProject
23.9.11-
|
The scene descriptor describe any visualization related details of a workcell. This is typically models, visual state, highlighted state and lighting details. All information is related to frames and objects. More...
#include <SceneDescriptor.hpp>
Classes | |
| struct | DrawableProxy |
| a proxy class to represent some type of loadable and drawable entity More... | |
| struct | VisualState |
| struct for keeping track of the visual state of each frame More... | |
Public Types | |
| typedef rw::core::Ptr< SceneDescriptor > | Ptr |
| smart pointer to this class | |
Public Member Functions | |
| SceneDescriptor () | |
| constructor | |
| virtual | ~SceneDescriptor () |
| destructor | |
| void | setVisible (bool visible, rw::core::Ptr< rw::kinematics::Frame > f) |
| sets the visibility of a frame and its drawables. More... | |
| bool | isVisible (rw::core::Ptr< rw::kinematics::Frame > f) |
| test if a frame is visible or not More... | |
| void | setHighlighted (bool highlighted, rw::core::Ptr< rw::kinematics::Frame > f) |
| sets a frame to be highlighted or not. More... | |
| bool | isHighlighted (rw::core::Ptr< rw::kinematics::Frame > f) |
| test if a frame is highlighted or not More... | |
| void | setFrameAxisVisible (bool visible, rw::core::Ptr< rw::kinematics::Frame > f) |
| enables the drawing of the frame-axis of a frame. More... | |
| bool | isFrameAxisVisible (rw::core::Ptr< rw::kinematics::Frame > f) |
| test if frame-axis is visible More... | |
| void | setDrawType (DrawableNode::DrawType type, rw::core::Ptr< rw::kinematics::Frame > f) |
| set how drawables of a specific frame should be rendered More... | |
| DrawableNode::DrawType | getDrawType (rw::core::Ptr< rw::kinematics::Frame > f) |
| get how drawables of a specific frame is to be rendered More... | |
| void | setDrawMask (unsigned int mask, rw::core::Ptr< rw::kinematics::Frame > f) |
| set the draw mask of the drawables of a specific frame More... | |
| unsigned int | getDrawMask (rw::core::Ptr< rw::kinematics::Frame > f) |
| get the draw mask of the drawables of a specific frame More... | |
| void | setTransparency (double alpha, rw::core::Ptr< rw::kinematics::Frame > f) |
| set drawables of a frame to be translusent More... | |
| DrawableProxy::Ptr | addGeometry (const std::string &name, rw::core::Ptr< class rw::geometry::Geometry > geom, rw::core::Ptr< rw::kinematics::Frame > frame, int dmask=DrawableNode::Physical) |
| create and add a drawable geometry node of any type of geometry to the scene More... | |
| DrawableProxy::Ptr | addFrameAxis (const std::string &name, double size, rw::core::Ptr< rw::kinematics::Frame > frame, int dmask=DrawableNode::Virtual) |
| create and add a drawable node of a frame axis to the scene More... | |
| DrawableProxy::Ptr | addModel3D (const std::string &name, Model3D::Ptr model, rw::core::Ptr< rw::kinematics::Frame > frame, int dmask=DrawableNode::Physical) |
| create and add a drawable node of a model3d to the scene More... | |
| DrawableProxy::Ptr | addImage (const std::string &name, rw::sensor::Image::Ptr img, rw::core::Ptr< rw::kinematics::Frame > frame, int dmask=DrawableNode::Virtual) |
| create and add a drawable node of an image to the scene More... | |
| DrawableProxy::Ptr | addScan (const std::string &name, rw::geometry::PointCloud::Ptr scan, rw::core::Ptr< rw::kinematics::Frame > frame, int dmask=DrawableNode::Virtual) |
| create and add a drawable node of a scan to the scene More... | |
| DrawableProxy::Ptr | addRender (const std::string &name, rw::graphics::Render::Ptr render, rw::core::Ptr< rw::kinematics::Frame > frame, int dmask=DrawableNode::Physical) |
| create and add a drawable node of a render, to the scene More... | |
| DrawableProxy::Ptr | addDrawable (const std::string &filename, rw::core::Ptr< rw::kinematics::Frame > frame, int dmask=DrawableNode::Physical) |
| create and add a drawable node from a filename to the scene More... | |
| DrawableProxy::Ptr | addDrawable (DrawableNode::Ptr drawable, rw::core::Ptr< rw::kinematics::Frame > frame) |
| add a drawable node to the scene More... | |
| std::vector< DrawableProxy::Ptr > | getDrawables (rw::core::Ptr< rw::kinematics::Frame > f) |
| get all drawables of a specific frame in the WorkCellScene More... | |
| rw::kinematics::Frame * | getFrame (DrawableProxy::Ptr d) |
| get the frame that a specific drawable d is associated to More... | |
| std::map< rw::kinematics::Frame *, VisualState > & | getStateMap () |
| Get the visual state of all frames. More... | |
The scene descriptor describe any visualization related details of a workcell. This is typically models, visual state, highlighted state and lighting details. All information is related to frames and objects.
| DrawableProxy::Ptr addDrawable | ( | const std::string & | filename, |
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| int | dmask = DrawableNode::Physical |
||
| ) |
create and add a drawable node from a filename to the scene
| filename | [in] name of drawable node |
| frame | [in] the frame where the drawable is to be placed |
| dmask | [in] the drawable mask |
| DrawableProxy::Ptr addDrawable | ( | DrawableNode::Ptr | drawable, |
| rw::core::Ptr< rw::kinematics::Frame > | frame | ||
| ) |
add a drawable node to the scene
| drawable | [in] the drawable |
| frame | [in] the frame where the drawable is to be placed |
| DrawableProxy::Ptr addFrameAxis | ( | const std::string & | name, |
| double | size, | ||
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| int | dmask = DrawableNode::Virtual |
||
| ) |
create and add a drawable node of a frame axis to the scene
| name | [in] name of drawable node |
| size | [in] the length of the axis arrows in meters |
| frame | [in] the frame where the drawable is to be placed |
| dmask | [in] the drawable mask |
| DrawableProxy::Ptr addGeometry | ( | const std::string & | name, |
| rw::core::Ptr< class rw::geometry::Geometry > | geom, | ||
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| int | dmask = DrawableNode::Physical |
||
| ) |
create and add a drawable geometry node of any type of geometry to the scene
| name | [in] name of drawable node |
| geom | [in] the geometry |
| frame | [in] the frame where the drawable is to be placed |
| dmask | [in] the drawable mask |
| DrawableProxy::Ptr addImage | ( | const std::string & | name, |
| rw::sensor::Image::Ptr | img, | ||
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| int | dmask = DrawableNode::Virtual |
||
| ) |
create and add a drawable node of an image to the scene
| name | [in] name of drawable node |
| img | [in] the image |
| frame | [in] the frame where the drawable is to be placed |
| dmask | [in] the drawable mask |
| DrawableProxy::Ptr addModel3D | ( | const std::string & | name, |
| Model3D::Ptr | model, | ||
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| int | dmask = DrawableNode::Physical |
||
| ) |
create and add a drawable node of a model3d to the scene
| name | [in] name of drawable node |
| model | [in] the model3d |
| frame | [in] the frame where the drawable is to be placed |
| dmask | [in] the drawable mask |
| DrawableProxy::Ptr addRender | ( | const std::string & | name, |
| rw::graphics::Render::Ptr | render, | ||
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| int | dmask = DrawableNode::Physical |
||
| ) |
create and add a drawable node of a render, to the scene
| name | [in] name of drawable node |
| render | [in] the render |
| frame | [in] the frame where the drawable is to be placed |
| dmask | [in] the drawable mask |
| DrawableProxy::Ptr addScan | ( | const std::string & | name, |
| rw::geometry::PointCloud::Ptr | scan, | ||
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| int | dmask = DrawableNode::Virtual |
||
| ) |
create and add a drawable node of a scan to the scene
| name | [in] name of drawable node |
| scan | [in] the scan |
| frame | [in] the frame where the drawable is to be placed |
| dmask | [in] the drawable mask |
| std::vector<DrawableProxy::Ptr> getDrawables | ( | rw::core::Ptr< rw::kinematics::Frame > | f | ) |
get all drawables of a specific frame in the WorkCellScene
| f | [in] the frame |
| unsigned int getDrawMask | ( | rw::core::Ptr< rw::kinematics::Frame > | f | ) |
get the draw mask of the drawables of a specific frame
| f | [in] the frame |
| DrawableNode::DrawType getDrawType | ( | rw::core::Ptr< rw::kinematics::Frame > | f | ) |
get how drawables of a specific frame is to be rendered
| f | [in] the Frame |
| rw::kinematics::Frame* getFrame | ( | DrawableProxy::Ptr | d | ) |
get the frame that a specific drawable d is associated to
| d | [in] the drawable |
|
inline |
Get the visual state of all frames.
| bool isFrameAxisVisible | ( | rw::core::Ptr< rw::kinematics::Frame > | f | ) |
test if frame-axis is visible
| f | [in] the frame |
| bool isHighlighted | ( | rw::core::Ptr< rw::kinematics::Frame > | f | ) |
test if a frame is highlighted or not
| f | [in] the frame |
| bool isVisible | ( | rw::core::Ptr< rw::kinematics::Frame > | f | ) |
test if a frame is visible or not
| f | [in] the frame |
| void setDrawMask | ( | unsigned int | mask, |
| rw::core::Ptr< rw::kinematics::Frame > | f | ||
| ) |
set the draw mask of the drawables of a specific frame
| mask | [in] draw mask |
| f | [in] the frame |
| void setDrawType | ( | DrawableNode::DrawType | type, |
| rw::core::Ptr< rw::kinematics::Frame > | f | ||
| ) |
set how drawables of a specific frame should be rendered
| type | [in] the drawtype |
| f | [in] the Frame |
| void setFrameAxisVisible | ( | bool | visible, |
| rw::core::Ptr< rw::kinematics::Frame > | f | ||
| ) |
enables the drawing of the frame-axis of a frame.
| visible | [in] true if frame axis should be drawn, false otherwise |
| f | [in] the frame |
| void setHighlighted | ( | bool | highlighted, |
| rw::core::Ptr< rw::kinematics::Frame > | f | ||
| ) |
sets a frame to be highlighted or not.
| f | [in] the frame. |
| highlighted | [in] true if frame should be highlighted, false otherwise |
| void setTransparency | ( | double | alpha, |
| rw::core::Ptr< rw::kinematics::Frame > | f | ||
| ) |
set drawables of a frame to be translusent
| alpha | [in] range [0-1] where 1 is fully opaque and 0 is folly transparent |
| f | [in] frame |
| void setVisible | ( | bool | visible, |
| rw::core::Ptr< rw::kinematics::Frame > | f | ||
| ) |
sets the visibility of a frame and its drawables.
| f | [in] the frame. |
| visible | [in] true if frame should be visible, false otherwise |