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...
 

Protected Attributes

EntityMakerPrivate * dataPtr
 

Detailed Description

Used to insert new models into the scene.

Member Enumeration Documentation

Unique identifiers for each simple shape supported.

Enumerator
BOX 

Box.

SPHERE 

Sphere.

CYLINDER 

Cylinder.

Constructor & Destructor Documentation

Constructor.

~ModelMaker ( )

Destructor.

Member Function Documentation

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

Returns the entity world position.

Returns
Entity's position in the world frame.

Reimplemented from EntityMaker.

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.
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.
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.
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.

virtual void Stop ( )
virtual

Stop the maker.

Reimplemented from EntityMaker.


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