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

A rotation and a translation to describe a new frame. More...

#include <ecCoordSysXForm.h>

Inheritance diagram for EcCoordinateSystemTransformation:
EcXmlCompoundType EcXmlObject

Public Types

enum  {
  ARBITRARY,
  NO_TRANSLATION,
  NO_ROTATION,
  NO_CHANGE
}
 descriptor of the type of transformation
 
- Public Types inherited from EcXmlCompoundType
enum  {
  READONLYCOMPONENT = 0,
  READONLYATTRIBUTE
}
 special-descriptor codes More...
 

Public Member Functions

 EcCoordinateSystemTransformation ()
 default constructor
 
 EcCoordinateSystemTransformation (const EcVector &trans, const EcOrientation &orient)
 constructor with a translation and orientation
 
 EcCoordinateSystemTransformation (const EcVector &trans)
 constructor with a translation (implicit conversion used in code base)
 
 EcCoordinateSystemTransformation (const EcOrientation &orient)
 constructor with an orientation (implicit conversion used in code base)
 
EcBoolean operator== (const EcCoordinateSystemTransformation &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
 
void registerComponents () EC_OVERRIDE
 register components with the parent
 
EcBoolean equality (const EcXmlObject *other) const EC_OVERRIDE
 equality - equality to an EcXmlObject pointer
 
EcXmlObjectnewObject () const EC_OVERRIDE
 new that returns an EcXmlObject
 
EcU32 mode () const
 get mode
 
const EcVectortranslation () const
 get translation
 
void setTranslation (const EcVector &value)
 
void setTranslationX (EcReal xValue)
 set the translation x-value
 
void setTranslationY (EcReal yValue)
 set the translation y-value
 
void setTranslationZ (EcReal zValue)
 set the translation z-value
 
const EcOrientationorientation () const
 get orientation
 
void setOrientation (const EcOrientation &value)
 set orientation
 
void outboardTransformBy (const EcVector &translation, const EcOrientation &orientation)
 outboard transform by a translation and rotation
 
void outboardTransformBy (const EcVector &translation)
 outboard transform by a translation only
 
EcReArray make4x4 () const
 get a 4x4 transformation matrix
 
void assign16 (EcF64 *vec16) const
 assign a 16 element double pointer
 
void assign4x4 (EcReArray &array) const
 assign a 4x4 transformation matrix
 
void setBy16 (const EcF64 *vec)
 set by a 16 element double pointer
 
void setToIdentity ()
 set to no rotation and no translation
 
EcCoordinateSystemTransformationoperator*= (const EcCoordinateSystemTransformation &xform2)
 conversion to a composite
 
EcCoordinateSystemTransformation operator* (const EcCoordinateSystemTransformation &xform2) const
 transformation composition
 
EcVector operator* (const EcVector &vec) const
 vector transformation
 
void transform (EcVector &vec) const
 vector transformation in place
 
void transform (const EcVector &from, EcVector &to) const
 
void transform (const EcVector &firstFrom, EcVector &firstTo, const EcVector &secondFrom, EcVector &secondTo) const
 
EcBoolean approxEq (const EcCoordinateSystemTransformation &xform2, EcReal tol) const
 test for approximate equality of transformations.
 
EcCoordinateSystemTransformation inverse () const
 get the inverse of the transformation
 
EcCoordinateSystemTransformationinvert ()
 invert this transformation in place
 
void integrateLocalFrameVelocity (const EcGeneralMotion &locallyReferencedVelocity, EcReal time)
 
void integrateReferenceFrameVelocity (const EcGeneralMotion &systemReferencedVelocity, EcReal time)
 
void setFromVector (const EcRealVector &vector)
 set this EcCoordinateSystemTransformation object from a vector of reals More...
 
void setToVector (EcRealVector &vector) const
 set a vector of reals from this EcCoordinateSystemTransformation object More...
 
const EcTokentoken () const EC_OVERRIDE
 an (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
 
EcBoolean interpolation (const EcCoordinateSystemTransformation &coordSysxForm1, const EcCoordinateSystemTransformation &coordSysXForm2, const EcReal &factor)
 interpolation between two xforms
 
- 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 EcCoordinateSystemTransformation nullObject ()
 get an identity transformation as a null object
 
static const EcCoordinateSystemTransformationidentity ()
 get a static const reference
 
static EcCoordinateSystemTransformation transformBetween (const EcVector &v1, const EcVector &v2, const EcVector &translation)
 compute and return the transformation between two vectors (from v1 to v2). This is not unique since the rotations around the vector are not considered. v1 and v2 must not be zero.
 
static EcCoordinateSystemTransformation average (const std::vector< EcCoordinateSystemTransformation > &coords)
 compute and return the average of transformations with small perturbation
 

Protected Member Functions

void setMode (EcU32 value)
 set mode - use with care
 
- 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 ()
 

Protected Attributes

EcXmlVector m_Translation
 the offset of the transformation in the nonrotated frame
 
EcXmlOrientation m_Orientation
 the rotation of the transformation
 
EcU32 m_Mode
 the mode of the transformation
 
- 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 EcCoordinateSystemTransformation m_theIdentity
 an identity 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
 

Friends

class Ec::test::EcCoordinateSystemTransformationTester
 

Detailed Description

Member Function Documentation

void EcCoordinateSystemTransformation::integrateLocalFrameVelocity ( const EcGeneralMotion locallyReferencedVelocity,
EcReal  time 
)

integrates general velocity (linear and angular). The velocity is expressed in the moving coordinate system, with point of application at the origin of the moving coordinate system.

void EcCoordinateSystemTransformation::integrateReferenceFrameVelocity ( const EcGeneralMotion systemReferencedVelocity,
EcReal  time 
)

integrates general velocity (linear and angular). The velocity is expressed in the system (nonmoving) coordinate system, with point of application at the origin of the moving coordinate system.

void EcCoordinateSystemTransformation::setFromVector ( const EcRealVector vector)

set this EcCoordinateSystemTransformation object from a vector of reals

Parameters
[in]vectorThe vector of reals. Must have at least 7 elements. The first three will be used to set the translation and the last four for orientation. If it has fewer than 7 elements, this method does nothing. If it has more than 7 elements, the extra elements are ignored.
void EcCoordinateSystemTransformation::setToVector ( EcRealVector vector) const

set a vector of reals from this EcCoordinateSystemTransformation object

Parameters
[out]vectorThe vector of reals. Upon return, it will have 7 elements. The first three will be used to set the translation and the last four for orientation.
void EcCoordinateSystemTransformation::setTranslation ( const EcVector value)
void EcCoordinateSystemTransformation::transform ( const EcVector from,
EcVector to 
) const

transforms a vector and puts the result in the second argument The same vector may be used for to and from.

void EcCoordinateSystemTransformation::transform ( const EcVector firstFrom,
EcVector firstTo,
const EcVector secondFrom,
EcVector secondTo 
) const

transforms two vectors - more efficient than transforming individually The same vector may be used for to and from.


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.