#include <mi32/trans2dc.h>
Public Types | |
| enum | AXIS { AXIS_X = 0, AXIS_Y = 1 } |
Public Member Functions | |
| void | ApplyOffset (const DPOINT2D &offset) |
| void | ApplyOffset (double xoffset, double yoffset) |
| void | ApplyOffsetReverse (const DPOINT2D &offset) |
| void | ApplyOffsetReverse (double xoffset, double yoffset) |
| void | ApplyRotation (double angle) |
| void | ApplyScale (const DPOINT2D &scale) |
| void | ApplyScale (double xscale, double yscale) |
| void | ApplyScale (double scale) |
| void | ApplyScaleReverse (const DPOINT2D &scale) |
| void | ApplyScaleReverse (double xscale, double yscale) |
| void | ApplyShear (double angle, AXIS axis) |
| void | Combine (const TRANS2D_AFFINE &trans1, const TRANS2D_AFFINE &trans2) |
| void | Combine (const TRANS2D_AFFINE &trans1) |
| void | ConvertForward (const DRECT2D &irect, DRECT2D &orect) const |
| DRECT2D | ConvertForward (const DRECT2D &irect) const |
| void | ConvertForward (const DPOINT3D *ipoints, DPOINT3D *opoints, INT32 NumPoints) const |
| void | ConvertForward (const DPOINT2D *ipoints, DPOINT2D *opoints, INT32 NumPoints) const |
| DPOINT3D | ConvertForward (const DPOINT3D &ipoint) const |
| DPOINT2D | ConvertForward (const DPOINT2D &ipoint) const |
| void | ConvertForward (double x, double y, double &ox, double &oy) const |
| DPOINT2D | ConvertForward (double x, double y) const |
| void | ConvertInverse (const DRECT2D &irect, DRECT2D &orect) const |
| DRECT2D | ConvertInverse (const DRECT2D &irect) const |
| void | ConvertInverse (const DPOINT3D *ipoints, DPOINT3D *opoints, INT32 NumPoints) const |
| void | ConvertInverse (const DPOINT2D *ipoints, DPOINT2D *opoints, INT32 NumPoints) const |
| DPOINT3D | ConvertInverse (const DPOINT3D &ipoint) const |
| DPOINT2D | ConvertInverse (const DPOINT2D &ipoint) const |
| DPOINT2D | ConvertInverse (double x, double y) const |
| void | DisectForward (double *xscale, double *yscale, double *rotangle=0, double *shearangle=0) const |
| void | DisectInverse (double *xscale, double *yscale, double *rotangle=0, double *shearangle=0) const |
| void | GetMatrices (MAT3X3 fwd, MAT3X3 inv) const |
| void | GetValuesForward (double &xscale, double &xrot, double &xpos, double &yscale, double &yrot, double &ypos) const |
| bool | IsEqual (const TRANS2D_AFFINE &rhs) const |
| bool | IsEquivalentTo (const TRANS2D_AFFINE &rhs) const |
| bool | IsIdentity () const |
| TRANS2D_AFFINE & | operator= (const TRANS2D_AFFINE &rhs) |
| void | ReverseDirection () |
| ERRVALUE | SetCtrlPoint (const CTRLPOINT3 *cp, int numpoints, bool invert=false) |
| ERRVALUE | SetCtrlPoint (const CTRLPOINT *cp, int numpoints, bool invert=false) |
| void | SetIdentity () |
| void | SetMatrices (const MAT3X3 fwd, const MAT3X3 inv) |
| TRANS2D_AFFINE (const CTRLPOINT3 *cp, int numpoints, bool invert=false) | |
| TRANS2D_AFFINE (const CTRLPOINT *cp, int numpoints, bool invert=false) | |
| TRANS2D_AFFINE (const TRANS2D_AFFINE &trans1, const TRANS2D_AFFINE &trans2) | |
| TRANS2D_AFFINE (const MAT3X3 fwd, const MAT3X3 inv) | |
| TRANS2D_AFFINE (const MAT3X3 matrix, bool IsForward=true) | |
| TRANS2D_AFFINE (const TRANS2D_AFFINE &rhs) | |
| TRANS2D_AFFINE () | |
| ~TRANS2D_AFFINE () | |
All conversion methods are inline for maximum speed. For single point conversion, no function call will occur (assuming the compiler actually inlines the method). This class replaces the trans2d...() C functions.
Definition at line 232 of file trans2dc.h.
| enum TRANS2D_AFFINE::AXIS |
| TRANS2D_AFFINE::TRANS2D_AFFINE | ( | ) | [inline] |
| TRANS2D_AFFINE::TRANS2D_AFFINE | ( | const TRANS2D_AFFINE & | rhs | ) | [inline] |
| TRANS2D_AFFINE::TRANS2D_AFFINE | ( | const MAT3X3 | matrix, | |
| bool | IsForward = true | |||
| ) | [inline] |
Construct from forward or inverse matrix.
| matrix | Transformation matrix |
| IsForward | True if forward transformation, false if inverse |
Definition at line 254 of file trans2dc.h.
Construct from affine matrices.
| fwd | Forward transformation matrix |
| inv | Inverse transformation matrix |
Definition at line 269 of file trans2dc.h.
| TRANS2D_AFFINE::TRANS2D_AFFINE | ( | const TRANS2D_AFFINE & | trans1, | |
| const TRANS2D_AFFINE & | trans2 | |||
| ) | [inline] |
Construct from combination of two affine transformations.
| trans1 | First transformation |
| trans2 | Second transformation |
Definition at line 278 of file trans2dc.h.
| TRANS2D_AFFINE::TRANS2D_AFFINE | ( | const CTRLPOINT * | cp, | |
| int | numpoints, | |||
| bool | invert = false | |||
| ) | [inline] |
Construct from CTRLPOINT array.
| cp | Control point array |
| numpoints | Number of control points |
| invert | Invert coordinate system (for images) |
Definition at line 284 of file trans2dc.h.
| TRANS2D_AFFINE::TRANS2D_AFFINE | ( | const CTRLPOINT3 * | cp, | |
| int | numpoints, | |||
| bool | invert = false | |||
| ) | [inline] |
Construct from CTRLPOINT3 array.
| cp | Control point array |
| numpoints | Number of control points |
| invert | Invert coordinate system (for images) |
Definition at line 291 of file trans2dc.h.
| TRANS2D_AFFINE::~TRANS2D_AFFINE | ( | ) | [inline] |
| void TRANS2D_AFFINE::ApplyOffset | ( | const DPOINT2D & | offset | ) | [inline] |
| void TRANS2D_AFFINE::ApplyOffset | ( | double | xoffset, | |
| double | yoffset | |||
| ) | [inline] |
Apply coordinate offset.
| xoffset | X offset |
| yoffset | Y offset |
Definition at line 313 of file trans2dc.h.
| void TRANS2D_AFFINE::ApplyOffsetReverse | ( | const DPOINT2D & | offset | ) | [inline] |
Apply coordinate offset relative to reverse direction.
| offset | Offset |
Definition at line 330 of file trans2dc.h.
| void TRANS2D_AFFINE::ApplyOffsetReverse | ( | double | xoffset, | |
| double | yoffset | |||
| ) | [inline] |
Apply coordinate offset relative to reverse direction.
| xoffset | X offset |
| yoffset | Y offset |
Definition at line 324 of file trans2dc.h.
| void TRANS2D_AFFINE::ApplyRotation | ( | double | angle | ) | [inline] |
Apply rotation angle.
| angle | Rotation angle in radians |
Definition at line 335 of file trans2dc.h.
| void TRANS2D_AFFINE::ApplyScale | ( | const DPOINT2D & | scale | ) | [inline] |
| void TRANS2D_AFFINE::ApplyScale | ( | double | xscale, | |
| double | yscale | |||
| ) | [inline] |
Apply scale to X/Y axes.
| xscale | X scale |
| yscale | Y scale |
Definition at line 345 of file trans2dc.h.
| void TRANS2D_AFFINE::ApplyScale | ( | double | scale | ) | [inline] |
| void TRANS2D_AFFINE::ApplyScaleReverse | ( | const DPOINT2D & | scale | ) | [inline] |
Apply scale to X/Y axes, relative to reverse direction.
| scale | X/Y scale |
Definition at line 362 of file trans2dc.h.
| void TRANS2D_AFFINE::ApplyScaleReverse | ( | double | xscale, | |
| double | yscale | |||
| ) | [inline] |
Apply scale to X/Y axes, relative to reverse direction.
| xscale | X scale |
| yscale | Y scale |
Definition at line 356 of file trans2dc.h.
| void TRANS2D_AFFINE::ApplyShear | ( | double | angle, | |
| AXIS | axis | |||
| ) | [inline] |
Apply shear relative to specified axis.
| angle | Shear angle in radians |
| axis | Axis to shear (AXIS_X or AXIS_Y) |
Definition at line 367 of file trans2dc.h.
| void TRANS2D_AFFINE::Combine | ( | const TRANS2D_AFFINE & | trans1, | |
| const TRANS2D_AFFINE & | trans2 | |||
| ) | [inline] |
Combine two affine transformations.
| trans1 | First transformation |
| trans2 | Second transformation |
Definition at line 381 of file trans2dc.h.
| void TRANS2D_AFFINE::Combine | ( | const TRANS2D_AFFINE & | trans1 | ) | [inline] |
Combine two affine transformations.
| trans1 | First transformation |
Definition at line 373 of file trans2dc.h.
Perform forward transformation on DRECT2D.
| irect | Input rectangle |
| orect | Output rectangle |
Definition at line 438 of file trans2dc.h.
Perform forward transformation on DRECT2D.
| irect | Input rectangle |
Definition at line 429 of file trans2dc.h.
| void TRANS2D_AFFINE::ConvertForward | ( | const DPOINT3D * | ipoints, | |
| DPOINT3D * | opoints, | |||
| INT32 | NumPoints | |||
| ) | const |
Perform forward transformation on DPOINT3D array.
| ipoints | Input point array |
| opoints | Output point array |
| NumPoints | Number of points to convert |
| void TRANS2D_AFFINE::ConvertForward | ( | const DPOINT2D * | ipoints, | |
| DPOINT2D * | opoints, | |||
| INT32 | NumPoints | |||
| ) | const |
Perform forward transformation on DPOINT2D array.
| ipoints | Input point array |
| opoints | Output point array |
| NumPoints | Number of points to convert |
Perform forward transformation on DPOINT3D.
| ipoint | Input point |
Definition at line 409 of file trans2dc.h.
Perform forward transformation on DPOINT2D.
| ipoint | Input point |
Definition at line 403 of file trans2dc.h.
| void TRANS2D_AFFINE::ConvertForward | ( | double | x, | |
| double | y, | |||
| double & | ox, | |||
| double & | oy | |||
| ) | const [inline] |
Perform forward transformation on X/Y point.
| x | X coordinate |
| y | Y coordinate |
| ox | X coordinate |
| oy | Y coordinate |
Definition at line 394 of file trans2dc.h.
| DPOINT2D TRANS2D_AFFINE::ConvertForward | ( | double | x, | |
| double | y | |||
| ) | const [inline] |
Perform forward transformation on X/Y point.
| x | X coordinate |
| y | Y coordinate |
Definition at line 388 of file trans2dc.h.
Perform inverse transformation on DRECT2D.
| irect | Input rectangle |
| orect | Output rectangle |
Definition at line 487 of file trans2dc.h.
Perform inverse transformation on DRECT2D.
| irect | Input rectangle |
Definition at line 478 of file trans2dc.h.
| void TRANS2D_AFFINE::ConvertInverse | ( | const DPOINT3D * | ipoints, | |
| DPOINT3D * | opoints, | |||
| INT32 | NumPoints | |||
| ) | const |
Perform inverse transformation on DPOINT3D array.
| ipoints | Input point array |
| opoints | Output point array |
| NumPoints | Number of points to convert |
| void TRANS2D_AFFINE::ConvertInverse | ( | const DPOINT2D * | ipoints, | |
| DPOINT2D * | opoints, | |||
| INT32 | NumPoints | |||
| ) | const |
Perform inverse transformation on DPOINT2D array.
| ipoints | Input point array |
| opoints | Output point array |
| NumPoints | Number of points to convert |
Perform inverse transformation on DPOINT3D.
| ipoint | Input point |
Definition at line 458 of file trans2dc.h.
Perform inverse transformation on DPOINT2D.
| ipoint | Input point |
Definition at line 452 of file trans2dc.h.
| DPOINT2D TRANS2D_AFFINE::ConvertInverse | ( | double | x, | |
| double | y | |||
| ) | const [inline] |
Perform inverse transformation on X/Y point.
| x | X coordinate |
| y | Y coordinate |
Definition at line 445 of file trans2dc.h.
| void TRANS2D_AFFINE::DisectForward | ( | double * | xscale, | |
| double * | yscale, | |||
| double * | rotangle = 0, |
|||
| double * | shearangle = 0 | |||
| ) | const [inline] |
Determine scale/rotation/shear for forward transformation.
| xscale | X scale returned (0 if don't need) |
| yscale | Y scale returned (0 if don't need) |
| rotangle | Rotation angle in radians returned (0 if don't need) |
| shearangle | Shear angle in radians returned (0 if don't need) |
Definition at line 493 of file trans2dc.h.
| void TRANS2D_AFFINE::DisectInverse | ( | double * | xscale, | |
| double * | yscale, | |||
| double * | rotangle = 0, |
|||
| double * | shearangle = 0 | |||
| ) | const [inline] |
Determine scale/rotation/shear for inverse transformation.
| xscale | X scale returned (0 if don't need) |
| yscale | Y scale returned (0 if don't need) |
| rotangle | Rotation angle in radians returned (0 if don't need) |
| shearangle | Shear angle in radians returned (0 if don't need) |
Definition at line 501 of file trans2dc.h.
Retrieve copy of affine matrices.
| fwd | Forward matrix returned |
| inv | Inverse matrix returned |
Definition at line 509 of file trans2dc.h.
| void TRANS2D_AFFINE::GetValuesForward | ( | double & | xscale, | |
| double & | xrot, | |||
| double & | xpos, | |||
| double & | yscale, | |||
| double & | yrot, | |||
| double & | ypos | |||
| ) | const [inline] |
Get values for forward transformation.
| xscale | X scale value returned |
| xrot | X rotation value returned |
| xpos | X position value returned |
| yscale | Y scale value returned |
| yrot | Y rotation value returned |
| ypos | Y position value returned |
Definition at line 515 of file trans2dc.h.
| bool TRANS2D_AFFINE::IsEqual | ( | const TRANS2D_AFFINE & | rhs | ) | const [inline] |
Definition at line 527 of file trans2dc.h.
| bool TRANS2D_AFFINE::IsEquivalentTo | ( | const TRANS2D_AFFINE & | rhs | ) | const [inline] |
Determine if the two transformation's are equivalent.
Definition at line 535 of file trans2dc.h.
| bool TRANS2D_AFFINE::IsIdentity | ( | void | ) | const [inline] |
Determine if the transformation is an identity.
Definition at line 548 of file trans2dc.h.
| TRANS2D_AFFINE& TRANS2D_AFFINE::operator= | ( | const TRANS2D_AFFINE & | rhs | ) | [inline] |
| void TRANS2D_AFFINE::ReverseDirection | ( | ) | [inline] |
| ERRVALUE TRANS2D_AFFINE::SetCtrlPoint | ( | const CTRLPOINT3 * | cp, | |
| int | numpoints, | |||
| bool | invert = false | |||
| ) | [inline] |
Set transformation from CTRLPOINT3 array.
| cp | Control point array |
| numpoints | Number of control points |
| invert | Invert coordinate system (for images) |
Definition at line 570 of file trans2dc.h.
| ERRVALUE TRANS2D_AFFINE::SetCtrlPoint | ( | const CTRLPOINT * | cp, | |
| int | numpoints, | |||
| bool | invert = false | |||
| ) | [inline] |
Set transformation from CTRLPOINT array.
| cp | Control point array |
| numpoints | Number of control points |
| invert | Invert coordinate system (for images) |
Definition at line 563 of file trans2dc.h.
| void TRANS2D_AFFINE::SetIdentity | ( | ) | [inline] |
Set transformation from affine matrices.
| fwd | Forward transformation |
| inv | Inverse transformation |
Definition at line 581 of file trans2dc.h.
1.5.2