ModelMaker Class Reference

Used to insert new models into the scene. More...

#include <ModelMaker.hh>

Inherits EntityMaker.

Public Types

enum  SimpleShapes { BOX, SPHERE, CYLINDER }
 Unique identifiers for each simple shape supported. More...
 

Public Member Functions

 ModelMaker ()
 Constructor. More...
 
 ~ModelMaker ()
 Destructor. More...
 
virtual ignition::math::Vector3d EntityPosition () const
 Returns the entity world position. More...
 
bool InitFromFile (const std::string &_filename)
 Initialize the model maker from a file. More...
 
bool InitFromModel (const std::string &_modelName)
 Initialize the model maker with an existing model. More...
 
bool InitSimpleShape (SimpleShapes _shape)
 Initialize the model maker to make one of the supported simple shapes. More...
 
virtual void OnMouseMove (const common::MouseEvent &_event)
 Callback when moving mouse. More...
 
virtual void OnMouseRelease (const common::MouseEvent &_event)
 Callback when mouse button is released. More...
 
virtual void Start ()
 Start the maker. More...
 
virtual void Stop ()
 Stop the maker. More...
 

Protected Member Functions

virtual void SetEntityPosition (const ignition::math::Vector3d &_pos)
 Sets the entity world position. More...
 

Detailed Description

Used to insert new models into the scene.

Member Enumeration Documentation

◆ SimpleShapes

Unique identifiers for each simple shape supported.

Enumerator
BOX 

Box.

SPHERE 

Sphere.

CYLINDER 

Cylinder.

Constructor & Destructor Documentation

◆ ModelMaker()

Constructor.

◆ ~ModelMaker()

~ModelMaker ( )

Destructor.

Member Function Documentation

◆ EntityPosition()

virtual ignition::math::Vector3d EntityPosition ( ) const
virtual

Returns the entity world position.

Returns
Entity's position in the world frame.

Reimplemented from EntityMaker.

◆ InitFromFile()

bool InitFromFile ( const std::string &  _filename)

Initialize the model maker from a file.

Parameters
[in]_filenamePath to the file.
Returns
True if initialization is successful.

◆ InitFromModel()

bool InitFromModel ( const std::string &  _modelName)

Initialize the model maker with an existing model.

Parameters
[in]_modelNameName of existing model in the scene.
Returns
True if initialization is successful.

◆ InitSimpleShape()

bool InitSimpleShape ( SimpleShapes  _shape)

Initialize the model maker to make one of the supported simple shapes.

Parameters
[in]_shapeThe desired shape.
Returns
True if initialization is successful.

◆ SetEntityPosition()

virtual void SetEntityPosition ( const ignition::math::Vector3d &  _pos)
protectedvirtual

Sets the entity world position.

Parameters
[in]_posNew position in the world frame.

Reimplemented from EntityMaker.

◆ Stop()

virtual void Stop ( )
virtual

Stop the maker.

Reimplemented from EntityMaker.


The documentation for this class was generated from the following file: