oaTransform Class Reference


Public Methods

 oaTransform ()
 oaTransform (const oaPoint &offsetIn, oaOrient orientIn=oacR0)
 oaTransform (oaOffset xOffsetIn, oaOffset yOffsetIn, oaOrient orientIn=oacR0)
 oaTransform (oaOrient orientIn)
 oaTransform (const oaTransform &xform1, const oaTransform &xform2)
oaPointoffset ()
oaOffsetxOffset ()
oaOffsetyOffset ()
oaOrientorient ()
const oaPointoffset () const
oaOffset xOffset () const
oaOffset yOffset () const
oaOrient orient () const
void set (const oaPoint &offsetIn, oaOrient orientIn=oacR0)
void set (oaOffset xOffsetIn, oaOffset yOffsetIn, oaOrient orientIn=oacR0)
void set (oaOrient orientIn)
void set (const oaTransform &xform1, const oaTransform &xform2)
void init ()
void invert (oaTransform &result) const
void invert ()
void concat (const oaTransform &xform, oaTransform &result) const
void concat (const oaTransform &xform)
oaBoolean isIdentity () const
oaBoolean operator== (const oaTransform &xform) const
oaBoolean operator!= (const oaTransform &xform) const

Detailed Description

The oaTransform class implements a 2-D transformation including orientation and translation. This class consists of an orientation (angle and mirroring information) and an offset in the X and Y directions. This information and the functions for modifying the transform are encapsulated in this class.

Note: when a transform is applied that contains both an orientation change and a translation, the orientation change is applied first.

OpenAccess can use oaTransform to transform various geometric objects, including figures (oaFig::move), boxes (oaBox::transform), and point arrays (oaPointArray::transform). For more information, see Using Transforms in the Programmer's Guide.


Constructor & Destructor Documentation

oaTransform::oaTransform   [inline]
 

This function constructs an oaTransform class without initializing any data members.

oaTransform oaTransform::oaTransform const oaPoint &    offsetIn,
oaOrient    orientIn = oacR0
[inline]
 

This function constructs an oaTransform class and initializes the transform with the offset specified by offsetIn. The orientIn argument is optional. The appropriate default is applied if it is not specified.

oaTransform::oaTransform oaOffset    xOffsetIn,
oaOffset    yOffsetIn,
oaOrient    orientIn = oacR0
[inline]
 

This function constructs an oaTransform class and initializes the transform with the offset using the given delta X offset specified by xOffsetIn and delta Y offset specified by yOffsetIn. The orientIn argument is optional. The appropriate default is applied if it is not specified.

oaTransform oaTransform::oaTransform oaOrient    orientIn [inline]
 

This function constructs an oaTransform class and initializes the transform with the given orientation orientIn. The transform offset is set by default to (0,0).

oaTransform::oaTransform const oaTransform &    xform1,
const oaTransform &    xform2
[inline]
 

This function constructs an oaTransform class and initializes the transform by concatenating the two given transforms.

Parameters:
xform1 The first transform
xform2 The second transform


Member Function Documentation

oaTransform void oaTransform::concat const oaTransform &    xform
 

This function concatenates this transform with the specified transform. This transform becomes the concatenated transform.

Parameters:
xform The transform to concatenate to this transform

oaTransform void oaTransform::concat const oaTransform &    xform,
oaTransform &    result
const
 

This function concatenates this transform with the specified transform and stores the result in result. The current transform is not changed.

Parameters:
xform The transform to concatenate to this transform
result The resulting transform

void oaTransform::init   [inline]
 

This function initializes this transform to represent the identity transform, with offset equal to (0, 0) and orientation equal to oacR0.

void oaTransform::invert   [inline]
 

This function inverts this transform.

Note: The inverse transform is the transform that will undo the effect of the original transform.

oaTransform void oaTransform::invert oaTransform &    result const
 

This function inverts this transform and stores the result in result.

Note: The inverse transform is the transform that will undo the effect of the original transform.

oaBoolean oaTransform::isIdentity   const [inline]
 

This function returns true if this transform is the identity transform.

const oaPoint & oaTransform::offset   const [inline]
 

This function is the const version of offset(). You can get the value currently set in the offset but cannot modify the contents.

oaPoint & oaTransform::offset   [inline]
 

This function returns a reference to the offset of the transform. The offset represents the delta X and delta Y of the transform.

oaBoolean oaTransform::operator!= const oaTransform &    xform const [inline]
 

This function checks to see if this transform is not the same as the specified transform. If the two transforms are not the same, this function returns true. Otherwise, this function returns false.

oaBoolean oaTransform::operator== const oaTransform &    xform const [inline]
 

This function checks if this transform is the same as the specified transform. If the two transforms are the same, this function returns true. Otherwise, this function returns false.

const oaOrient oaTransform::orient   const [inline]
 

This function is the const version of orient(). You can get the value currently set in the orientation, but cannot modify the contents.

Returns:
The orientation of the transform

oaOrient & oaTransform::orient   [inline]
 

This function returns a reference to the orientation of the transform.

void oaTransform::set const oaTransform &    xform1,
const oaTransform &    xform2
[inline]
 

This function sets the offset and orientation of this transform object to be the same as the concatenation of the two given transforms. The resulting orientation equals the concatenation of the orientations of the two given transforms; the resulting offset equals the offset of the first given transform transformed by the second given transform.

Parameters:
xform1 the first transform to concatenate
xform2 the second transform to concatenate

void oaTransform::set oaOrient    orientIn [inline]
 

This function sets the orientation of this transform object to the given value.

Parameters:
orientIn the orientation that this transform is set to

void oaTransform::set oaOffset    xOffsetIn,
oaOffset    yOffsetIn,
oaOrient    orientIn = oacR0
[inline]
 

This function sets the offsets and orientation of this transform object according to the given values.

Parameters:
xOffsetIn the x-offset value that this transform is set to
yOffsetIn the y-offset value that this transform is set to
orientIn the orientation that this transform is set to.

void oaTransform::set const oaPoint &    offsetIn,
oaOrient    orientIn = oacR0
[inline]
 

This function sets the offset and orientation of this transform object according to the given values.

Parameters:
offsetIn the offset that this transform is set to
orientIn the orientation that this transform is set to

oaInt4 oaTransform::xOffset   const [inline]
 

This function is the const version of xOffset(). This function gets the value currently set in the delta X portion of the offset, but cannot modify the contents.

Returns:
The delta X portion of the offset of this transform

oaInt4 & oaTransform::xOffset   [inline]
 

This function returns a reference to the delta X portion of the offset.

oaInt4 oaTransform::yOffset   const [inline]
 

This function is the const version of yOffset(). This function gets the value currently set in the delta Y portion of the offset, but cannot modify the contents.

Returns:
The delta Y portion of the offset of this transform

oaInt4 & oaTransform::yOffset   [inline]
 

This function returns a reference to the delta Y portion of the offset.


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

Return to top of page