Public Member Functions | Protected Attributes | List of all members
i2d::CAffineTransformation2d Class Reference

Definition of an affine transformation for 2D-spaces. More...

#include <CAffineTransformation2d.h>

Inheritance diagram for i2d::CAffineTransformation2d:
i2d::ITransformation2d imath::TISurjectFunction< CVector2d, CVector2d > iser::ISerializable imath::TIMathFunction< CVector2d, CVector2d > istd::IChangeable istd::IPolymorphic istd::IPolymorphic

Public Member Functions

 CAffineTransformation2d ()
 
 CAffineTransformation2d (const i2d::CAffine2d &transformation)
 
const i2d::CAffine2dGetTransformation () const
 Get used transformation object. More...
 
i2d::CAffine2dGetTransformationRef ()
 Get reference to internal transformation object. More...
 
void SetTransformation (const i2d::CAffine2d &transformation)
 Set the transformation object. More...
 
void Reset ()
 Set to identity transformation. More...
 
void Reset (const CVector2d &translation)
 Set this transformation to translation. More...
 
void Reset (const CVector2d &translation, double angle, double scale=1.0)
 Set this transformation to translation, rotation and scaling. More...
 
void Reset (const CVector2d &translation, double angle, const CVector2d &scale)
 Set this transformation to translation, rotation and both axis scaling. More...
 
virtual int GetTransformationFlags () const
 Get flags of describing type of this transformation. More...
 
virtual bool GetDistance (const CVector2d &origPos1, const CVector2d &origPos2, double &result, ExactnessMode mode=EM_NONE) const
 Compute a shortness distance in transformed coordinations. More...
 
virtual bool GetPositionAt (const CVector2d &origPosition, CVector2d &result, ExactnessMode mode=EM_NONE) const
 Get position after transformation. More...
 
virtual bool GetInvPositionAt (const CVector2d &transfPosition, CVector2d &result, ExactnessMode mode=EM_NONE) const
 Get position after transformation. More...
 
virtual bool GetLocalTransform (const CVector2d &origPosition, CAffine2d &result, ExactnessMode mode=EM_NONE) const
 Get local transformation (from original to transformed coordinate system) at some original position. More...
 
virtual bool GetLocalInvTransform (const CVector2d &transfPosition, CAffine2d &result, ExactnessMode mode=EM_NONE) const
 Get local transformation (from transformed to original coordinate system) at some transformed position. More...
 
virtual bool GetInvValueAt (const CVector2d &argument, CVector2d &result) const
 
virtual CVector2d GetInvValueAt (const CVector2d &argument) const
 
virtual bool GetValueAt (const CVector2d &argument, CVector2d &result) const
 
virtual CVector2d GetValueAt (const CVector2d &argument) const
 
virtual bool Serialize (iser::IArchive &archive)
 Load or store state of this object as a archive stream. More...
 
virtual bool CopyFrom (const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one. More...
 
virtual istd::IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object. More...
 
- Public Member Functions inherited from imath::TISurjectFunction< CVector2d, CVector2d >
virtual bool GetInvValueAt (const CVector2d &argument, CVector2d &result) const =0
 Get inverted function value. More...
 
virtual CVector2d GetInvValueAt (const CVector2d &argument) const =0
 Get inverted function value. More...
 
- Public Member Functions inherited from imath::TIMathFunction< CVector2d, CVector2d >
virtual bool GetValueAt (const CVector2d &argument, CVector2d &result) const =0
 Get function value for specified argument value. More...
 
virtual CVector2d GetValueAt (const CVector2d &argument) const =0
 Get function value for specified argument value. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 
- Public Member Functions inherited from iser::ISerializable
virtual quint32 GetMinimalVersion (int versionId) const
 Get minimal needed version to correct storing of this data. More...
 
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations. More...
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object. More...
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state. More...
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction. More...
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction. More...
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes. More...
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes. More...
 

Protected Attributes

CAffine2d m_transformation
 

Additional Inherited Members

- Public Types inherited from i2d::ITransformation2d
enum  ExactnessMode { EM_NONE, EM_EXACT, EM_VISUAL, EM_ANY }
 
enum  TransformationFlags {
  TF_FORWARD = 1 << 0, TF_INVERTED = 1 << 1, TF_INJECTIVE = 1 << 2, TF_SURJECTIVE = 1 << 3,
  TF_PRESERVE_NULL = 1 << 4, TF_PRESERVE_DISTANCE = 1 << 5, TF_PRESERVE_ANGLE = 1 << 6, TF_AFFINE = 1 << 7,
  TF_CONTINUES = 1 << 8
}
 Flags indication type of this transformation and supported operations. More...
 
- Public Types inherited from imath::TIMathFunction< CVector2d, CVector2d >
typedef CVector2d ArgumentType
 
typedef CVector2d ResultType
 
- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ACF_INTERNAL = 0, CF_ALL_DATA, CF_ANY, CF_DESTROYING,
  CF_DELEGATED, CF_NO_UNDO
}
 Data model change notification flags. More...
 
enum  SupportedOperations {
  SO_NONE = 0, SO_OBSERVE = 1 << 0, SO_COPY = 1 << 1, SO_CLONE = 1 << 2,
  SO_COMPARE = 1 << 3, SO_RESET = 1 << 4
}
 Flags for supported operations. More...
 
enum  CompatibilityMode { CM_STRICT, CM_WITHOUT_REFS, CM_WITH_REFS, CM_CONVERT }
 Control how relationship betweeen objects are interpreted. More...
 
- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes. More...
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set. More...
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set. More...
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set. More...
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event. More...
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event. More...
 

Detailed Description

Definition of an affine transformation for 2D-spaces.

Definition at line 17 of file CAffineTransformation2d.h.

Constructor & Destructor Documentation

i2d::CAffineTransformation2d::CAffineTransformation2d ( )
i2d::CAffineTransformation2d::CAffineTransformation2d ( const i2d::CAffine2d transformation)
explicit

Member Function Documentation

virtual istd::IChangeable* i2d::CAffineTransformation2d::CloneMe ( CompatibilityMode  mode = CM_WITHOUT_REFS) const
virtual

Make a copy of this object.

Returns
new instance or NULL, if this operation is not supported.

Reimplemented from istd::IChangeable.

virtual bool i2d::CAffineTransformation2d::CopyFrom ( const istd::IChangeable object,
CompatibilityMode  mode = CM_WITHOUT_REFS 
)
virtual

Copy this object from another one.

Default implementation in istd::IChangeable does nothing.

Reimplemented from istd::IChangeable.

virtual bool i2d::CAffineTransformation2d::GetDistance ( const CVector2d origPos1,
const CVector2d origPos2,
double &  result,
ExactnessMode  mode = EM_NONE 
) const
virtual

Compute a shortness distance in transformed coordinations.

Parameters
origPos1first position in original coordinates.
origPos2second position in original coordinates.
resultobject where result distance between positions in transformed coordinates will be stored.
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

virtual bool i2d::CAffineTransformation2d::GetInvPositionAt ( const CVector2d transfPosition,
CVector2d result,
ExactnessMode  mode = EM_NONE 
) const
virtual

Get position after transformation.

Parameters
transfPositionposition in transformed coordination system.
resultresult position (original coordination system).
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

virtual bool i2d::CAffineTransformation2d::GetInvValueAt ( const CVector2d argument,
CVector2d result 
) const
virtual
virtual CVector2d i2d::CAffineTransformation2d::GetInvValueAt ( const CVector2d argument) const
virtual
virtual bool i2d::CAffineTransformation2d::GetLocalInvTransform ( const CVector2d transfPosition,
CAffine2d result,
ExactnessMode  mode = EM_NONE 
) const
virtual

Get local transformation (from transformed to original coordinate system) at some transformed position.

Parameters
transfPositionposition in transformed coordination system.
resultinverse transformation for specified position.
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

virtual bool i2d::CAffineTransformation2d::GetLocalTransform ( const CVector2d origPosition,
CAffine2d result,
ExactnessMode  mode = EM_NONE 
) const
virtual

Get local transformation (from original to transformed coordinate system) at some original position.

Parameters
origPositionposition in (original coordination system).
resulttransformation for specified position.
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

virtual bool i2d::CAffineTransformation2d::GetPositionAt ( const CVector2d origPosition,
CVector2d result,
ExactnessMode  mode = EM_NONE 
) const
virtual

Get position after transformation.

Parameters
origPositionposition in (original coordination system).
resultresult position (transformed coordination system).
modecontrols needed transformation exactness.
Returns
true, if calculation done correctly.

Implements i2d::ITransformation2d.

const i2d::CAffine2d & i2d::CAffineTransformation2d::GetTransformation ( ) const
inline

Get used transformation object.

Definition at line 106 of file CAffineTransformation2d.h.

References m_transformation.

virtual int i2d::CAffineTransformation2d::GetTransformationFlags ( ) const
virtual

Get flags of describing type of this transformation.

Implements i2d::ITransformation2d.

i2d::CAffine2d & i2d::CAffineTransformation2d::GetTransformationRef ( )
inline

Get reference to internal transformation object.

Please don forgot the update notifying.

Definition at line 112 of file CAffineTransformation2d.h.

References m_transformation.

virtual bool i2d::CAffineTransformation2d::GetValueAt ( const CVector2d argument,
CVector2d result 
) const
virtual
virtual CVector2d i2d::CAffineTransformation2d::GetValueAt ( const CVector2d argument) const
virtual
void i2d::CAffineTransformation2d::Reset ( )

Set to identity transformation.

void i2d::CAffineTransformation2d::Reset ( const CVector2d translation)

Set this transformation to translation.

void i2d::CAffineTransformation2d::Reset ( const CVector2d translation,
double  angle,
double  scale = 1.0 
)

Set this transformation to translation, rotation and scaling.

void i2d::CAffineTransformation2d::Reset ( const CVector2d translation,
double  angle,
const CVector2d scale 
)

Set this transformation to translation, rotation and both axis scaling.

virtual bool i2d::CAffineTransformation2d::Serialize ( iser::IArchive archive)
virtual

Load or store state of this object as a archive stream.

Type of operation is depending on archive type.

See Also
iser::IArchive

Implements iser::ISerializable.

void i2d::CAffineTransformation2d::SetTransformation ( const i2d::CAffine2d transformation)

Set the transformation object.

Member Data Documentation

CAffine2d i2d::CAffineTransformation2d::m_transformation
protected

Definition at line 100 of file CAffineTransformation2d.h.

Referenced by GetTransformation(), and GetTransformationRef().


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy