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

#include <ecGeneralMotion.h>

Inheritance diagram for EcGeneralMotion:
EcXmlCompoundType EcXmlObject

Public Member Functions

 EcGeneralMotion ()
 default constructor
 
 EcGeneralMotion (const EcVector &linear, const EcVector &angular)
 constructor with a linear and angular component
 
 ~EcGeneralMotion ()
 destructor
 
 EcGeneralMotion (const EcGeneralMotion &orig)
 copy constructor
 
EcGeneralMotionoperator= (const EcGeneralMotion &orig)
 assignment operator
 
EcBoolean operator== (const EcGeneralMotion &orig) const
 equality operator
 
EcBoolean xmlInit () EC_OVERRIDE
 initialize XML components for reading and writing
 
EcXmlObjectclone () const EC_OVERRIDE
 clone - a constructor to an EcXmlObject pointer
 
EcBoolean equality (const EcXmlObject *other) const EC_OVERRIDE
 equality - equality to an EcXmlObject pointer
 
EcXmlObjectnewObject () const EC_OVERRIDE
 new that returns an EcXmlObject
 
EcGeneralMotionoperator+= (const EcGeneralMotion &v2)
 add this general motion to another and set this to the result.
 
EcGeneralMotionoperator-= (const EcGeneralMotion &v2)
 subtract another general motion from this and set this to the result.
 
EcGeneralMotion operator+ (const EcGeneralMotion &v2) const
 add this general motion to another and return the result.
 
EcGeneralMotion operator- (const EcGeneralMotion &v2) const
 subtract another general motion from this and return the result.
 
EcGeneralMotion operator* (const EcReal &s) const
 scale the general motion
 
EcGeneralMotion operator/ (const EcReal &s) const
 scale the general motion
 
EcGeneralMotionoperator*= (EcReal factor)
 scalar in place
 
EcGeneralMotiontransformBy (const EcCoordinateSystemTransformation &xform)
 general transformation. Returns transformed entity.
 
EcGeneralMotiontransformBy (const EcOrientation &orientatation)
 rotation. Returns the transformed entity
 
EcGeneralMotiontransformBy (const EcVector &transformation)
 offset. Returns the transformed entity
 
EcBoolean interpolation (const EcGeneralMotion &generalMotion1, const EcGeneralMotion &generalMotion2, const EcReal &factor)
 interpolation
 
void registerComponents () EC_OVERRIDE
 register components with the parent
 
const EcVectorlinear () const
 get linear component
 
void setLinear (const EcVector &value)
 set linear component
 
void setLinearX (EcReal value)
 set the x linear value
 
void setLinearY (EcReal value)
 set the y linear value
 
void setLinearZ (EcReal value)
 set the z linear value
 
const EcVectorangular () const
 get angular component
 
void setAngular (const EcVector &value)
 set angular component
 
void setAngularX (EcReal value)
 set the x angular value
 
void setAngularY (EcReal value)
 set the y angular value
 
void setAngularZ (EcReal value)
 set the z angular value
 
void addLinear (const EcVector &value)
 add to the linear component
 
void addAngular (const EcVector &value)
 add to the angular component
 
EcBoolean setScalarValue (EcSizeT index, EcReal value)
 Set a value by index (0 - 5) More...
 
EcReal operator[] (EcSizeT index) const
 Returns a value by index (0 - 5) - const version. More...
 
EcBoolean approxEq (const EcGeneralMotion &xform2, EcReal tol) const
 test for approximate equality
 
void copyToArray (EcReArray &array) const
 copy into a 6x1 array
 
void copyFromArray (const EcReArray &array)
 copy from a 6x1 array
 
virtual const EcTokentoken () const EC_OVERRIDE
 a (mostly string) token for this class
 
EcBoolean read (EcXmlReader &stream) EC_OVERRIDE
 read this object from an XML stream
 
EcBoolean write (EcXmlWriter &stream) const EC_OVERRIDE
 write this object to an XML stream
 
EcBoolean readBin (std::istream &stream)
 read this object from a binary stream
 
EcBoolean writeBin (std::ostream &stream) const
 write this object to a binary stream
 
- 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 const EcGeneralMotionnullObject ()
 get an zero motion (returns const reference to a global static, do not use this method to initialize global objects)
 

Protected Attributes

EcXmlVector m_Linear
 3D linear component
 
EcXmlVector m_Angular
 3D angular component
 
- 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 EcGeneralMotion m_theZeroGeneralMotion
 a zero value to return by reference
 
- 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 a 3D linear and angular motion pair. This class can be used to represent velocity or acceleration.

Definition at line 26 of file ecGeneralMotion.h.

Member Function Documentation

EcReal EcGeneralMotion::operator[] ( EcSizeT  index) const

Returns a value by index (0 - 5) - const version.

The linear components are in 0-2 and the angular are in 3-5.

Returns
The value at index. 0 if the index is outside 0 - 5.
EcBoolean EcGeneralMotion::setScalarValue ( EcSizeT  index,
EcReal  value 
)

Set a value by index (0 - 5)

The linear components are in 0-2 and the angular are in 3-5.

Returns
True if the index is in 0 - 5.

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.