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

Data Structures

struct  Color
 
struct  PhongMaterial
 

Public Member Functions

 VisualizationFactory ()=default
 
virtual ~VisualizationFactory ()=default
 
virtual void init (int &, char *[], const std::string &)
 
virtual VisualizationNodePtr getVisualizationFromPrimitives (const std::vector< Primitive::PrimitivePtr > &, bool=false, Color=Color::Gray())
 
virtual VisualizationNodePtr getVisualizationFromFile (const std::string &, bool=false, float=1.0f, float=1.0f, float=1.0f)
 
virtual VisualizationNodePtr getVisualizationFromFile (const std::ifstream &, bool=false, float=1.0f, float=1.0f, float=1.0f)
 
virtual VisualizationNodePtr createBox (float, float, float, float=0.5f, float=0.5f, float=0.5f)
 
virtual VisualizationNodePtr createLine (const Eigen::Vector3f &, const Eigen::Vector3f &, float=1.0f, float=0.5f, float=0.5f, float=0.5f)
 
virtual VisualizationNodePtr createLine (const Eigen::Matrix4f &, const Eigen::Matrix4f &, float=1.0f, float=0.5f, float=0.5f, float=0.5f)
 
virtual VisualizationNodePtr createSphere (float, float=0.5f, float=0.5f, float=0.5f)
 
virtual VisualizationNodePtr createCircle (float, float, float, float=1.0f, float=0.5f, float=0.5f, size_t=30)
 
virtual VisualizationNodePtr createTorus (float, float, float=1.0f, float=0.5f, float=0.5f, float=0.5f, float=0.0f, int=8, int=30)
 
virtual VisualizationNodePtr createCircleArrow (float, float, float=1, float=0.5f, float=0.5f, float=0.5f, float=0.0f, int=8, int=30)
 
virtual VisualizationNodePtr createCylinder (float, float, float=0.5f, float=0.5f, float=0.5f)
 
virtual VisualizationNodePtr createCoordSystem (float=1.0f, std::string *=NULL, float=100.0f, float=3.0f, int=10)
 
virtual VisualizationNodePtr createBoundingBox (const BoundingBox &, bool=false)
 
virtual VisualizationNodePtr createVertexVisualization (const Eigen::Vector3f &, float, float, float=0.5f, float=0.5f, float=0.5f)
 
virtual VisualizationNodePtr createTriMeshModelVisualization (const TriMeshModelPtr &, const Eigen::Matrix4f &, float=1.0f, float=1.0f, float=1.0f)
 
virtual VisualizationNodePtr createTriMeshModelVisualization (const TriMeshModelPtr &, bool, const Eigen::Matrix4f &, bool=true)
 
virtual VisualizationNodePtr createPlane (const Eigen::Vector3f &, const Eigen::Vector3f &, float, float, float=0.5f, float=0.5f, float=0.5f)
 
virtual VisualizationNodePtr createPlane (const MathTools::Plane &plane, float extend, float transparency, float colorR=0.5f, float colorG=0.5f, float colorB=0.5f)
 
virtual VisualizationNodePtr createArrow (const Eigen::Vector3f &, float=50.0f, float=2.0f, const Color &=Color::Gray())
 
virtual VisualizationNodePtr createTrajectory (TrajectoryPtr, Color=Color::Blue(), Color=Color::Gray(), float=15.0f, float=4.0f)
 
virtual VisualizationNodePtr createText (const std::string &, bool=false, float=1.0f, Color=Color::Black(), float=20.0f, float=20.0f, float=0.0f)
 
virtual VisualizationNodePtr createEllipse (float, float, float, bool=true, float=4.0f, float=8.0f)
 
virtual void applyDisplacement (VisualizationNodePtr, Eigen::Matrix4f &)
 
virtual VisualizationNodePtr createVisualization ()
 
virtual VisualizationNodePtr createUnitedVisualization (const std::vector< VisualizationNodePtr > &) const
 
virtual void cleanup ()
 
- Public Member Functions inherited from AbstractFactoryMethod< VisualizationFactory, void *>
void setDescription (const std::string &newDescription)
 
std::string getDescription () const
 

Additional Inherited Members

- Public Types inherited from AbstractFactoryMethod< VisualizationFactory, void *>
typedef std::shared_ptr< VisualizationFactory >(* initialisationFunction) (void *)
 
- Static Public Member Functions inherited from AbstractFactoryMethod< VisualizationFactory, void *>
static std::shared_ptr< VisualizationFactory > fromName (const std::string &name, void * params)
 
static std::shared_ptr< VisualizationFactory > first (void * params)
 
static std::string getName ()
 
static std::shared_ptr< VisualizationFactory > createInstance (void *)
 
static void registerClass (const std::string &name, initialisationFunction init)
 
static std::vector< std::string > getSubclassList ()
 

Constructor & Destructor Documentation

◆ VisualizationFactory()

VirtualRobot::VisualizationFactory::VisualizationFactory ( )
default

◆ ~VisualizationFactory()

virtual VirtualRobot::VisualizationFactory::~VisualizationFactory ( )
virtualdefault

Member Function Documentation

◆ applyDisplacement()

virtual void VirtualRobot::VisualizationFactory::applyDisplacement ( VisualizationNodePtr  ,
Eigen::Matrix4f &   
)
inlinevirtual

Move local visualization by homogeneous matrix m. (MM)

Reimplemented in VirtualRobot::CoinVisualizationFactory.

◆ cleanup()

virtual void VirtualRobot::VisualizationFactory::cleanup ( )
inlinevirtual

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 in VirtualRobot::CoinVisualizationFactory.

◆ createArrow()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createArrow ( const Eigen::Vector3f &  ,
float  = 50.0f,
float  = 2.0f,
const Color = Color::Gray() 
)
inlinevirtual

◆ createBoundingBox()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createBoundingBox ( const BoundingBox ,
bool  = false 
)
inlinevirtual

◆ createBox()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createBox ( float  ,
float  ,
float  ,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f 
)
inlinevirtual

A box, dimensions are given in mm.

Reimplemented in VirtualRobot::CoinVisualizationFactory.

◆ createCircle()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createCircle ( float  ,
float  ,
float  ,
float  = 1.0f,
float  = 0.5f,
float  = 0.5f,
size_t  = 30 
)
inlinevirtual

◆ createCircleArrow()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createCircleArrow ( float  ,
float  ,
float  = 1,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f,
float  = 0.0f,
int  = 8,
int  = 30 
)
inlinevirtual

◆ createCoordSystem()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createCoordSystem ( float  = 1.0f,
std::string *  = NULL,
float  = 100.0f,
float  = 3.0f,
int  = 10 
)
inlinevirtual

◆ createCylinder()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createCylinder ( float  ,
float  ,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f 
)
inlinevirtual

◆ createEllipse()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createEllipse ( float  ,
float  ,
float  ,
bool  = true,
float  = 4.0f,
float  = 8.0f 
)
inlinevirtual

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 in VirtualRobot::CoinVisualizationFactory.

◆ createLine() [1/2]

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createLine ( const Eigen::Vector3f &  ,
const Eigen::Vector3f &  ,
float  = 1.0f,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f 
)
inlinevirtual

◆ createLine() [2/2]

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createLine ( const Eigen::Matrix4f &  ,
const Eigen::Matrix4f &  ,
float  = 1.0f,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f 
)
inlinevirtual

◆ createPlane() [1/2]

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createPlane ( const Eigen::Vector3f &  ,
const Eigen::Vector3f &  ,
float  ,
float  ,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f 
)
inlinevirtual

◆ createPlane() [2/2]

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createPlane ( const MathTools::Plane plane,
float  extend,
float  transparency,
float  colorR = 0.5f,
float  colorG = 0.5f,
float  colorB = 0.5f 
)
inlinevirtual

◆ createSphere()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createSphere ( float  ,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f 
)
inlinevirtual

◆ createText()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createText ( const std::string &  ,
bool  = false,
float  = 1.0f,
Color  = Color::Black(),
float  = 20.0f,
float  = 20.0f,
float  = 0.0f 
)
inlinevirtual

◆ createTorus()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createTorus ( float  ,
float  ,
float  = 1.0f,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f,
float  = 0.0f,
int  = 8,
int  = 30 
)
inlinevirtual

◆ createTrajectory()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createTrajectory ( TrajectoryPtr  ,
Color  = Color::Blue(),
Color  = Color::Gray(),
float  = 15.0f,
float  = 4.0f 
)
inlinevirtual

◆ createTriMeshModelVisualization() [1/2]

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createTriMeshModelVisualization ( const TriMeshModelPtr ,
const Eigen::Matrix4f &  ,
float  = 1.0f,
float  = 1.0f,
float  = 1.0f 
)
inlinevirtual

◆ createTriMeshModelVisualization() [2/2]

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createTriMeshModelVisualization ( const TriMeshModelPtr ,
bool  ,
const Eigen::Matrix4f &  ,
bool  = true 
)
inlinevirtual

◆ createUnitedVisualization()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createUnitedVisualization ( const std::vector< VisualizationNodePtr > &  ) const
inlinevirtual

Create a united visualization.

Reimplemented in VirtualRobot::CoinVisualizationFactory.

◆ createVertexVisualization()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createVertexVisualization ( const Eigen::Vector3f &  ,
float  ,
float  ,
float  = 0.5f,
float  = 0.5f,
float  = 0.5f 
)
inlinevirtual

◆ createVisualization()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::createVisualization ( )
inlinevirtual

Create an empty VisualizationNode.

Reimplemented in VirtualRobot::CoinVisualizationFactory.

◆ getVisualizationFromFile() [1/2]

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::getVisualizationFromFile ( const std::string &  ,
bool  = false,
float  = 1.0f,
float  = 1.0f,
float  = 1.0f 
)
inlinevirtual

◆ getVisualizationFromFile() [2/2]

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::getVisualizationFromFile ( const std::ifstream &  ,
bool  = false,
float  = 1.0f,
float  = 1.0f,
float  = 1.0f 
)
inlinevirtual

◆ getVisualizationFromPrimitives()

virtual VisualizationNodePtr VirtualRobot::VisualizationFactory::getVisualizationFromPrimitives ( const std::vector< Primitive::PrimitivePtr > &  ,
bool  = false,
Color  = Color::Gray() 
)
inlinevirtual

◆ init()

virtual void VirtualRobot::VisualizationFactory::init ( int &  ,
char *  [],
const std::string &   
)
inlinevirtual