RobWorkProject
Classes | Public Types | Public Member Functions | List of all members
RWPERollbackMethod Class Referenceabstract

The rollback method calculates new guesses for the correct step size based on previous samples of the distance or penetration between objects. More...

#include <RWPERollbackMethod.hpp>

Inherited by RWPERollbackMethodRidder.

Classes

class  Factory
 A factory for a RWPERollbackMethod. This factory also defines an ExtensionPoint. More...
 
class  RollbackData
 Data type for methods that need to store internal data during rollback. More...
 
struct  Sample
 A sample defines distances for all contact pairs for a specific time. More...
 
struct  SampleCompare
 Comparison of samples that allows ordering by time. More...
 

Public Types

typedef rw::common::Ptr< const RWPERollbackMethodPtr
 Smart pointer type of RWPERollbackMethod.
 
typedef std::set< Sample, SampleCompareSampleSet
 A collection of samples - the input to the rollback method provided by the physics engine.
 

Public Member Functions

 RWPERollbackMethod ()
 Constructor.
 
virtual ~RWPERollbackMethod ()
 Destructor.
 
virtual RollbackDatacreateData () const
 Create RollbackData. More...
 
virtual double getTimestep (SampleSet &samples, RollbackData *data) const =0
 Get a new timestep based on the current samples. More...
 

Detailed Description

The rollback method calculates new guesses for the correct step size based on previous samples of the distance or penetration between objects.

The simulator provides a set of samples. A sample is a timestamp and a list of distances for all frame pairs that are in rollback. It is up to the rollback method to decide how many samples are needed. For more complex algorithms it is possible to inherit the RollbackData class to add user defined data that is stored between calls to getTimestep().

Member Function Documentation

◆ createData()

virtual RollbackData* createData ( ) const
virtual

Create RollbackData.

Returns
a pointer to a new data structure - owned by the caller.

Reimplemented in RWPERollbackMethodRidder.

◆ getTimestep()

virtual double getTimestep ( SampleSet samples,
RollbackData data 
) const
pure virtual

Get a new timestep based on the current samples.

Parameters
samples[in/out] the samples known.
data[in] a pointer to the data, see createData().
Returns
a new timestep where the physics engine should find the new Sample.

Implemented in RWPERollbackMethodRidder.


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