Drake
InternalGeometry Class Reference

This class represents the internal representation of registered dynamic geometry. More...

#include <drake/geometry/internal_geometry.h>

Inheritance diagram for InternalGeometry:
[legend]
Collaboration diagram for InternalGeometry:
[legend]

Public Member Functions

 InternalGeometry ()
 Default constructor. More...
 
 InternalGeometry (std::unique_ptr< Shape > shape, FrameId frame_id, GeometryId geometry_id, const Isometry3< double > &X_PG, GeometryIndex engine_index, const optional< GeometryId > &parent_id={})
 Full constructor. More...
 
FrameId get_frame_id () const
 
optional< GeometryIdget_parent_id () const
 
void set_parent_id (GeometryId id)
 
GeometryIndex get_engine_index () const
 
void set_engine_index (GeometryIndex index)
 
bool is_child_of_geometry (GeometryId geometry_id) const
 Returns true if this geometry has a geometry parent and the parent has the given geometry_id. More...
 
bool is_child_of_frame (FrameId frame_id) const
 Returns true if the geometry is affixed to the frame with the given frame_id. More...
 
const std::unordered_set< GeometryId > & get_child_geometry_ids () const
 
std::unordered_set< GeometryId > * get_mutable_child_geometry_ids ()
 
bool has_child (GeometryId geometry_id) const
 Returns true if this geometry has a child geometry with the given geometry_id. More...
 
void add_child (GeometryId geometry_id)
 Adds a geometry with the given geometry_id to this geometry's set of children. More...
 
void remove_child (GeometryId geometry_id)
 Removes the given geometry_id from this geometry's set of children. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 InternalGeometry (const InternalGeometry &)=default
 
InternalGeometryoperator= (const InternalGeometry &)=default
 
 InternalGeometry (InternalGeometry &&)=default
 
InternalGeometryoperator= (InternalGeometry &&)=default
 
- Public Member Functions inherited from InternalGeometryBase
 InternalGeometryBase ()
 Default constructor. More...
 
 InternalGeometryBase (std::unique_ptr< Shape > shape, GeometryId geometry_id, const Isometry3< double > &X_PG)
 Full constructor. More...
 
bool operator== (const InternalGeometryBase &other) const
 Compares two InternalGeometryBase instances for "equality". More...
 
bool operator!= (const InternalGeometryBase &other) const
 Compares two InternalGeometry instances for inequality. More...
 
const Shapeget_shape () const
 
GeometryId get_id () const
 
const Isometry3< double > & get_pose_in_parent () const
 
 InternalGeometryBase (const InternalGeometryBase &)=default
 
InternalGeometryBaseoperator= (const InternalGeometryBase &)=default
 
 InternalGeometryBase (InternalGeometryBase &&)=default
 
InternalGeometryBaseoperator= (InternalGeometryBase &&)=default
 

Detailed Description

This class represents the internal representation of registered dynamic geometry.

It includes the user-specified meta data (e.g., name) and internal topology representations.

Constructor & Destructor Documentation

InternalGeometry ( const InternalGeometry )
default

Default constructor.

The parent and frame ids will be invalid as well as the state documented in InternalGeometryBase().

InternalGeometry ( std::unique_ptr< Shape shape,
FrameId  frame_id,
GeometryId  geometry_id,
const Isometry3< double > &  X_PG,
GeometryIndex  engine_index,
const optional< GeometryId > &  parent_id = {} 
)

Full constructor.

Parameters
shapeThe shape specification for this instance.
frame_idThe identifier of the frame this belongs to.
geometry_idThe identifier for this geometry.
X_PGThe pose of the geometry G in the parent frame P. The parent may be a frame, or another registered geometry.
engine_indexThe position in the geometry engine of this geometry.
parent_idThe optional id of the parent geometry.

Member Function Documentation

void add_child ( GeometryId  geometry_id)
inline

Adds a geometry with the given geometry_id to this geometry's set of children.

const std::unordered_set<GeometryId>& get_child_geometry_ids ( ) const
inline
GeometryIndex get_engine_index ( ) const
inline
FrameId get_frame_id ( ) const
inline
std::unordered_set<GeometryId>* get_mutable_child_geometry_ids ( )
inline
optional<GeometryId> get_parent_id ( ) const
inline
bool has_child ( GeometryId  geometry_id) const
inline

Returns true if this geometry has a child geometry with the given geometry_id.

bool is_child_of_frame ( FrameId  frame_id) const
inline

Returns true if the geometry is affixed to the frame with the given frame_id.

bool is_child_of_geometry ( GeometryId  geometry_id) const
inline

Returns true if this geometry has a geometry parent and the parent has the given geometry_id.

InternalGeometry& operator= ( InternalGeometry &&  )
default
InternalGeometry& operator= ( const InternalGeometry )
default
void remove_child ( GeometryId  geometry_id)
inline

Removes the given geometry_id from this geometry's set of children.

If the id is not in the set, nothing changes.

void set_engine_index ( GeometryIndex  index)
inline
void set_parent_id ( GeometryId  id)
inline

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