Drake
InternalFrame Class Reference

This class represents the internal representation of a GeometryFrame. More...

#include <drake/geometry/internal_frame.h>

Public Member Functions

 InternalFrame ()
 Default constructor. More...
 
 InternalFrame (SourceId source_id, FrameId frame_id, const std::string &name, int frame_group, PoseIndex pose_index, FrameId parent_id)
 Full constructor. More...
 
bool operator== (const InternalFrame &other) const
 Compares two InternalFrame instances for "equality". More...
 
bool operator!= (const InternalFrame &other) const
 Compares two InternalFrame instances for inequality. More...
 
SourceId get_source_id () const
 
FrameId get_id () const
 
const std::string & get_name () const
 
int get_frame_group () const
 
PoseIndex get_pose_index () const
 
void set_pose_index (PoseIndex index)
 
bool has_parent (FrameId parent) const
 Returns true if this frame is the child of the identified frame. More...
 
FrameId get_parent_frame_id () const
 
const std::unordered_set< FrameId > & get_child_frames () const
 
std::unordered_set< FrameId > * get_mutable_child_frames ()
 
const std::unordered_set< GeometryId > & get_child_geometries () const
 
std::unordered_set< GeometryId > * get_mutable_child_geometries ()
 
bool has_child (FrameId frame_id) const
 Returns true if the given frame_id is a known child of this frame. More...
 
void add_child (FrameId frame_id)
 Adds the given frame_id to the children of this frame. More...
 
void remove_child (FrameId frame_id)
 Removes the given frame_id from this frame's set of children. More...
 
bool has_child (GeometryId geometry_id) const
 Reports if the given geometry_id is rigidly affixed to this frame. More...
 
void add_child (GeometryId geometry_id)
 Adds the given geometry_id to the set of rigidly affixed child geometries of this frame. More...
 
void remove_child (GeometryId geometry_id)
 Removes the given geometry_id from the set of rigidly affixed child geometries of this frame. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 InternalFrame (const InternalFrame &)=default
 
InternalFrameoperator= (const InternalFrame &)=default
 
 InternalFrame (InternalFrame &&)=default
 
InternalFrameoperator= (InternalFrame &&)=default
 

Static Public Member Functions

static FrameId get_world_frame_id ()
 

Detailed Description

This class represents the internal representation of a GeometryFrame.

It includes the user-specified data (name and frame group), excludes the pose data, and then includes topology data.

It is not intended to be used outside of the geometry library. To instantiate frames in GeometryWorld, use the drake::geometry::GeometryFrame class in conjunction with the GeometryWorld::RegisterFrame() methods.

Constructor & Destructor Documentation

InternalFrame ( const InternalFrame )
default
InternalFrame ( InternalFrame &&  )
default

Default constructor.

The parent identifier and pose index will be invalid.

InternalFrame ( SourceId  source_id,
FrameId  frame_id,
const std::string &  name,
int  frame_group,
PoseIndex  pose_index,
FrameId  parent_id 
)

Full constructor.

Parameters
source_idThe identifier of the source this belongs to.
frame_idThe identifier of this frame.
nameThe name of the frame.
frame_groupThe frame's frame group membership.
pose_indexThe position in the pose vector of this frame's last known pose.
parent_idThe id of the parent frame.

Member Function Documentation

void add_child ( FrameId  frame_id)
inline

Adds the given frame_id to the children of this frame.

void add_child ( GeometryId  geometry_id)
inline

Adds the given geometry_id to the set of rigidly affixed child geometries of this frame.

const std::unordered_set<FrameId>& get_child_frames ( ) const
inline

Here is the caller graph for this function:

const std::unordered_set<GeometryId>& get_child_geometries ( ) const
inline

Here is the caller graph for this function:

int get_frame_group ( ) const
inline

Here is the caller graph for this function:

FrameId get_id ( ) const
inline

Here is the caller graph for this function:

std::unordered_set<FrameId>* get_mutable_child_frames ( )
inline
std::unordered_set<GeometryId>* get_mutable_child_geometries ( )
inline
const std::string& get_name ( ) const
inline

Here is the caller graph for this function:

FrameId get_parent_frame_id ( ) const
inline
PoseIndex get_pose_index ( ) const
inline

Here is the caller graph for this function:

SourceId get_source_id ( ) const
inline
static FrameId get_world_frame_id ( )
inlinestatic
bool has_child ( FrameId  frame_id) const
inline

Returns true if the given frame_id is a known child of this frame.

bool has_child ( GeometryId  geometry_id) const
inline

Reports if the given geometry_id is rigidly affixed to this frame.

bool has_parent ( FrameId  parent) const
inline

Returns true if this frame is the child of the identified frame.

bool operator!= ( const InternalFrame other) const

Compares two InternalFrame instances for inequality.

See operator==() for the definition of equality.

InternalFrame& operator= ( InternalFrame &&  )
default
InternalFrame& operator= ( const InternalFrame )
default
bool operator== ( const InternalFrame other) const

Compares two InternalFrame instances for "equality".

Two internal frames are considered equal if they have the same frame identifier.

void remove_child ( FrameId  frame_id)
inline

Removes the given frame_id from this frame's set of children.

If the given frame_id is not a child, this frame remains unchanged.

void remove_child ( GeometryId  geometry_id)
inline

Removes the given geometry_id from the set of rigidly affixed child geometries of this frame.

If geometry_id is not actually a child geometry, then the frame remains unchanged.

void set_pose_index ( PoseIndex  index)
inline

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