RobWorkProject  23.9.11-
Classes | Public Types | Public Member Functions | List of all members
ContactStrategyData Class Reference

Container for data that is stored by contact strategies between contact detection calls. More...

#include <ContactStrategyData.hpp>

Classes

class  SpecificData
 Base class that can be extended to implement strategy-specific data. More...
 

Public Types

typedef rw::core::Ptr< ContactStrategyDataPtr
 Smart pointer type.
 

Public Member Functions

 ContactStrategyData ()
 Constructor.
 
 ContactStrategyData (const ContactStrategyData &data)
 Copy data to new container.
 
virtual ~ContactStrategyData ()
 Destructor.
 
ContactStrategyDataoperator= (const ContactStrategyData &data)
 Assign data from other container to this container. More...
 
virtual SpecificDatagetSpecificData () const
 Get the current strategy-specific data. More...
 
virtual void setSpecificData (SpecificData *data)
 Set the strategy-specific data. More...
 
bool isInitialized () const
 Check whether data container has been initialized with specific data. More...
 

Detailed Description

Container for data that is stored by contact strategies between contact detection calls.

Keeping data between consecutive calls to the contact strategy will allow strategies to exploit spatial and temporal coherence to speed up algorithms.

The ContactStrategy normally implements the SpecificData class if it wants to store data in ContactStrategyData. The concrete implementation will depend on the strategy, and should under normal circumstances not be directly accessible by the user.

At a later stage ContactStrategyData might be extended to allow storing timing values for detailed benchmarks of contact detection algorithms.

Member Function Documentation

◆ getSpecificData()

virtual SpecificData* getSpecificData ( ) const
virtual

Get the current strategy-specific data.

Returns
a pointer to the data or NULL if none has been set.

◆ isInitialized()

bool isInitialized ( ) const

Check whether data container has been initialized with specific data.

Returns
true if initialized.

◆ operator=()

ContactStrategyData& operator= ( const ContactStrategyData data)

Assign data from other container to this container.

Parameters
data[in] the data to copy.
Returns
reference to this container.

◆ setSpecificData()

virtual void setSpecificData ( SpecificData data)
virtual

Set the strategy-specific data.

Parameters
data[in] a pointer to the data to store.

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