Actin®  Version 5.2.0
Software for Robotics Simulation and Control
EcSystemShapeProximityState Class Reference

Holds state information related to the proximity of shapes in the system. More...

#include <ecSystemShapeProximityState.h>

Inheritance diagram for EcSystemShapeProximityState:
EcBaseShapeDataCache< DataType > EcXmlCompoundType EcXmlObject

Public Member Functions

 EcSystemShapeProximityState ()
 default constructor
 
virtual ~EcSystemShapeProximityState ()
 destructor
 
 EcSystemShapeProximityState (const EcSystemShapeProximityState &orig)
 copy constructor
 
EcSystemShapeProximityStateoperator= (const EcSystemShapeProximityState &orig)
 assignment operator
 
EcBoolean operator== (const EcSystemShapeProximityState &orig) const
 equality operator
 
virtual EcBoolean xmlInit () EC_OVERRIDE
 initialize XML components for reading and writing
 
virtual EcXmlObjectclone () const EC_OVERRIDE
 clone - a virtual constructor to an EcXmlObject pointer
 
virtual void registerComponents () EC_OVERRIDE
 register components with the parent
 
virtual EcBoolean equality (const EcXmlObject *other) const EC_OVERRIDE
 equality - virtual equality to an EcXmlObject pointer
 
virtual EcXmlObjectnewObject () const EC_OVERRIDE
 virtual new that returns an EcXmlObject
 
virtual EcBoolean read (EcXmlReader &stream) EC_OVERRIDE
 reads this object from an XML stream
 
virtual EcBoolean write (EcXmlWriter &stream) const EC_OVERRIDE
 writes this object to an XML stream
 
virtual EcBoolean allocateAndSetProximityVector (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes, const EcVector &proxVec)
 
virtual const EcVectorallocateAndGetProximityVector (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes) const
 
virtual EcBoolean setProximityVector (const EcShapeStateCacheKey &shapeIndex1, const EcShapeStateCacheKey &shapeIndex2, const EcVector &proxVec)
 set the datum for the shape pair key provided
 
virtual const EcVectorgetProximityVector (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2) const
 get the datum for the keys provided
 
virtual EcBoolean setDistance (const EcShapeStateCacheKey &shapeIndex1, const EcShapeStateCacheKey &shapeIndex2, const EcReal &dist)
 
virtual const EcRealgetDistance (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2) const
 get the distance for the keys provided
 
virtual EcBoolean allocateAndSetProximityDistance (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes, const EcReal &dist)
 
virtual const EcRealallocateAndGetProximityDistance (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes) const
 
virtual void invalidateAll ()
 
virtual EcBoolean isValid (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2) const
 
virtual EcBoolean isDistanceValid (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2) const
 
virtual void setUpdateTime (const EcU64 &uTime)
 set the state update time
 
virtual const EcU64updateTime () const
 return the state update time
 
virtual void setValid (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2)
 
virtual EcBoolean allocateAndSetProximityData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes, const EcShapeProximityData &datum)
 
virtual const EcShapeProximityDataallocateAndGetProximityData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes) const
 
virtual EcBoolean setProximityData (const EcShapeStateCacheKey &shapeIndex1, const EcShapeStateCacheKey &shapeIndex2, const EcShapeProximityData &datum)
 set the datum for the shape pair key provided
 
virtual const EcShapeProximityDatagetProximityData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2) const
 get the datum for the keys provided
 
virtual EcShapeProximityDatagetProximityData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2)
 get the proximity data (non-const) NOTE: Use with Caution!
 
virtual EcBoolean insertPenetrationPointShape1Primary (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcVector &point)
 insert penetration point to buffer of shape 1
 
virtual EcBoolean insertPenetrationPointShape2Primary (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcVector &point)
 insert penetration point to buffer of shape 2
 
virtual EcBoolean setFrictionMode (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcShapeProximityData::EcFrictionMode &mode)
 set the friction mode
 
virtual EcBoolean collisionOccured (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2) const
 get the collision occurred flag
 
virtual void setCollisionOccured (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcBoolean flag)
 set the collision occurred flag
 
virtual EcBoolean resetPenetrationPointBuffers (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2)
 reset the penetration point buffers
 
virtual void setIsInitialized (const EcBoolean &init)
 set the database initialization flag
 
virtual EcBoolean isInitialized () const
 get the database initialization flag
 
virtual EcBoolean resizeDatabaseToSystem (const EcInt32Vector3D &systemNumShapes) EC_OVERRIDE
 resize the database to the number of shapes in each link of each manipulator in the system
 
virtual EcBoolean setWitnessPoints (const EcShapeStateCacheKey &shapeIndex1, const EcShapeStateCacheKey &shapeIndex2, const EcVector &witnessPointA, const EcVector &witnessPointB)
 set the witness points for the shape pair key provided
 
virtual EcBoolean getWitnessPoints (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, EcVector &witnessPointA, EcVector &witnessPointB) const
 get the witness points for the keys provided
 
virtual EcBoolean areWitnessPointsValid (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2) const
 
virtual const EcTokentoken () const EC_OVERRIDE
 gets the xml token used for writing out.
 
- Public Member Functions inherited from EcBaseShapeDataCache< DataType >
 EcBaseShapeDataCache ()
 default constructor
 
virtual ~EcBaseShapeDataCache ()
 destructor
 
 EcBaseShapeDataCache (const EcBaseShapeDataCache &orig)
 copy constructor
 
EcBaseShapeDataCacheoperator= (const EcBaseShapeDataCache &orig)
 assignment operator
 
EcBoolean operator== (const EcBaseShapeDataCache &orig) const
 equality operator
 
virtual EcBoolean allocateAndSetData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes, const DataType &datum) const
 
virtual const DataType * allocateAndGetData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes) const
 
virtual EcBoolean setData (const EcShapeStateCacheKey &shapeIndex1, const EcShapeStateCacheKey &shapeIndex2, const DataType &datum) const
 set the datum for the shape pair key provided
 
virtual const DataType * getData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2) const
 get the datum for the keys provided
 
virtual EcBoolean makeIndicesCompatible (EcU32 &index1, EcU32 &index2) const
 
virtual EcBoolean makeKeysCompatible (EcShapeStateCacheKey &key1, EcShapeStateCacheKey &key2) const
 
virtual DataType * allocateAndGetData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2, const EcInt32Vector3D &systemNumShapes)
 
virtual DataType * getData (const EcShapeStateCacheKey &shape1, const EcShapeStateCacheKey &shape2)
 get the datum for the keys provided (non-const)
 
virtual void resetData ()
 reset cache data to 0
 
- Public Member Functions inherited from EcXmlCompoundType
 ECDECLARE_BIGFOUR (EcXmlCompoundType)
 
virtual EcBoolean readAttributes (EcXmlReader &stream)
 read object attributes from an XML stream
 
virtual EcBoolean readElements (EcXmlReader &stream)
 read object elements from an XML stream
 
virtual EcBoolean writeAttributes (EcXmlWriter &stream) const
 write object attributes to an XML stream
 
virtual EcBoolean writeElements (EcXmlWriter &stream) const
 write object elements to an XML stream
 
virtual EcBoolean writeSchema (EcXmlSchema &stream) const EC_OVERRIDE
 write schema
 
virtual EcBoolean writeSchemaAttributes (EcXmlSchema &stream) const
 write schema attributes
 
virtual EcBoolean writeSchemaElements (EcXmlSchema &stream) const
 write schema elements
 
virtual void registerComponent (const EcToken &token, EcXmlObject *obj)
 register a single component More...
 
virtual void registerComponent (EcXmlObject *obj)
 register a single component More...
 
virtual void registerComponentReadOnly (const EcToken &token, EcXmlObject *obj)
 register a single component as read-only More...
 
virtual const EcXmlComponentMapcomponentMap () const
 get a reference to the component map
 
virtual void registerAttributeComponent (const EcToken &AttribToken, EcXmlObject *Obj)
 register a single attribute component More...
 
virtual void registerAttributeComponentReadOnly (const EcToken &AttribToken, EcXmlObject *Obj)
 register a single attribute component read-only More...
 
virtual const EcXmlComponentMapattributeComponentMap ()
 get a reference to the component attribute map
 
virtual const EcXmlSpecialDescriptorMapspecialDescriptorMap ()
 get a reference to the special-descriptor map
 
virtual void registerComponentDescriptor (const EcToken &xmlToken, const EcToken &descriptorToken, const EcString &descriptorString)
 register an XML token-string descriptor More...
 
virtual const EcXmlTokenStringDescriptorMapMaptokenStringDescriptorMap ()
 get a reference to the XML token-string descriptor map
 
virtual EcBoolean hasChildren () const
 return EcTrue if there are children components or EcFalse if an empty element.
 
virtual EcBoolean hasAttributes () const
 return EcTrue if there are attributes in the element.
 
- Public Member Functions inherited from EcXmlObject
 ECDECLARE_BIGFOUR (EcXmlObject)
 
virtual EcBoolean readAttribute (EcXmlReader &stream)
 read this attribute from an XML stream
 
virtual EcBoolean createSchema (const EcString &filename, const EcToken &objectName=EcXml::EcDefaultToken) const
 create schema
 
virtual EcBoolean xmlInitialized () const
 get XML initialized flag. This bit is set on initialization.
 
virtual void setXmlInitialized (EcBoolean val=EcTrue)
 set XML initialized flag. This bit is set on initialization.
 
virtual EcBoolean specified () const
 get specified flag. This bit is set upon reading from an XML file.
 
virtual void setSpecified (EcBoolean val=EcTrue)
 set specified flag. This bit is set upon reading from an XML file.
 
virtual EcBoolean isBasicType () const
 Return true/false for basic type.
 
virtual EcBoolean equalsDefault () const
 tests equality of XML object with default
 

Static Public Member Functions

static EcSystemShapeProximityState nullObject ()
 gets a null link
 
- Static Public Member Functions inherited from EcBaseShapeDataCache< DataType >
static EcBaseShapeDataCache nullObject ()
 gets a null link
 

Protected Attributes

EcShapeProximityData m_ShapeData
 mutable data for speed
 
EcU64 m_CurrentUpdateTime
 the timer used for determining data freshness
 
EcBoolean m_IsInitialized
 is initialized
 
- Protected Attributes inherited from EcBaseShapeDataCache< DataType >
std::vector< std::vector< std::vector< std::vector< std::vector< std::vector< DataType > > > > > > m_ShapeData
 
- Protected Attributes inherited from EcXmlCompoundType
EcXmlComponentMapm_pComponentMap
 
EcXmlComponentMapm_pAttributeComponentMap
 
EcXmlSpecialDescriptorMapm_pSpecialDescriptorMap
 
EcXmlTokenStringDescriptorMapMapm_pComponentMapTokenStringDescriptor
 
- Protected Attributes inherited from EcXmlObject
EcU8 m_State
 the state of the object - eight boolean flags
 

Static Protected Attributes

static const EcShapeProximityData m_theNullShapeData
 const data More...
 
- Static Protected Attributes inherited from EcBaseShapeDataCache< DataType >
static const DataType m_theNullDatum
 
- Static Protected Attributes inherited from EcXmlObject
static const EcU8 m_theXmlInitializedBit
 the bit used to describe xml initialization
 
static const EcU8 m_theSpecifiedBit
 the bit used to describe specification
 

Additional Inherited Members

- Public Types inherited from EcXmlCompoundType
enum  {
  READONLYCOMPONENT = 0,
  READONLYATTRIBUTE
}
 special-descriptor codes More...
 
- Protected Member Functions inherited from EcXmlCompoundType
virtual EcBoolean readValueFromToken (const EcToken &token, EcXmlReader &stream)
 
virtual EcBoolean readValueFromSpecialToken (const EcToken &token, EcXmlReader &stream)
 read value from unregistered token
 
virtual EcBoolean readAttributeFromToken (const EcToken &token, EcXmlReader &stream)
 
virtual EcXmlComponentMapnewComponentMap () const
 allocate a new componentMap
 
virtual EcXmlSpecialDescriptorMapnewSpecialDescriptorMap ()
 allocate a new specialDescriptorsMap
 
virtual EcXmlTokenStringDescriptorMapMapnewTokenStringDescriptorMap ()
 allocate a new tokenStringDescriptorsMap
 
virtual void createComponentMap () const
 create component map
 
virtual void createAttributeComponentMap ()
 create attribute component map
 
virtual void createSpecialDescriptorMap ()
 create special-descriptors map
 
virtual void createTokenStringDescriptorMap ()
 create token-string descriptor map
 
virtual EcBoolean isReadOnlyComponent (const EcToken token) const
 check to see if the token corresponds to a read-only component
 
virtual EcBoolean isReadOnlyAttribute (const EcToken token) const
 check to see if the token corresponds to a read-only attribute
 
virtual EcXmlObjectlibraryAttribute ()
 

Detailed Description

Holds state information related to the proximity of shapes in the system.

Holds a class to describe the system level proximity data

Definition at line 24 of file ecSystemShapeProximityState.h.

Member Function Documentation

virtual const EcShapeProximityData* EcSystemShapeProximityState::allocateAndGetProximityData ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2,
const EcInt32Vector3D systemNumShapes 
) const
virtual

This method gets the data in the data structure, allocating as required. If the data is unavailable, the space is allocated and a default datum is returned

virtual const EcReal& EcSystemShapeProximityState::allocateAndGetProximityDistance ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2,
const EcInt32Vector3D systemNumShapes 
) const
virtual

This method gets the distance in the data structure, allocating as required. If the data is unavailable, the space is allocated and a default datum is returned

virtual const EcVector& EcSystemShapeProximityState::allocateAndGetProximityVector ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2,
const EcInt32Vector3D systemNumShapes 
) const
virtual

This method gets the data in the data structure, allocating as required. If the data is unavailable, the space is allocated and a default datum is returned

virtual EcBoolean EcSystemShapeProximityState::allocateAndSetProximityData ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2,
const EcInt32Vector3D systemNumShapes,
const EcShapeProximityData datum 
)
virtual

This method sets the data in the data structure, allocating as required.

virtual EcBoolean EcSystemShapeProximityState::allocateAndSetProximityDistance ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2,
const EcInt32Vector3D systemNumShapes,
const EcReal dist 
)
virtual

This method sets the distance in the data structure, allocating as required.

virtual EcBoolean EcSystemShapeProximityState::allocateAndSetProximityVector ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2,
const EcInt32Vector3D systemNumShapes,
const EcVector proxVec 
)
virtual

This method sets the data in the data structure, allocating as required.

virtual EcBoolean EcSystemShapeProximityState::areWitnessPointsValid ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2 
) const
virtual

check if the witness points for a shape combination are valid proximity data is invalidated whenever the state of the system changes

virtual void EcSystemShapeProximityState::invalidateAll ( )
virtual

invalidates the data in the cache by incrementing the freshness counter.

virtual EcBoolean EcSystemShapeProximityState::isDistanceValid ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2 
) const
virtual

check if the distance for a shape combination is valid proximity data is invalidated whenever the state of the system changes

virtual EcBoolean EcSystemShapeProximityState::isValid ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2 
) const
virtual

check if the data for a shape combination is valid proximity data is invalidated whenever the state of the system changes

virtual EcBoolean EcSystemShapeProximityState::setDistance ( const EcShapeStateCacheKey shapeIndex1,
const EcShapeStateCacheKey shapeIndex2,
const EcReal dist 
)
virtual

set the distance for the shape pair key provided, this does not update the valid flag, only the distance valid flag

virtual void EcSystemShapeProximityState::setValid ( const EcShapeStateCacheKey shape1,
const EcShapeStateCacheKey shape2 
)
virtual

for the data in the datum to be set to valid this is used when non-const modification of the data is required. The onus is on the caller to set this

Member Data Documentation

const EcShapeProximityData EcSystemShapeProximityState::m_theNullShapeData
staticprotected

const data

the null shape data member

Definition at line 362 of file ecSystemShapeProximityState.h.


The documentation for this class was generated from the following file:
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.