Drake
GeometryInstance Class Reference

A geometry instance combines a geometry definition (i.e., a shape of some sort), a pose (relative to a parent "frame" P), material information, and an opaque collection of metadata. More...

#include <drake/geometry/geometry_instance.h>

Public Member Functions

 GeometryInstance (const Isometry3< double > &X_PG, std::unique_ptr< Shape > shape)
 Constructor with default visual material (see VisualMaterial default constructor for details on what that color is). More...
 
 GeometryInstance (const Isometry3< double > &X_PG, std::unique_ptr< Shape > shape, const VisualMaterial &vis_material)
 Constructor. More...
 
GeometryId id () const
 Returns the globally unique id for this geometry specification. More...
 
const Isometry3< double > & pose () const
 
void set_pose (const Isometry3< double > &X_PG)
 
const Shapeshape () const
 
std::unique_ptr< Shaperelease_shape ()
 Releases the shape from the instance. More...
 
const VisualMaterialvisual_material () const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 GeometryInstance (const GeometryInstance &)=default
 
GeometryInstanceoperator= (const GeometryInstance &)=default
 
 GeometryInstance (GeometryInstance &&)=default
 
GeometryInstanceoperator= (GeometryInstance &&)=default
 

Detailed Description

A geometry instance combines a geometry definition (i.e., a shape of some sort), a pose (relative to a parent "frame" P), material information, and an opaque collection of metadata.

The parent frame can be a registered frame or another registered geometry.

Constructor & Destructor Documentation

GeometryInstance ( const GeometryInstance )
default
GeometryInstance ( const Isometry3< double > &  X_PG,
std::unique_ptr< Shape shape 
)

Constructor with default visual material (see VisualMaterial default constructor for details on what that color is).

Parameters
X_PGThe pose of this geometry (G) in its parent's frame (P).
shapeThe underlying shape for this geometry instance.
GeometryInstance ( const Isometry3< double > &  X_PG,
std::unique_ptr< Shape shape,
const VisualMaterial vis_material 
)

Constructor.

Parameters
X_PGThe pose of this geometry (G) in its parent's frame (P).
shapeThe underlying shape for this geometry instance.
vis_materialThe visual material to apply to this geometry.

Member Function Documentation

GeometryId id ( ) const
inline

Returns the globally unique id for this geometry specification.

Every instantiation of GeometryInstance will contain a unique id value. The id value is preserved across copies. After successfully registering this GeometryInstance, this id will serve as the identifier for the registered representation as well.

GeometryInstance& operator= ( GeometryInstance &&  )
default
GeometryInstance& operator= ( const GeometryInstance )
default
const Isometry3<double>& pose ( ) const
inline
std::unique_ptr<Shape> release_shape ( )
inline

Releases the shape from the instance.

void set_pose ( const Isometry3< double > &  X_PG)
inline
const Shape& shape ( ) const
inline
const VisualMaterial& visual_material ( ) const
inline

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