Simox  2.3.49
VirtualRobot::CoinVisualizationFactory Class Reference
Inheritance diagram for VirtualRobot::CoinVisualizationFactory:
VirtualRobot::VisualizationFactory AbstractFactoryMethod< VisualizationFactory, void * >

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW CoinVisualizationFactory ()
 
virtual ~CoinVisualizationFactory ()
 
virtual void init (int &argc, char *argv[], const std::string &appName)
 
virtual VisualizationNodePtr getVisualizationFromPrimitives (const std::vector< Primitive::PrimitivePtr > &primitives, bool boundingBox=false, Color color=Color::Gray())
 
virtual VisualizationNodePtr getVisualizationFromFile (const std::string &filename, bool boundingBox=false, float scaleX=1.0f, float scaleY=1.0f, float scaleZ=1.0f)
 
virtual VisualizationNodePtr getVisualizationFromSTLFile (const std::string &filename, bool boundingBox=false, float scaleX=1.0f, float scaleY=1.0f, float scaleZ=1.0f)
 
virtual VisualizationNodePtr getVisualizationFromCoin3DFile (const std::string &filename, bool boundingBox=false)
 
virtual VisualizationNodePtr getVisualizationFromFile (const std::ifstream &ifs, bool boundingBox=false, float scaleX=1.0f, float scaleY=1.0f, float scaleZ=1.0f)
 
virtual VisualizationNodePtr getVisualizationFromString (const std::string &modelString, bool boundingBox=false)
 
virtual VisualizationPtr getVisualization (const std::vector< VisualizationNodePtr > &visus)
 
virtual VisualizationPtr getVisualization (VisualizationNodePtr visu)
 
virtual VisualizationNodePtr createBox (float width, float height, float depth, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
virtual VisualizationNodePtr createLine (const Eigen::Vector3f &from, const Eigen::Vector3f &to, float width=1.0f, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
virtual VisualizationNodePtr createLine (const Eigen::Matrix4f &from, const Eigen::Matrix4f &to, float width=1.0f, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
virtual VisualizationNodePtr createSphere (float radius, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
virtual VisualizationNodePtr createCylinder (float radius, float height, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
virtual VisualizationNodePtr createCircle (float radius, float circleCompletion, float width, float colorR=1.0f, float colorG=0.5f, float colorB=0.5f, size_t numberOfCircleParts=30)
 
virtual VisualizationNodePtr createCoordSystem (float scaling=1.0f, std::string *text=NULL, float axisLength=100.0f, float axisSize=3.0f, int nrOfBlocks=10)
 
virtual VisualizationNodePtr createBoundingBox (const BoundingBox &bbox, bool wireFrame=false)
 
virtual VisualizationNodePtr createVertexVisualization (const Eigen::Vector3f &position, float radius, float transparency, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
virtual VisualizationNodePtr createTriMeshModelVisualization (TriMeshModelPtr model, Eigen::Matrix4f &pose, float scaleX=1.0f, float scaleY=1.0f, float scaleZ=1.0f)
 
virtual VisualizationNodePtr createTriMeshModelVisualization (TriMeshModelPtr model, bool showNormals, Eigen::Matrix4f &pose, bool showLines=true)
 
virtual VisualizationNodePtr createPlane (const Eigen::Vector3f &position, const Eigen::Vector3f &normal, float extend, float transparency, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
virtual VisualizationNodePtr createArrow (const Eigen::Vector3f &n, float length=50.0f, float width=2.0f, const Color &color=Color::Gray())
 
virtual VisualizationNodePtr createCircleArrow (float radius, float tubeRadius, float completion=1, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f, float transparency=0.0f, int sides=8, int rings=30)
 
virtual VisualizationNodePtr createTrajectory (TrajectoryPtr t, Color colorNode=Color::Blue(), Color colorLine=Color::Gray(), float nodeSize=15.0f, float lineSize=4.0f)
 
virtual VisualizationNodePtr createText (const std::string &text, bool billboard=false, float scaling=1.0f, Color c=Color::Black(), float offsetX=20.0f, float offsetY=20.0f, float offsetZ=0.0f)
 
virtual VisualizationNodePtr createTorus (float radius, float tubeRadius, float completion=1, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f, float transparency=0.0f, int sides=8, int rings=30)
 
virtual VisualizationNodePtr createEllipse (float x, float y, float z, bool showAxes=true, float axesHeight=4.0f, float axesWidth=8.0f)
 
virtual void applyDisplacement (VisualizationNodePtr o, Eigen::Matrix4f &m)
 
virtual VisualizationNodePtr createVisualization ()
 
virtual VisualizationNodePtr createUnitedVisualization (const std::vector< VisualizationNodePtr > &visualizations) const
 
virtual void cleanup ()
 
- Public Member Functions inherited from VirtualRobot::VisualizationFactory
 VisualizationFactory ()
 
virtual ~VisualizationFactory ()
 
virtual VisualizationNodePtr createPlane (const MathTools::Plane &plane, float extend, float transparency, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
- Public Member Functions inherited from AbstractFactoryMethod< VisualizationFactory, void * >
void setDescription (const std::string &newDescription)
 
std::string getDescription () const
 

Static Public Member Functions

static SoSeparator * CreateConvexHull2DVisualization (const MathTools::ConvexHull2DPtr ch, MathTools::Plane &p, VisualizationFactory::Color colorInner=VisualizationFactory::Color::Blue(), VisualizationFactory::Color colorLine=VisualizationFactory::Color::Black(), float lineSize=5.0f, const Eigen::Vector3f &offset=Eigen::Vector3f::Zero())
 
static SoSeparator * CreatePolygonVisualization (const std::vector< Eigen::Vector3f > &points, VisualizationFactory::Color colorInner=VisualizationFactory::Color::Blue(), VisualizationFactory::Color colorLine=VisualizationFactory::Color::Black(), float lineSize=4.0f)
 
static SoSeparator * CreatePolygonVisualization (const std::vector< Eigen::Vector3f > &points, VisualizationFactory::PhongMaterial mat, VisualizationFactory::Color colorLine=VisualizationFactory::Color::Black(), float lineSize=4.0f)
 
static SoSeparator * CreatePlaneVisualization (const Eigen::Vector3f &position, const Eigen::Vector3f &normal, float extend, float transparency, bool grid=true, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f, std::string textureFile=std::string())
 
static SoSeparator * CreateCoordSystemVisualization (float scaling=1.0f, std::string *text=NULL, float axisLength=100.0f, float axisSize=3.0f, int nrOfBlocks=10)
 
static SoSeparator * CreateBoundingBox (SoNode *ivModel, bool wireFrame=false)
 
static SoSeparator * CreateGrid (float width, float depth, float widthMosaic, float depthMosaic, bool InvertNormal, const char *pFileName, float Transparency)
 
static SoSeparator * CreateBBoxVisualization (const BoundingBox &bbox, bool wireFrame=false)
 
static SoSeparator * CreatePointVisualization (const MathTools::ContactPoint &point, bool showNormals=false)
 
static SoSeparator * CreatePointsVisualization (const std::vector< MathTools::ContactPoint > &points, bool showNormals=false)
 
static SoSeparator * CreateArrow (const Eigen::Vector3f &n, float length=50.0f, float width=2.0f, const Color &color=Color::Gray())
 
static SoSeparator * CreateVertexVisualization (const Eigen::Vector3f &position, float radius, float transparency, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
static SoSeparator * CreateVerticesVisualization (const std::vector< Eigen::Vector3f > &positions, float radius, VisualizationFactory::Color color=VisualizationFactory::Color::Gray())
 
static void RemoveDuplicateTextures (SoNode *node)
 
static SoSeparator * CreateEllipse (float x, float y, float z, SoMaterial *matBody=NULL, bool showAxes=true, float axesHeight=4.0f, float axesWidth=8.0f, SoMaterial *matAxisX=NULL, SoMaterial *matAxisY=NULL, SoMaterial *matAxisZ=NULL)
 
static SoSeparator * Create2DMap (const Eigen::MatrixXf &d, float extendCellX, float extendCellY, const VirtualRobot::ColorMap cm=VirtualRobot::ColorMap(VirtualRobot::ColorMap::eHot), bool drawZeroCells=false, bool drawLines=true)
 
static SoSeparator * Create2DHeightMap (const Eigen::MatrixXf &d, float extendCellX, float extendCellY, float heightZ, const VirtualRobot::ColorMap cm=VirtualRobot::ColorMap(VirtualRobot::ColorMap::eHot), bool drawZeroCells=false, bool drawLines=true)
 
static SoSeparator * CreateOOBBVisualization (const MathTools::OOBB &oobb, Color colorLine=Color::Gray(), float lineSize=4.0f)
 
static SoSeparator * CreateSegmentVisualization (const MathTools::Segment &s, Color colorLine=Color::Gray(), float lineSize=4.0f)
 
static SoSeparator * Colorize (SoNode *model, VisualizationFactory::Color c)
 
static SbMatrix getSbMatrix (const Eigen::Matrix4f &m)
 
static SbMatrix getSbMatrixVec (const Eigen::Vector3f &m)
 
static SoSeparator * CreateGraspSetVisualization (GraspSetPtr graspSet, EndEffectorPtr eef, const Eigen::Matrix4f &pose=Eigen::Matrix4f::Identity(), SceneObject::VisualizationType visu=SceneObject::Full)
 
static SoSeparator * CreateGraspVisualization (GraspPtr grasp, SoSeparator *eefVisu, const Eigen::Matrix4f &pose=Eigen::Matrix4f::Identity())
 
static SoSeparator * CreateGraspVisualization (GraspPtr grasp, EndEffectorPtr eef, const Eigen::Matrix4f &pose=Eigen::Matrix4f::Identity(), SceneObject::VisualizationType visu=SceneObject::Full)
 
static SoSeparator * CreateEndEffectorVisualization (EndEffectorPtr eef, SceneObject::VisualizationType=SceneObject::Full)
 
static SoNode * getColorNode (Color color)
 
static SoSeparator * CreateText (const std::string &s, float offsetX=20.0f, float offsetY=20.0f, float offsetZ=0.0f)
 
static SoSeparator * CreateBillboardText (const std::string &s, float offsetX=20.0f, float offsetY=20.0f, float offsetZ=0.0f)
 
static SoNode * getCoinVisualization (RobotPtr robot, SceneObject::VisualizationType visuType, bool selectable=true)
 
static SoNode * getCoinVisualization (SceneObjectPtr object, SceneObject::VisualizationType visuType)
 
static SoNode * getCoinVisualization (VirtualRobot::EndEffector::ContactInfoVector &contacts, float frictionConeHeight=30.0f, float frictionConeRadius=15.0f, bool scaleAccordingToApproachDir=true)
 
static SoNode * getCoinVisualization (EndEffector::ContactInfo &contact, float frictionConeHeight=30.0f, float frictionConeRadius=15.0f, bool scaleAccordingToApproachDir=true)
 
static SoNode * getCoinVisualization (VisualizationNodePtr visu)
 
static SoNode * getCoinVisualization (TriMeshModelPtr model)
 
static SoNode * getCoinVisualization (TriMeshModelPtr model, bool shownormals, VisualizationFactory::Color color=VisualizationFactory::Color::Gray(), bool showLines=true)
 
static SoNode * getCoinVisualization (TrajectoryPtr t, Color colorNode=Color::Blue(), Color colorLine=Color::Gray(), float nodeSize=15.0f, float lineSize=4.0f)
 
static SoNode * getCoinVisualization (WorkspaceRepresentationPtr reachSpace, const VirtualRobot::ColorMap cm, bool transformToGlobalPose=true, float maxZGlobal=1e10)
 
static SoNode * getCoinVisualization (WorkspaceRepresentationPtr reachSpace, VirtualRobot::ColorMap cm, const Eigen::Vector3f &axis, bool transformToGlobalPose=true, unsigned char minValue=0, float arrowSize=0, int nrRotations=1)
 
static SoNode * getCoinVisualization (WorkspaceRepresentationPtr reachSpace, const Eigen::Vector3f &fixedEEFOrientationGlobalRPY, VirtualRobot::ColorMap cm=VirtualRobot::ColorMap(VirtualRobot::ColorMap::eHot), bool transformToGlobalPose=true, const Eigen::Vector3f &axis=Eigen::Vector3f(0, 0, 1.0f), unsigned char minValue=0, float arrowSize=0)
 Helper method: Create reach space visualization of a fixed orientation. More...
 
static SoNode * getCoinVisualization (WorkspaceRepresentationPtr reachSpace, int a, int b, int c, int nrBestEntries, SoSeparator *arrow, const VirtualRobot::ColorMap &cm, bool transformToGlobalPose, unsigned char minValue)
 helper method: create nrBestEntries arrows in direction of maximum orientation for voxelPosition (a,b,c) More...
 
static SoNode * getCoinVisualization (TSRConstraintPtr constraint, const Color &color)
 
static SoNode * getCoinVisualization (BalanceConstraintPtr constraint, const Color &color)
 
static SoNode * getCoinVisualization (PoseConstraintPtr constraint, const Color &color)
 
static SoNode * getCoinVisualization (PositionConstraintPtr constraint, const Color &color)
 
static SoNode * getCoinVisualization (SupportPolygonPtr supportPolygon, const Color &color)
 
static SoMatrixTransform * getMatrixTransform (Eigen::Matrix4f &m)
 
static SoMatrixTransform * getMatrixTransformScaleMM2M (Eigen::Matrix4f &m)
 
static SoNode * createCoinLine (const Eigen::Matrix4f &from, const Eigen::Matrix4f &to, float width, float colorR, float colorG, float colorB)
 
static SoNode * createCoinPartCircle (float radius, float circleCompletion, float width, float colorR, float colorG, float colorB, size_t numberOfCircleParts)
 
static SoNode * getCoinVisualization (WorkspaceGridPtr reachGrid, VirtualRobot::ColorMap cm, bool transformToGlobalPose=true)
 
static SoNode * getCoinVisualization (VirtualRobot::WorkspaceRepresentation::WorkspaceCut2DPtr cutXY, VirtualRobot::ColorMap cm, const Eigen::Vector3f &normal=Eigen::Vector3f::UnitY(), float maxEntry=0.0f)
 
static SoOffscreenRenderer * createOffscreenRenderer (unsigned int width, unsigned int height)
 
static bool renderOffscreen (SoOffscreenRenderer *renderer, RobotNodePtr camNode, SoNode *scene, unsigned char **buffer, float zNear=10.f, float zFar=100000.f, float fov=M_PI/4)
 
static bool renderOffscreenRgbDepthPointcloud (RobotNodePtr camNode, SoNode *scene, short width, short height, bool renderRgbImage, std::vector< unsigned char > &rgbImage, bool renderDepthImgae, std::vector< float > &depthImage, bool renderPointcloud, std::vector< Eigen::Vector3f > &pointCloud, float zNear=10.f, float zFar=100000.f, float vertFov=M_PI/4, float nanValue=NAN)
 Renders the given scene from the given cam position and outputs (optionally) the rgb image, depth image and point cloud. More...
 
static bool renderOffscreenRgbDepthPointcloud (SoOffscreenRenderer *renderer, RobotNodePtr camNode, SoNode *scene, short width, short height, bool renderRgbImage, std::vector< unsigned char > &rgbImage, bool renderDepthImage, std::vector< float > &depthImage, bool renderPointcloud, std::vector< Eigen::Vector3f > &pointCloud, float zNear=10.f, float zFar=100000.f, float vertFov=M_PI/4, float nanValue=NAN)
 Renders the given scene from the given cam position and outputs (optionally) the rgb image, depth image and point cloud. This version is much faster if always the same SoOffscreenRenderer is passed in. More...
 
static bool renderOffscreenRgbDepthPointcloud (RobotNodePtr camNode, SoNode *scene, short width, short height, std::vector< unsigned char > &rgbImage, std::vector< float > &depthImage, std::vector< Eigen::Vector3f > &pointCloud, float zNear=10.f, float zFar=100000.f, float vertFov=M_PI/4, float nanValue=NAN)
 Renders the given scene from the given cam position and outputs the rgb image, depth image and point cloud. More...
 
static bool renderOffscreen (SoOffscreenRenderer *renderer, SoPerspectiveCamera *cam, SoNode *scene, unsigned char **buffer)
 
static SoGroup * convertSoFileChildren (SoGroup *orig)
 
static SoNode * copyNode (SoNode *n)
 
static std::string getName ()
 
static boost::shared_ptr< VisualizationFactorycreateInstance (void *)
 
- Static Public Member Functions inherited from AbstractFactoryMethod< VisualizationFactory, void * >
static boost::shared_ptr< VisualizationFactory > fromName (const std::string &name, void *params)
 
static boost::shared_ptr< VisualizationFactory > first (void *params)
 
static std::string getName ()
 
static boost::shared_ptr< VisualizationFactory > createInstance (void *)
 
static void registerClass (const std::string &name, initialisationFunction init)
 
static std::vector< std::string > getSubclassList ()
 

Static Protected Member Functions

static SoNode * GetNodeFromPrimitive (Primitive::PrimitivePtr primitive, bool boundingBox, Color color)
 
static void GetVisualizationFromSoInput (SoInput &soInput, VisualizationNodePtr &visualizationNode, bool bbox=false, bool freeDuplicateTextures=true)
 
static char IVToolsHelper_ReplaceSpaceWithUnderscore (char input)
 

Additional Inherited Members

- Public Types inherited from AbstractFactoryMethod< VisualizationFactory, void * >
typedef boost::shared_ptr< VisualizationFactory >(* initialisationFunction) (void *)
 

Detailed Description

A Coin3D based implementation of a VisualizationFactory.

Constructor & Destructor Documentation

VirtualRobot::CoinVisualizationFactory::CoinVisualizationFactory ( )
VirtualRobot::CoinVisualizationFactory::~CoinVisualizationFactory ( )
virtual

Member Function Documentation

void VirtualRobot::CoinVisualizationFactory::applyDisplacement ( VisualizationNodePtr  o,
Eigen::Matrix4f &  m 
)
virtual

Move local visualization by homogeneous matrix m. MM is used.

Reimplemented from VirtualRobot::VisualizationFactory.

void VirtualRobot::CoinVisualizationFactory::cleanup ( )
virtual

Here, a manual cleanup can be called, no Coin3D access possible after this. Usually no need to call cleanup explicitly, since cleanup is performed automatically at application exit.

Reimplemented from VirtualRobot::VisualizationFactory.

SoSeparator * VirtualRobot::CoinVisualizationFactory::Colorize ( SoNode *  model,
VisualizationFactory::Color  c 
)
static

Creates a colored model, by creating a new SoSeparator and adding a basecolor with overide flags followed by the model.

SoGroup * VirtualRobot::CoinVisualizationFactory::convertSoFileChildren ( SoGroup *  orig)
static

When SoFiles are used, Coin3D just stores references to files instead of the real contents. This may cause problems when saving an inventor file. With this method, a group node can be converted in order to ensure that all potential files are loaded and added to the group.

SoNode * VirtualRobot::CoinVisualizationFactory::copyNode ( SoNode *  n)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::Create2DHeightMap ( const Eigen::MatrixXf &  d,
float  extendCellX,
float  extendCellY,
float  heightZ,
const VirtualRobot::ColorMap  cm = VirtualRobot::ColorMap(VirtualRobot::ColorMap::eHot),
bool  drawZeroCells = false,
bool  drawLines = true 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::Create2DMap ( const Eigen::MatrixXf &  d,
float  extendCellX,
float  extendCellY,
const VirtualRobot::ColorMap  cm = VirtualRobot::ColorMap(VirtualRobot::ColorMap::eHot),
bool  drawZeroCells = false,
bool  drawLines = true 
)
static
VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createArrow ( const Eigen::Vector3f &  n,
float  length = 50.0f,
float  width = 2.0f,
const Color color = Color::Gray() 
)
virtual
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateArrow ( const Eigen::Vector3f &  n,
float  length = 50.0f,
float  width = 2.0f,
const Color color = Color::Gray() 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateBBoxVisualization ( const BoundingBox bbox,
bool  wireFrame = false 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateBillboardText ( const std::string &  s,
float  offsetX = 20.0f,
float  offsetY = 20.0f,
float  offsetZ = 0.0f 
)
static

Billboard Text visu. Offsets in mm.

VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createBoundingBox ( const BoundingBox bbox,
bool  wireFrame = false 
)
virtual
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateBoundingBox ( SoNode *  ivModel,
bool  wireFrame = false 
)
static
VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createBox ( float  ,
float  ,
float  ,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f 
)
virtual

A box, dimensions are given in mm.

Reimplemented from VirtualRobot::VisualizationFactory.

VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createCircle ( float  radius,
float  circleCompletion,
float  width,
float  colorR = 1.0f,
float  colorG = 0.5f,
float  colorB = 0.5f,
size_t  numberOfCircleParts = 30 
)
virtual
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createCircleArrow ( float  radius,
float  tubeRadius,
float  completion = 1,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f,
float  transparency = 0.0f,
int  sides = 8,
int  rings = 30 
)
virtual
SoNode * VirtualRobot::CoinVisualizationFactory::createCoinLine ( const Eigen::Matrix4f &  from,
const Eigen::Matrix4f &  to,
float  width,
float  colorR,
float  colorG,
float  colorB 
)
static
SoNode * VirtualRobot::CoinVisualizationFactory::createCoinPartCircle ( float  radius,
float  circleCompletion,
float  width,
float  colorR,
float  colorG,
float  colorB,
size_t  numberOfCircleParts 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateConvexHull2DVisualization ( const MathTools::ConvexHull2DPtr  ch,
MathTools::Plane p,
VisualizationFactory::Color  colorInner = VisualizationFactory::Color::Blue(),
VisualizationFactory::Color  colorLine = VisualizationFactory::Color::Black(),
float  lineSize = 5.0f,
const Eigen::Vector3f &  offset = Eigen::Vector3f::Zero() 
)
static
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createCoordSystem ( float  scaling = 1.0f,
std::string *  text = NULL,
float  axisLength = 100.0f,
float  axisSize = 3.0f,
int  nrOfBlocks = 10 
)
virtual
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateCoordSystemVisualization ( float  scaling = 1.0f,
std::string *  text = NULL,
float  axisLength = 100.0f,
float  axisSize = 3.0f,
int  nrOfBlocks = 10 
)
static
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createCylinder ( float  radius,
float  height,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f 
)
virtual
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createEllipse ( float  x,
float  y,
float  z,
bool  showAxes = true,
float  axesHeight = 4.0f,
float  axesWidth = 8.0f 
)
virtual

Creates an coordinate axis aligned ellipse

Parameters
xThe extend in x direction must be >= 1e-6
yThe extend in y direction must be >= 1e-6
zThe extend in z direction must be >= 1e-6
showAxesIf true, the axes are visualized
axesHeightThe height of the axes (measured from the body surface)
axesWidthThe width of the axes.
Returns
A VisualizationNode containing the visualization.

Reimplemented from VirtualRobot::VisualizationFactory.

SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateEllipse ( float  x,
float  y,
float  z,
SoMaterial *  matBody = NULL,
bool  showAxes = true,
float  axesHeight = 4.0f,
float  axesWidth = 8.0f,
SoMaterial *  matAxisX = NULL,
SoMaterial *  matAxisY = NULL,
SoMaterial *  matAxisZ = NULL 
)
static

Creates an coordinate axis aligned ellipse

Parameters
xThe extend in x direction must be >= 1e-6
yThe extend in y direction must be >= 1e-6
zThe extend in z direction must be >= 1e-6
matBodyIf not given a standard material is used for the ellipse body
showAxesIf true, the axes are visualized
axesHeightThe height of the axes (measured from the body surface)
axesWidthThe width of the axes.
matAxisXIf not given a standard material is used for axis X
matAxisYIf not given a standard material is used for axis Y
matAxisZIf not given a standard material is used for axis Z
Returns
A separator containing the visualization.
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateEndEffectorVisualization ( EndEffectorPtr  eef,
SceneObject::VisualizationType  visu = SceneObject::Full 
)
static

Create a visualization of the end effector. The visualization is moved, so that the origin is identical with the coordinate system of the TCP.

SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateGraspSetVisualization ( GraspSetPtr  graspSet,
EndEffectorPtr  eef,
const Eigen::Matrix4f &  pose = Eigen::Matrix4f::Identity(),
SceneObject::VisualizationType  visu = SceneObject::Full 
)
static

Create a visualization of a set of grasps.

Parameters
graspSetThe grasps to visualize
eefThe visualization of this eef is used to visualize the grasps
poseThe grasp set is visualized relatively to this pose (e.g. use the object position here)
visuThe visualization type of the EEFs.
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateGraspVisualization ( GraspPtr  grasp,
SoSeparator *  eefVisu,
const Eigen::Matrix4f &  pose = Eigen::Matrix4f::Identity() 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateGraspVisualization ( GraspPtr  grasp,
EndEffectorPtr  eef,
const Eigen::Matrix4f &  pose = Eigen::Matrix4f::Identity(),
SceneObject::VisualizationType  visu = SceneObject::Full 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateGrid ( float  width,
float  depth,
float  widthMosaic,
float  depthMosaic,
bool  InvertNormal,
const char *  pFileName,
float  Transparency 
)
static
boost::shared_ptr< VisualizationFactory > VirtualRobot::CoinVisualizationFactory::createInstance ( void *  )
static
Returns
new instance of CoinVisualizationFactory and call SoDB::init() if it has not already been called.
VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createLine ( const Eigen::Vector3f &  from,
const Eigen::Vector3f &  to,
float  width = 1.0f,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f 
)
virtual
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createLine ( const Eigen::Matrix4f &  from,
const Eigen::Matrix4f &  to,
float  width = 1.0f,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f 
)
virtual
SoOffscreenRenderer * VirtualRobot::CoinVisualizationFactory::createOffscreenRenderer ( unsigned int  width,
unsigned int  height 
)
static

Create an offscreen renderer object with the given width and height.

See also
renderOffscreen
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateOOBBVisualization ( const MathTools::OOBB oobb,
Color  colorLine = Color::Gray(),
float  lineSize = 4.0f 
)
static
VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createPlane ( const Eigen::Vector3f &  position,
const Eigen::Vector3f &  normal,
float  extend,
float  transparency,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f 
)
virtual
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreatePlaneVisualization ( const Eigen::Vector3f &  position,
const Eigen::Vector3f &  normal,
float  extend,
float  transparency,
bool  grid = true,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f,
std::string  textureFile = std::string() 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreatePointsVisualization ( const std::vector< MathTools::ContactPoint > &  points,
bool  showNormals = false 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreatePointVisualization ( const MathTools::ContactPoint point,
bool  showNormals = false 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreatePolygonVisualization ( const std::vector< Eigen::Vector3f > &  points,
VisualizationFactory::Color  colorInner = VisualizationFactory::Color::Blue(),
VisualizationFactory::Color  colorLine = VisualizationFactory::Color::Black(),
float  lineSize = 4.0f 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreatePolygonVisualization ( const std::vector< Eigen::Vector3f > &  points,
VisualizationFactory::PhongMaterial  mat,
VisualizationFactory::Color  colorLine = VisualizationFactory::Color::Black(),
float  lineSize = 4.0f 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateSegmentVisualization ( const MathTools::Segment s,
Color  colorLine = Color::Gray(),
float  lineSize = 4.0f 
)
static
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createSphere ( float  radius,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f 
)
virtual
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createText ( const std::string &  text,
bool  billboard = false,
float  scaling = 1.0f,
Color  c = Color::Black(),
float  offsetX = 20.0f,
float  offsetY = 20.0f,
float  offsetZ = 0.0f 
)
virtual
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateText ( const std::string &  s,
float  offsetX = 20.0f,
float  offsetY = 20.0f,
float  offsetZ = 0.0f 
)
static

Text visu. Offsets in mm.

VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createTorus ( float  radius,
float  tubeRadius,
float  completion = 1,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f,
float  transparency = 0.0f,
int  sides = 8,
int  rings = 30 
)
virtual
VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createTrajectory ( TrajectoryPtr  t,
Color  colorNode = Color::Blue(),
Color  colorLine = Color::Gray(),
float  nodeSize = 15.0f,
float  lineSize = 4.0f 
)
virtual
VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createTriMeshModelVisualization ( TriMeshModelPtr  model,
Eigen::Matrix4f &  pose,
float  scaleX = 1.0f,
float  scaleY = 1.0f,
float  scaleZ = 1.0f 
)
virtual
VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createTriMeshModelVisualization ( TriMeshModelPtr  model,
bool  showNormals,
Eigen::Matrix4f &  pose,
bool  showLines = true 
)
virtual
VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createUnitedVisualization ( const std::vector< VisualizationNodePtr > &  visualizations) const
virtual

Create a united visualization. Internally all visualizations are copied and added to one SoSeparator. All visualizations have to be of type CoinVisualizationNode.

Reimplemented from VirtualRobot::VisualizationFactory.

VirtualRobot::VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createVertexVisualization ( const Eigen::Vector3f &  position,
float  radius,
float  transparency,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f 
)
virtual
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateVertexVisualization ( const Eigen::Vector3f &  position,
float  radius,
float  transparency,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f 
)
static
SoSeparator * VirtualRobot::CoinVisualizationFactory::CreateVerticesVisualization ( const std::vector< Eigen::Vector3f > &  positions,
float  radius,
VisualizationFactory::Color  color = VisualizationFactory::Color::Gray() 
)
static
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::createVisualization ( )
virtual

Create an empty VisualizationNode.

Reimplemented from VirtualRobot::VisualizationFactory.

SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( RobotPtr  robot,
SceneObject::VisualizationType  visuType,
bool  selectable = true 
)
static

Convenient method to retrieve a coin visualization for a robot

SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( SceneObjectPtr  object,
SceneObject::VisualizationType  visuType 
)
static

Convenient method to retrieve a coin visualization for a SceneObject/Obstacle/ManipulationObject

SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( VirtualRobot::EndEffector::ContactInfoVector contacts,
float  frictionConeHeight = 30.0f,
float  frictionConeRadius = 15.0f,
bool  scaleAccordingToApproachDir = true 
)
static

Convenient method to retrieve a coin visualization for a set of contacts.

Parameters
contactsThe contacts to be visualized
frictionConeHeightThe height of the friction cone [mm].
frictionConeRadiusThe radius of the cone [mm].
scaleAccordingToApproachDirIf true, the parallel component of the contact normal is computed according to the approahcDirection of the contact.
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( EndEffector::ContactInfo contact,
float  frictionConeHeight = 30.0f,
float  frictionConeRadius = 15.0f,
bool  scaleAccordingToApproachDir = true 
)
static

Convenient method to retrieve a coin visualization for a contact.

Parameters
contactThe contact to be visualized
frictionConeHeightThe height of the friction cone [mm].
frictionConeRadiusThe radius of the cone [mm].
scaleAccordingToApproachDirIf true, the parallel component of the contact normal is computed according to the approahcDirection of the contact.
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( VisualizationNodePtr  visu)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( TriMeshModelPtr  model)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( TriMeshModelPtr  model,
bool  shownormals,
VisualizationFactory::Color  color = VisualizationFactory::Color::Gray(),
bool  showLines = true 
)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( TrajectoryPtr  t,
Color  colorNode = Color::Blue(),
Color  colorLine = Color::Gray(),
float  nodeSize = 15.0f,
float  lineSize = 4.0f 
)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( WorkspaceRepresentationPtr  reachSpace,
const VirtualRobot::ColorMap  cm,
bool  transformToGlobalPose = true,
float  maxZGlobal = 1e10 
)
static

Create a visualization of the reachability data.

SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( WorkspaceRepresentationPtr  reachSpace,
VirtualRobot::ColorMap  cm,
const Eigen::Vector3f &  axis,
bool  transformToGlobalPose = true,
unsigned char  minValue = 0,
float  arrowSize = 0,
int  nrRotations = 1 
)
static

Creates a visualization of the reachability data. For each 3D point, the orientation with maximum entry is determined and visualized as an arrow. The direction of this arrow is aligned to the param axis.

SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( WorkspaceRepresentationPtr  reachSpace,
const Eigen::Vector3f &  fixedEEFOrientationGlobalRPY,
VirtualRobot::ColorMap  cm = VirtualRobot::ColorMap(VirtualRobot::ColorMap::eHot),
bool  transformToGlobalPose = true,
const Eigen::Vector3f &  axis = Eigen::Vector3f(0, 0, 1.0f),
unsigned char  minValue = 0,
float  arrowSize = 0 
)
static

Helper method: Create reach space visualization of a fixed orientation.

SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( WorkspaceRepresentationPtr  reachSpace,
int  a,
int  b,
int  c,
int  nrBestEntries,
SoSeparator *  arrow,
const VirtualRobot::ColorMap cm,
bool  transformToGlobalPose,
unsigned char  minValue 
)
static

helper method: create nrBestEntries arrows in direction of maximum orientation for voxelPosition (a,b,c)

SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( TSRConstraintPtr  constraint,
const Color color 
)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( BalanceConstraintPtr  constraint,
const Color color 
)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( PoseConstraintPtr  constraint,
const Color color 
)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( PositionConstraintPtr  constraint,
const Color color 
)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( SupportPolygonPtr  supportPolygon,
const Color color 
)
static
SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( WorkspaceGridPtr  reachGrid,
VirtualRobot::ColorMap  cm,
bool  transformToGlobalPose = true 
)
static

Creates a visualization of the reachability grid.

SoNode * VirtualRobot::CoinVisualizationFactory::getCoinVisualization ( VirtualRobot::WorkspaceRepresentation::WorkspaceCut2DPtr  cutXY,
VirtualRobot::ColorMap  cm,
const Eigen::Vector3f &  normal = Eigen::Vector3f::UnitY(),
float  maxEntry = 0.0f 
)
static

Create quads according to cutXY plane. Normal can be UnitX, UnitY or UnitZ.

Parameters
maxEntryIf 0 the maximal entry of the cut plane is used as refernce.
SoNode * VirtualRobot::CoinVisualizationFactory::getColorNode ( Color  color)
static

Creates a material node.

SoMatrixTransform * VirtualRobot::CoinVisualizationFactory::getMatrixTransform ( Eigen::Matrix4f &  m)
static

Create a SoMatrixTransform from the given pose

Parameters
mThe pose with translation given in meter.
SoMatrixTransform * VirtualRobot::CoinVisualizationFactory::getMatrixTransformScaleMM2M ( Eigen::Matrix4f &  m)
static

Create a SoMatrixTransform from the given pose Converts the pose from MM to M (scales by 0.001)

Parameters
mThe pose with translation given in millimeter.
std::string VirtualRobot::CoinVisualizationFactory::getName ( )
static
Returns
"inventor"
SoNode * VirtualRobot::CoinVisualizationFactory::GetNodeFromPrimitive ( Primitive::PrimitivePtr  primitive,
bool  boundingBox,
Color  color 
)
staticprotected
SbMatrix VirtualRobot::CoinVisualizationFactory::getSbMatrix ( const Eigen::Matrix4f &  m)
static
SbMatrix VirtualRobot::CoinVisualizationFactory::getSbMatrixVec ( const Eigen::Vector3f &  m)
static
VisualizationPtr VirtualRobot::CoinVisualizationFactory::getVisualization ( const std::vector< VisualizationNodePtr > &  visus)
virtual
VisualizationPtr VirtualRobot::CoinVisualizationFactory::getVisualization ( VisualizationNodePtr  visu)
virtual
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::getVisualizationFromCoin3DFile ( const std::string &  filename,
bool  boundingBox = false 
)
virtual
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::getVisualizationFromFile ( const std::string &  filename,
bool  boundingBox = false,
float  scaleX = 1.0f,
float  scaleY = 1.0f,
float  scaleZ = 1.0f 
)
virtual

This method creates a VirtualRobot::CoinVisualizationNode from a given filename. An instance of VirtualRobot::VisualizationNode is returned in case of an occured error.

Parameters
filenamefile to load the Coin3D visualization from.
boundingBoxUse bounding box instead of full model.
Returns
instance of VirtualRobot::CoinVisualizationNode upon success and VirtualRobot::VisualizationNode on error.

Reimplemented from VirtualRobot::VisualizationFactory.

VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::getVisualizationFromFile ( const std::ifstream &  ifs,
bool  boundingBox = false,
float  scaleX = 1.0f,
float  scaleY = 1.0f,
float  scaleZ = 1.0f 
)
virtual
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::getVisualizationFromPrimitives ( const std::vector< Primitive::PrimitivePtr > &  primitives,
bool  boundingBox = false,
Color  color = Color::Gray() 
)
virtual

This method creates a VirtualRobot::CoinVisualizationNode from a given vector of primitives. An instance of VirtualRobot::VisualizationNode is returned in case of an occured error.

Parameters
primitivesvector of primitives to create the visualization from.
boundingBoxUse bounding box instead of full model.
Returns
instance of VirtualRobot::CoinVisualizationNode upon success and VirtualRobot::VisualizationNode on error.

Reimplemented from VirtualRobot::VisualizationFactory.

void VirtualRobot::CoinVisualizationFactory::GetVisualizationFromSoInput ( SoInput &  soInput,
VisualizationNodePtr visualizationNode,
bool  boundingBox = false,
bool  freeDuplicateTextures = true 
)
staticprotected

This method reads the data from the given soInput and creates a new CoinVisualizationNode with the read Coin model if no error occurred during reading the model. The newly created CoinVisualizationNode is then stored in visualisationNode.

Parameters
soInputSoInput instance from which the model is read.
visualizationNodeVisualizationNodePtr instance in which the created CoinVisualizationNode is stored.
boundingBoxUse bounding box instead of full model.
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::getVisualizationFromSTLFile ( const std::string &  filename,
bool  boundingBox = false,
float  scaleX = 1.0f,
float  scaleY = 1.0f,
float  scaleZ = 1.0f 
)
virtual
VisualizationNodePtr VirtualRobot::CoinVisualizationFactory::getVisualizationFromString ( const std::string &  modelString,
bool  boundingBox = false 
)
virtual

This method creates a VirtualRobot::CoinVisualizationNode from a given modelString. An instance of VirtualRobot::VisualizationNode is returned in case of an occured error.

Parameters
modelStringstring to load the Coin3D visualization from.
boundingBoxUse bounding box instead of full model.
Returns
instance of VirtualRobot::CoinVisualizationNode upon succes and VirtualRobot::VisualizationNode on error.
void VirtualRobot::CoinVisualizationFactory::init ( int &  argc,
char *  argv[],
const std::string &  appName 
)
virtual

Initialises SoDB and SoQt. Sets the COIN_SEPARATE_DIFFUSE_TRANSPARENCY_OVERRIDE environment variable to enable a Coin3D transparency extension.

Reimplemented from VirtualRobot::VisualizationFactory.

static char VirtualRobot::CoinVisualizationFactory::IVToolsHelper_ReplaceSpaceWithUnderscore ( char  input)
inlinestaticprotected
void VirtualRobot::CoinVisualizationFactory::RemoveDuplicateTextures ( SoNode *  node)
static
bool VirtualRobot::CoinVisualizationFactory::renderOffscreen ( SoOffscreenRenderer *  renderer,
RobotNodePtr  camNode,
SoNode *  scene,
unsigned char **  buffer,
float  zNear = 10.f,
float  zFar = 100000.f,
float  fov = M_PI/4 
)
static

The cam node has to be oriented as follows: The camera is pointing along the positive z axis and the positive x axis is pointing upwards.

Parameters
rendererThe renderer should have been created with the createOffscreenRenderer method
camNodeThe node of the robot that defines the position of the camera. Any node of the robot can host a camera.
sceneThe scene that should be rendered.
bufferThe result is stored here. The origin of the 2D image is at the left bottom! The resulting buffer has the size width*height*3, with the extends as defined in the createOffscreenRenderer method.
zNearThe near plane's distance.
zFarThe far plane's distance
fovThe fov in rad. (vertical)
Returns
true on success
See also
createOffscreenRenderer
bool VirtualRobot::CoinVisualizationFactory::renderOffscreen ( SoOffscreenRenderer *  renderer,
SoPerspectiveCamera *  cam,
SoNode *  scene,
unsigned char **  buffer 
)
static

Use a custom camera for rendering

Parameters
rendererThe renderer should have been created with the createOffscreenRenderer method
camThe camera.
sceneThe scene that should be rendered.
bufferThe result is stored here. The origin of the 2D image is at the left bottom! The resulting buffer has the size width*height*3, with the extends as defined in the createOffscreenRenderer method.
Returns
true on success
See also
createOffscreenRenderer
bool VirtualRobot::CoinVisualizationFactory::renderOffscreenRgbDepthPointcloud ( RobotNodePtr  camNode,
SoNode *  scene,
short  width,
short  height,
bool  renderRgbImage,
std::vector< unsigned char > &  rgbImage,
bool  renderDepthImgae,
std::vector< float > &  depthImage,
bool  renderPointcloud,
std::vector< Eigen::Vector3f > &  pointCloud,
float  zNear = 10.f,
float  zFar = 100000.f,
float  vertFov = M_PI/4,
float  nanValue = NAN 
)
static

Renders the given scene from the given cam position and outputs (optionally) the rgb image, depth image and point cloud.

Parameters
camNodeThe node of the robot that defines the position of the camera. Any node of the robot can host a camera.
sceneThe scene that should be rendered.
widthThe used image width. (>0)
heightThe used image height. (>0)
renderRgbImageWhether to output the rgb image.
rgbImageThe rgb image's output parameter.
renderDepthImgaeWhether to output the depth image.
depthImageThe depth image's output parameter.
renderPointcloudWhether to output the point cloud.
pointCloudThe pointcloud's output parameter.
zNearThe near plane's distance.
zFarThe far plane's distance
vertFovThe fov in rad. (vertical)
nanValueAll values above the zFar value will be mapped on this value (usually nan or 0)
Returns
true on success
bool VirtualRobot::CoinVisualizationFactory::renderOffscreenRgbDepthPointcloud ( SoOffscreenRenderer *  renderer,
RobotNodePtr  camNode,
SoNode *  scene,
short  width,
short  height,
bool  renderRgbImage,
std::vector< unsigned char > &  rgbImage,
bool  renderDepthImage,
std::vector< float > &  depthImage,
bool  renderPointcloud,
std::vector< Eigen::Vector3f > &  pointCloud,
float  zNear = 10.f,
float  zFar = 100000.f,
float  vertFov = M_PI/4,
float  nanValue = NAN 
)
static

Renders the given scene from the given cam position and outputs (optionally) the rgb image, depth image and point cloud. This version is much faster if always the same SoOffscreenRenderer is passed in.

Parameters
camNodeThe node of the robot that defines the position of the camera. Any node of the robot can host a camera.
sceneThe scene that should be rendered.
widthThe used image width. (>0)
heightThe used image height. (>0)
renderRgbImageWhether to output the rgb image.
rgbImageThe rgb image's output parameter.
renderDepthImgaeWhether to output the depth image.
depthImageThe depth image's output parameter.
renderPointcloudWhether to output the point cloud.
pointCloudThe pointcloud's output parameter.
zNearThe near plane's distance.
zFarThe far plane's distance
vertFovThe fov in rad. (vertical)
nanValueAll values above the zFar value will be mapped on this value (usually nan or 0)
Returns
true on success

TODO find way to only render rgb once

static bool VirtualRobot::CoinVisualizationFactory::renderOffscreenRgbDepthPointcloud ( RobotNodePtr  camNode,
SoNode *  scene,
short  width,
short  height,
std::vector< unsigned char > &  rgbImage,
std::vector< float > &  depthImage,
std::vector< Eigen::Vector3f > &  pointCloud,
float  zNear = 10.f,
float  zFar = 100000.f,
float  vertFov = M_PI/4,
float  nanValue = NAN 
)
inlinestatic

Renders the given scene from the given cam position and outputs the rgb image, depth image and point cloud.

Parameters
camNodeThe node of the robot that defines the position of the camera. Any node of the robot can host a camera.
sceneThe scene that should be rendered.
widthThe used image width. (>0)
heightThe used image height. (>0)
renderRgbImageWhether to output the rgb image.
rgbImageThe rgb image's output parameter.
renderDepthImgaeWhether to output the depth image.
depthImageThe depth image's output parameter.
renderPointcloudWhether to output the point cloud.
pointCloudThe pointcloud's output parameter.
zNearThe near plane's distance.
zFarThe far plane's distance
vertFovThe fov in rad. (vertical)
nanValueAll values above the zFar value will be mapped on this value (usually nan or 0)
Returns
true on success