Drake
Drake C++ Documentation
GeometryVersion Class Reference

Detailed Description

A version numbering class that reports revisions of SceneGraph's geometric data.

Other Systems can use this version number to perform updates when they detect changes to the geometric data they consume. The version of the geometry data is made available through SceneGraphInspector.

The geometry data is partitioned by geometric role and have independent role version values. Some of SceneGraph's API (as variously documented) will cause one or more role versions to change. This class provides the API IsSameAs that takes another GeometryVersion as well as a Role to help detect whether the provided role of the geometries may have changed. For example:

// Downstream system holds an instance of GeometryVersion `old_version` as a
// reference to compare against.
// Get the version under test from SceneGraphInspector.
const GeometryVersion& test_version = scene_graph_inspector.geometry_version();
// Determine if two versions have the same proximity data.
bool same_proximity = old_version.IsSameAs(test_version, Role::kProximity);

#include <drake/geometry/geometry_version.h>

Public Member Functions

 GeometryVersion ()
 Constructs a default-initialized instance; guaranteed to be different from every other instance. More...
 
bool IsSameAs (const GeometryVersion &other, Role role) const
 Returns true if this GeometryVersion has the same role version as the other GeometryVersion. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 GeometryVersion (const GeometryVersion &)=default
 
GeometryVersionoperator= (const GeometryVersion &)=default
 
 GeometryVersion (GeometryVersion &&)=default
 
GeometryVersionoperator= (GeometryVersion &&)=default
 

Friends

template<typename T >
class GeometryState
 
class GeometryVersionTest
 

Constructor & Destructor Documentation

◆ GeometryVersion() [1/3]

GeometryVersion ( const GeometryVersion )
default

◆ GeometryVersion() [2/3]

GeometryVersion ( GeometryVersion &&  )
default

◆ GeometryVersion() [3/3]

Constructs a default-initialized instance; guaranteed to be different from every other instance.

Member Function Documentation

◆ IsSameAs()

bool IsSameAs ( const GeometryVersion other,
Role  role 
) const

Returns true if this GeometryVersion has the same role version as the other GeometryVersion.

◆ operator=() [1/2]

GeometryVersion& operator= ( const GeometryVersion )
default

◆ operator=() [2/2]

GeometryVersion& operator= ( GeometryVersion &&  )
default

Friends And Related Function Documentation

◆ GeometryState

friend class GeometryState
friend

◆ GeometryVersionTest

friend class GeometryVersionTest
friend

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