mi32/transgen.h File Reference

<mi32/transgen.h> Function prototypes and macros for TransGen functions More...

#include <mi32/ctrlpt.h>
#include <mi32/stddefns.h>

Include dependency graph for transgen.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  TRANSPARM

Defines

#define GEOMLIBEXPORT   MI_DLLIMPORT
#define TRANSDIR_Forward   0
#define TRANSDIR_Inverse   1
#define TRANSGENCOORD_Input   0x00000001
#define TRANSGENCOORD_Output   0x00000002
#define TRANSGENCOORD_External   0x00000004
#define TRANSGENCOORD_Map   0x00000008

Typedefs

typedef int(* TRANSFUNC )(void *, void *, int, int, void *)

Functions

GEOMLIBEXPORT int DisectGen2D (const DPOINT2D *point, double size, double *xscale, double *yscale, double *rotangle, double *shearangle, TRANSFUNC transfunc, void *transfuncdata)
GEOMLIBEXPORT int TransGenConvPointFwd (const TRANSPARM *transparm, const DPOINT2D *ipoint, DPOINT2D *opoint)
GEOMLIBEXPORT int TransGenConvPointInv (const TRANSPARM *transparm, const DPOINT2D *ipoint, DPOINT2D *opoint)
GEOMLIBEXPORT int TransGenConvPointInputToMap (const TRANSPARM *transparm, const DPOINT2D *ipoint, DPOINT2D *opoint)
GEOMLIBEXPORT int TransGenConvPointMapToInput (const TRANSPARM *transparm, const DPOINT2D *ipoint, DPOINT2D *opoint)
GEOMLIBEXPORT int TransGenConvPointMapToMapFwd (const TRANSPARM *transparm, const DPOINT2D *ipoint, DPOINT2D *opoint)
GEOMLIBEXPORT int TransGenConvPointMapToMapInv (const TRANSPARM *transparm, const DPOINT2D *ipoint, DPOINT2D *opoint)
GEOMLIBEXPORT int TransGenConvPointMapToOutput (const TRANSPARM *transparm, const DPOINT2D *ipoint, DPOINT2D *opoint)
GEOMLIBEXPORT int TransGenConvPointOutputToMap (const TRANSPARM *transparm, const DPOINT2D *ipoint, DPOINT2D *opoint)
GEOMLIBEXPORT int TransGenConvPointSetFwd (const TRANSPARM *transparm, const double *ipoint, INT32 iNumPoints, int NumDim, double *opoint)
GEOMLIBEXPORT int TransGenConvPointSetInv (const TRANSPARM *transparm, const double *ipoint, INT32 iNumPoints, int NumDim, double *opoint)
GEOMLIBEXPORT int TransGenConvPointsFwd (const TRANSPARM *transparm, const double *ipoint, INT32 iNumPoints, int NumDim, double **opoint, INT32 *)
GEOMLIBEXPORT int TransGenConvPointsInv (const TRANSPARM *transparm, const double *ipoint, INT32 iNumPoints, int NumDim, double **opoint, INT32 *)
GEOMLIBEXPORT int TransGenConvRectFwd (const TRANSPARM *transparm, const DRECT2D *irect, DRECT2D *orect, int sidepoints)
GEOMLIBEXPORT int TransGenConvRectInv (const TRANSPARM *transparm, const DRECT2D *irect, DRECT2D *orect, int sidepoints)
GEOMLIBEXPORT int TransGenCopy (TRANSPARM *otp, const TRANSPARM *itp)
GEOMLIBEXPORT int TransGenCopyInputParms (TRANSPARM *dtransparm, const TRANSPARM *stransparm)
GEOMLIBEXPORT int TransGenCopyInputToOutput (TRANSPARM *dtransparm, const TRANSPARM *stransparm)
GEOMLIBEXPORT int TransGenCopyOutputParms (TRANSPARM *dtransparm, const TRANSPARM *stransparm)
GEOMLIBEXPORT int TransGenCopyOutputToInput (TRANSPARM *dtransparm, const TRANSPARM *stransparm)
GEOMLIBEXPORT int TransGenDisectFwd (const TRANSPARM *transparm, const DPOINT2D *point, double size, double *xscale, double *yscale, double *rotangle, double *shearangle)
GEOMLIBEXPORT int TransGenDisectInv (const TRANSPARM *transparm, const DPOINT2D *point, double size, double *xscale, double *yscale, double *rotangle, double *shearangle)
GEOMLIBEXPORT void TransGenFreeParm (TRANSPARM *transparm)
GEOMLIBEXPORT void TransGenFreePoints (TRANSPARM *transparm)
GEOMLIBEXPORT int TransGenGetAffine (const TRANSPARM *transparm, MAT3X3 ItoO, MAT3X3 OtoI)
GEOMLIBEXPORT int TransGenGetAffineLocal (const TRANSPARM *transparm, const DPOINT2D *point, double size, MAT3X3 ItoO, MAT3X3 OtoI, UINT32 flags)
GEOMLIBEXPORT UINT16 TransGenGetInputModel (const TRANSPARM *tp)
GEOMLIBEXPORT MAPPROJPARMTransGenGetInputProj (const TRANSPARM *transparm, MAPPROJPARM *projparm)
GEOMLIBEXPORT int TransGenGetInputTransAffine (const TRANSPARM *transparm, MAT3X3 ItoO, MAT3X3 OtoI)
GEOMLIBEXPORT int TransGenGetNumPieces (const TRANSPARM *tp, UINT32 flags)
GEOMLIBEXPORT UINT16 TransGenGetOutputModel (const TRANSPARM *tp)
GEOMLIBEXPORT MAPPROJPARMTransGenGetOutputProj (const TRANSPARM *transparm, MAPPROJPARM *projparm)
GEOMLIBEXPORT int TransGenGetOutputTransAffine (const TRANSPARM *transparm, MAT3X3 ItoO, MAT3X3 OtoI)
GEOMLIBEXPORT int TransGenGetPiece (const TRANSPARM *tp, int piecenum, DPOINT2D **points, int *numpoints, UINT32 flags)
GEOMLIBEXPORT int TransGenInit (TRANSPARM *transparm)
bool TransGenIsAffine (const TRANSPARM *transparm)
GEOMLIBEXPORT int TransGenIsFlipped (const TRANSPARM *tp, const DPOINT2D *pt, bool fwd=true)
bool TransGenIsInitialized (const TRANSPARM *transparm)
bool TransGenIsIdentity (const TRANSPARM *transparm)
bool TransGenIsReversible (const TRANSPARM *transparm)
GEOMLIBEXPORT int TransGenSetAffineApprox (TRANSPARM *transparm, const DRECT2D *rect, double tolerance, UINT32 flags)
GEOMLIBEXPORT void TransGenSetDoInsert (TRANSPARM *transparm, UINT8 doinsert)
GEOMLIBEXPORT void TransGenSetExtrapOutside (TRANSPARM *transparm, UINT8 extrapoutside)
GEOMLIBEXPORT int TransGenSetFullTransAffine (TRANSPARM *transparm, const MAT3X3 ItoO, const MAT3X3 OtoI)
GEOMLIBEXPORT ERRVALUE TransGenSetInputBound (TRANSPARM *transparm, const DRECT2D *boundrect)
GEOMLIBEXPORT void TransGenSetInputInsertMaxError (TRANSPARM *transparm, double MaxError)
GEOMLIBEXPORT ERRVALUE TransGenSetInputProj (TRANSPARM *transparm, const MAPPROJPARM *projparm)
GEOMLIBEXPORT ERRVALUE TransGenSetInputProjHandle (TRANSPARM *transparm, void *gctphandle)
GEOMLIBEXPORT int TransGenSetInputTransAffine (TRANSPARM *transparm, const MAT3X3 ItoM, const MAT3X3 MtoI)
GEOMLIBEXPORT ERRVALUE TransGenSetInputTransCtrlPoint (TRANSPARM *transparm, const CTRLPOINT3 *ctrlpoint, int NumPoints, UINT16 transmodel)
GEOMLIBEXPORT int TransGenSetInputTransIdentity (TRANSPARM *transparm)
GEOMLIBEXPORT void TransGenSetMaxInsertVertices (TRANSPARM *transparm, int MaxVertices)
GEOMLIBEXPORT ERRVALUE TransGenSetOutputBound (TRANSPARM *transparm, const DRECT2D *boundrect)
GEOMLIBEXPORT void TransGenSetOutputInsertMaxError (TRANSPARM *transparm, double MaxError)
GEOMLIBEXPORT ERRVALUE TransGenSetOutputProj (TRANSPARM *transparm, const MAPPROJPARM *projparm)
GEOMLIBEXPORT ERRVALUE TransGenSetOutputProjHandle (TRANSPARM *transparm, void *gctphandle)
GEOMLIBEXPORT int TransGenSetOutputTransAffine (TRANSPARM *transparm, const MAT3X3 OtoM, const MAT3X3 MtoO)
GEOMLIBEXPORT ERRVALUE TransGenSetOutputTransCtrlPoint (TRANSPARM *transparm, const CTRLPOINT3 *ctrlpoint, int NumPoints, UINT16 transmodel)
GEOMLIBEXPORT int TransGenSetOutputTransIdentity (TRANSPARM *transparm)
GEOMLIBEXPORT void TransGenSetPrimaryDirection (TRANSPARM *transparm, UINT8 directions)
GEOMLIBEXPORT ERRVALUE TransGenSetupObjProjTrans (TRANSPARM *transparm, MAT3X3 AtoM, MAT3X3 MtoA, MAPPROJPARM *Aprojparm, MAT3X3 BtoM, MAT3X3 MtoB, MAPPROJPARM *Bprojparm)
GEOMLIBEXPORT ERRVALUE TransGenTransFuncFwd (void *ipoint, void *opoint, int numpoints, int numdim, void *vtp)
GEOMLIBEXPORT ERRVALUE TransGenTransFuncInv (void *ipoint, void *opoint, int numpoints, int numdim, void *vtp)
GEOMLIBEXPORT void TransGenUpdate (TRANSPARM *transparm)
int DisectGen2D (const DPOINT2D_OLD *point, double size, double *xscale, double *yscale, double *rotangle, double *shear, TRANSFUNC transfunc, void *transdata)


Detailed Description

<mi32/transgen.h> Function prototypes and macros for TransGen functions

Definition in file transgen.h.


Define Documentation

#define GEOMLIBEXPORT   MI_DLLIMPORT
 

Definition at line 163 of file transgen.h.

#define TRANSDIR_Forward   0
 

Definition at line 207 of file transgen.h.

#define TRANSDIR_Inverse   1
 

Definition at line 208 of file transgen.h.

#define TRANSGENCOORD_External   0x00000004
 

Definition at line 213 of file transgen.h.

#define TRANSGENCOORD_Input   0x00000001
 

Definition at line 211 of file transgen.h.

#define TRANSGENCOORD_Map   0x00000008
 

Definition at line 214 of file transgen.h.

#define TRANSGENCOORD_Output   0x00000002
 

Definition at line 212 of file transgen.h.


Typedef Documentation

typedef int(* TRANSFUNC)(void*,void*,int,int,void*)
 

Definition at line 169 of file transgen.h.


Function Documentation

int DisectGen2D const DPOINT2D_OLD point,
double  size,
double *  xscale,
double *  yscale,
double *  rotangle,
double *  shear,
TRANSFUNC  transfunc,
void *  transdata
[inline]
 

Disect a transformation into component parts (scale, rotation, shear).

Parameters:
point  Point to compute values at
size  Size in source coordinates over which to compute (usually 1.0)
xscale  X scale at specified point returned
yscale  Y scale at specified point returned
rotangle  Rotation angle at specified point returned (radians)
shear  Shear angle at specified point returned (radians)
transfunc  Transformation function to "disect"
transdata  "userdata" for transfunc

Definition at line 827 of file transgen.h.

GEOMLIBEXPORT int DisectGen2D const DPOINT2D point,
double  size,
double *  xscale,
double *  yscale,
double *  rotangle,
double *  shearangle,
TRANSFUNC  transfunc,
void *  transfuncdata
 

Disect a transformation into component parts (scale, rotation, shear).

#include <mi32/geom2d.h> This function is used to compute the affine transformation parameters above at a given point for a general transformation function.

Parameters:
point  Point to compute values at
size  Size in source coodinates over which to compute (usually 1.0)
xscale  X scale at specified point returned
yscale  Y scale at specified point returned
rotangle  Rotation angle at specified point returned (radians)
shearangle  Shear angle at specified point returned (radians)
transfunc  Transformation function to "disect"
transfuncdata  "userdata' for transfunc

GEOMLIBEXPORT int TransGenConvPointFwd const TRANSPARM transparm,
const DPOINT2D ipoint,
DPOINT2D opoint
 

Transform single point from "input" to "output" coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point
opoint  Converted point coordinates returned

GEOMLIBEXPORT int TransGenConvPointInputToMap const TRANSPARM transparm,
const DPOINT2D ipoint,
DPOINT2D opoint
 

Transform single point from "input" to map coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point
opoint  Converted point coordinates returned

GEOMLIBEXPORT int TransGenConvPointInv const TRANSPARM transparm,
const DPOINT2D ipoint,
DPOINT2D opoint
 

Transform single point from "output" to "input" coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point
opoint  Converted point coordinates returned

GEOMLIBEXPORT int TransGenConvPointMapToInput const TRANSPARM transparm,
const DPOINT2D ipoint,
DPOINT2D opoint
 

Transform single point from map to "input" coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point
opoint  Converted point coordinates returned

GEOMLIBEXPORT int TransGenConvPointMapToMapFwd const TRANSPARM transparm,
const DPOINT2D ipoint,
DPOINT2D opoint
 

Transform single point from input map coordinates to output map coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point
opoint  Converted point coordinates returned

GEOMLIBEXPORT int TransGenConvPointMapToMapInv const TRANSPARM transparm,
const DPOINT2D ipoint,
DPOINT2D opoint
 

Transform single point from output map coordinates to input map coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point
opoint  Converted point coordinates returned

GEOMLIBEXPORT int TransGenConvPointMapToOutput const TRANSPARM transparm,
const DPOINT2D ipoint,
DPOINT2D opoint
 

Transform single point from map to "output" coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point
opoint  Converted point coordinates returned

GEOMLIBEXPORT int TransGenConvPointOutputToMap const TRANSPARM transparm,
const DPOINT2D ipoint,
DPOINT2D opoint
 

Transform single point from "output" to map coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point
opoint  Converted point coordinates returned

GEOMLIBEXPORT int TransGenConvPointSetFwd const TRANSPARM transparm,
const double *  ipoint,
INT32  iNumPoints,
int  NumDim,
double *  opoint
 

Transform N-dimensional point "set" from "input" to "output" coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point array
iNumPoints  Number of input points
NumDim  Number of dimensions in point array (usually 2 or 3)
opoint  Output point array

GEOMLIBEXPORT int TransGenConvPointSetInv const TRANSPARM transparm,
const double *  ipoint,
INT32  iNumPoints,
int  NumDim,
double *  opoint
 

Transform N-dimensional point "set" from "output" to "input" coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ipoint  Input point array
iNumPoints  Number of input points
NumDim  Number of dimensions in point array (usually 2 or 3)
opoint  Output point array

GEOMLIBEXPORT int TransGenConvPointsFwd const TRANSPARM transparm,
const double *  ipoint,
INT32  iNumPoints,
int  NumDim,
double **  opoint,
INT32
 

Transform N-dimensional point array from "input" to "output" coordinates.

Returns:
Error code < 0 This function returns a pointer to an internally allocated array. Do not free this pointer. The internal array may be freed via TransGenFreeParm() or TransGenFreePoints(). Note: The number of output points may be different than iNumPoints, if you want to transform the points one-to-one use TransGenConvPointSetFwd().
Parameters:
transparm  Transformation parameter structure
ipoint  Input point array
iNumPoints  Number of input points
NumDim  Number of dimensions in point array (usually 2 or 3)
opoint  Output point array (pointer returned, DO NOT FREE)

GEOMLIBEXPORT int TransGenConvPointsInv const TRANSPARM transparm,
const double *  ipoint,
INT32  iNumPoints,
int  NumDim,
double **  opoint,
INT32
 

Transform N-dimensional point array from "output" to "input" coordinates.

Returns:
Error code < 0 This function returns a pointer to an internally allocated array. Do not free this pointer. The internal array may be freed via TransGenFreeParm() or TransGenFreePoints(). Note: The number of output points may be different than iNumPoints, if you want to transform the points one-to-one use TransGenConvPointSetInv().
Parameters:
transparm  Transformation parameter structure
ipoint  Input point array
iNumPoints  Number of input points
NumDim  Number of dimensions in point array (usually 2 or 3)
opoint  Output point array (pointer returned, DO NOT FREE)

GEOMLIBEXPORT int TransGenConvRectFwd const TRANSPARM transparm,
const DRECT2D irect,
DRECT2D orect,
int  sidepoints
 

Transform rectangle (DRECT2D) from "input" to "output" coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
irect  Input rectangle to be translated
orect  Output rectangle
sidepoints  Number of points per side of box if needed (0 for default)

GEOMLIBEXPORT int TransGenConvRectInv const TRANSPARM transparm,
const DRECT2D irect,
DRECT2D orect,
int  sidepoints
 

Transform rectangle (DRECT2D) from "output" to "input" coordinates.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
irect  Input rectangle to be translated
orect  Output rectangle
sidepoints  Number of points per side of box if needed (0 for default)

GEOMLIBEXPORT int TransGenCopy TRANSPARM otp,
const TRANSPARM itp
 

Copy one TRANSPARM to another.

Returns:
Error code < 0
Parameters:
otp  Output transformation parameter structure
itp  Input transformation parameter structure

GEOMLIBEXPORT int TransGenCopyInputParms TRANSPARM dtransparm,
const TRANSPARM stransparm
 

Copy "input parameters" from on TRANSPARM structure to another.

Returns:
Error code < 0
Parameters:
dtransparm  Destination transformation parameters
stransparm  Source transformation parameters

GEOMLIBEXPORT int TransGenCopyInputToOutput TRANSPARM dtransparm,
const TRANSPARM stransparm
 

Copy "input parameters" from one TRANSPARM to "output parameters" of another.

Returns:
Error code < 0
Parameters:
dtransparm  Destination transformation parameters
stransparm  Source transformation parameters

GEOMLIBEXPORT int TransGenCopyOutputParms TRANSPARM dtransparm,
const TRANSPARM stransparm
 

Copy "output parameters" from one TRANSPARM to another.

Returns:
Error code < 0
Parameters:
dtransparm  Destination transformation parameters
stransparm  Source transformation parameters

GEOMLIBEXPORT int TransGenCopyOutputToInput TRANSPARM dtransparm,
const TRANSPARM stransparm
 

Copy "output parameters" from one TRANSPARM to "input parameters" of another.

Returns:
Error code < 0
Parameters:
dtransparm  Destination transformation parameters
stransparm  Source transformation parameters

GEOMLIBEXPORT int TransGenDisectFwd const TRANSPARM transparm,
const DPOINT2D point,
double  size,
double *  xscale,
double *  yscale,
double *  rotangle,
double *  shearangle
 

Determine scale/rotation/shear at specified point for forward transformation.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
point  Reference point at which values will be computed (NULL for 0,0)
size  Size of area over which to compute values
xscale  X scale factor returned (NULL if don't need)
yscale  Y scale factor returned (NULL if don't need)
rotangle  Rotation angle returned in radians (NULL if don't need)
shearangle  Shear angle returned in radians (NULL if don't need)

GEOMLIBEXPORT int TransGenDisectInv const TRANSPARM transparm,
const DPOINT2D point,
double  size,
double *  xscale,
double *  yscale,
double *  rotangle,
double *  shearangle
 

Determine scale/rotation/shear at specified point for inverse transformation.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
point  Reference point at which values will be computed (NULL for 0,0)
size  Size of area over which to compute values
xscale  X scale factor returned (NULL if don't need)
yscale  Y scale factor returned (NULL if don't need)
rotangle  Rotation angle returned in radians (NULL if don't need)
shearangle  Shear angle returned in radians (NULL if don't need)

GEOMLIBEXPORT void TransGenFreeParm TRANSPARM transparm  ) 
 

Free all allocated entried in the TRANSPARM structure.

Returns:
nothing
Parameters:
transparm  Transformation parameter structure

GEOMLIBEXPORT void TransGenFreePoints TRANSPARM transparm  ) 
 

Free output point array in the TRANSPARM structure.

Returns:
nothing
Parameters:
transparm  Transformation parameter structure

GEOMLIBEXPORT int TransGenGetAffine const TRANSPARM transparm,
MAT3X3  ItoO,
MAT3X3  OtoI
 

Get affine (Mat3x3) transformation if available.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure
ItoO  Input to output transformation returned (NULL if don't need)
OtoI  Output to input transformation returned (NULL if don't need)

GEOMLIBEXPORT int TransGenGetAffineLocal const TRANSPARM transparm,
const DPOINT2D point,
double  size,
MAT3X3  ItoO,
MAT3X3  OtoI,
UINT32  flags
 

Determine affine transformation at specified point.

return Error code < 0 The flags value determines if the specified point is in "input" or "output" coordinates.

Parameters:
transparm  Transformation parameter structure
point  Reference point at which values will be computed
size  Size of area over which to compute values
ItoO  Input to output transformation returned
OtoI  Output to input transformation returned
flags  TRANSGENCOORD_Input or TRANSGENCOORD_Output

GEOMLIBEXPORT UINT16 TransGenGetInputModel const TRANSPARM tp  ) 
 

Get input transformation model.

Returns:
Transformation model
Parameters:
tp  Transformation parameter structure

GEOMLIBEXPORT MAPPROJPARM* TransGenGetInputProj const TRANSPARM transparm,
MAPPROJPARM projparm
 

Get "input projection parameters" from TRANSPARM.

Returns:
See below If a non-NULL value is passed for "projparm" then a pointer to this structure will be returned. If NULL is passed for "projparm" then either NULL or a pointer to an internal projection parameter structure will be returned depending on whether a projection has previously been specified via TransGenSetInputProj() or TransGenSetInputProjHandle(). It is therefore highly recommended that you pass a pointer to a structure to fill in.
Parameters:
transparm  Transformation parameter structure
projparm  Projection parameter structure to fill in

GEOMLIBEXPORT int TransGenGetInputTransAffine const TRANSPARM transparm,
MAT3X3  ItoO,
MAT3X3  OtoI
 

Get input object-map affine transformation if possible.

Returns:
Error code < 0 An error (EBadFuncParm) will be returned if the object-map transformation is not affine.
Parameters:
transparm  Transformation parameter structure
ItoO  Input to output transformation returned
OtoI  Output to input transformation returned

GEOMLIBEXPORT int TransGenGetNumPieces const TRANSPARM tp,
UINT32  flags
 

Get number of "pieces" for piecewise transformations.

Returns:
Number of "pieces"
Parameters:
tp  Transformation parameter structure

GEOMLIBEXPORT UINT16 TransGenGetOutputModel const TRANSPARM tp  ) 
 

Get output transformation model.

Returns:
Transformation model
Parameters:
tp  Transformation parameter structure

GEOMLIBEXPORT MAPPROJPARM* TransGenGetOutputProj const TRANSPARM transparm,
MAPPROJPARM projparm
 

Get "output projection parameters" from TRANSPARM.

Returns:
See below If a non-NULL value is passed for "projparm" then a pointer to this structure will be returned. If NULL is passed for "projparm" then either NULL or a pointer to an internal projection parameter structure will be returned depending on whether a projection has previously been specified via TransGenSetOutputProj() or TransGenSetOutputProjHandle(). It is therefore highly recommended that you pass a pointer to a structure to fill in.
Parameters:
transparm  Transformation parameter structure
projparm  Projection parameter structure to fill in

GEOMLIBEXPORT int TransGenGetOutputTransAffine const TRANSPARM transparm,
MAT3X3  ItoO,
MAT3X3  OtoI
 

Get outpu object-map affine transformation if possible.

Returns:
Error code < 0 An error (EBadFuncParm) will be returned if the object-map transformation is not affine.
Parameters:
transparm  Transformation parameter structure
ItoO  Input to output transformation returned
OtoI  Output to input transformation returned

GEOMLIBEXPORT int TransGenGetPiece const TRANSPARM tp,
int  piecenum,
DPOINT2D **  points,
int *  numpoints,
UINT32  flags
 

Return array of points defining "piece" for piecewise transformation.

Returns:
Array of points

GEOMLIBEXPORT int TransGenInit TRANSPARM transparm  ) 
 

Initialize TRANSPARM structure.

Returns:
Error code < 0
Parameters:
transparm  Transformation parameter structure

bool TransGenIsAffine const TRANSPARM transparm  )  [inline]
 

Determine if transformation is "affine".

Returns:
TRUE if transformation is affine, FALSE if not
Parameters:
transparm  Transformation parameter structure

Definition at line 574 of file transgen.h.

GEOMLIBEXPORT int TransGenIsFlipped const TRANSPARM tp,
const DPOINT2D pt,
bool  fwd = true
 

Determine if transformation results in change between right-hand and left-hand system.

Returns:
TRUE if transformation results in change, FALSE if not

bool TransGenIsIdentity const TRANSPARM transparm  )  [inline]
 

Determine if transformation is "identity".

Returns:
TRUE if transformation is identity, FALSE if not
Parameters:
transparm  Transformation parameter structure

Definition at line 601 of file transgen.h.

bool TransGenIsInitialized const TRANSPARM transparm  )  [inline]
 

Determine if transformation has been "initialized".

Returns:
TRUE if transformation has been initialized, FALSE if not
Parameters:
transparm  Transformation parameter structure

Definition at line 592 of file transgen.h.

bool TransGenIsReversible const TRANSPARM transparm  )  [inline]
 

Determine if transformation is reversible.

Returns:
TRUE if transformation is reversible, FALSE if not
Parameters:
transparm  Transformation parameter structure

Definition at line 610 of file transgen.h.

GEOMLIBEXPORT int TransGenSetAffineApprox TRANSPARM transparm,
const DRECT2D rect,
double  tolerance,
UINT32  flags
 

Set full transformation to approximated affine if within tolerance.

Returns:
Error code < 0 Flags: TRANSGENCOORD_Output Rectangle is in "output" coordinates (tolerance in "input" coordinates)
Parameters:
transparm  Transformation parameter structure
rect  Rectangle over which to compute approximation
tolerance  Maximum displacement in opposite coordinates from "rect"
flags  Used to determine coordinates

GEOMLIBEXPORT void TransGenSetDoInsert TRANSPARM transparm,
UINT8  doinsert
 

Set whether to insert new points when doing TransGenConvPoints...().

Parameters:
transparm  Transformation parameter structure
doinsert  TRUE if point insertion is allowed, FALSE if not

GEOMLIBEXPORT void TransGenSetExtrapOutside TRANSPARM transparm,
UINT8  extrapoutside
 

Set whether or not to extrapolate points outside defined boundaries.

If extrapolation is not enabled then an error -may- be returned for points outside the defined extents. This is the default condition and will generally be much faster than extrapolating.

Parameters:
transparm  Transformation parameter structure
extrapoutside  TRUE if extrapolation desired, FALSE if not

GEOMLIBEXPORT int TransGenSetFullTransAffine TRANSPARM transparm,
const MAT3X3  ItoO,
const MAT3X3  OtoI
 

Temporarily set full transformation to specified affine matrices.

Returns:
0 This will override the values set in the TRANSPARM structure until the next TransGenSet...() or TransGenUpdate() operation.
Parameters:
transparm  Transformation parameter structure
ItoO  Input to output transformation returned
OtoI  Output to input transformation returned

GEOMLIBEXPORT ERRVALUE TransGenSetInputBound TRANSPARM transparm,
const DRECT2D boundrect
 

Set boundaries for valid transformation in input coordinates.

Using this function will ensure that all points within the specified rectangle will have a valid conversion for the forward transformation, assuming that their map coordinates are reasonable. Points outside the rectangle may or may not have a valid transformation depending on the type of transformation being performed. This function is needed for some of the piecewise transformations which are defined by the convex hull of the defining control point mesh.

Parameters:
transparm  Transformation parameter structure
boundrect  Bounding rectangle in input coordinates

GEOMLIBEXPORT void TransGenSetInputInsertMaxError TRANSPARM transparm,
double  MaxError
 

Set maximum displacement for point insertion, input coordinates.

Parameters:
transparm  Transformation parameter structure
MaxError  Max error

GEOMLIBEXPORT ERRVALUE TransGenSetInputProj TRANSPARM transparm,
const MAPPROJPARM projparm
 

Set "input projection" in TRANSPARM structure.

Parameters:
transparm  Transformation parameter structure
projparm  Projection parameters (pass NULL if no projection)

GEOMLIBEXPORT ERRVALUE TransGenSetInputProjHandle TRANSPARM transparm,
void *  gctphandle
 

Set "input projection" using given gctp handle (assumes handle is initialized).

This makes a copy of the handle, so any subsequent changes to it will have no effect on the TRANSPARM

Parameters:
transparm  Transformation parameter structure
gctphandle  CCTP handle (must have been initialized via gctpSetParm() already)

GEOMLIBEXPORT int TransGenSetInputTransAffine TRANSPARM transparm,
const MAT3X3  ItoM,
const MAT3X3  MtoI