Back AAM-API documentation The AAM-Site

In file AAMWarp.h:

class CAAMWarpLinear

Piece-wise affine warping between two shapes.

Inheritance:

CAAMWarpLinear - CAAMWarp - CAAMObject


Public Methods

[more] CAAMWarpLinear( bool useSrcDelaunay )
Constructor.
[more]bool HasSrcShape() const
Returns true if the source shape has been set
[more]void SetDestShape(const CAAMShape &s)
Sets the shape to warp to.
[more]void SetSrcShape(const CAAMShape &s)
Sets the shape to warp from.
[more]bool Warp(const CAAMPoint &in, CAAMPoint &out) const
Warps point 'in' to point 'out' (if possible).

Private Fields

[more]CAAMMesh m_Mesh
The Delaunay Triangulisation of the source or dest shape
[more]std::vector<CAAMPoint> m_vDestPoints
The points of the destination shape


Inherited from CAAMWarp:

Public Methods

ovoid UseConvexHull( bool enable = true )

Protected Fields

obool m_bUseConvexHull

Private Fields

odouble m_dSrcShapeMaxX
odouble m_dSrcShapeMaxY
odouble m_dSrcShapeMinX
odouble m_dSrcShapeMinY


Inherited from CAAMObject:

Public Methods

ovoid Dump( const char* szPath ) const
ovoid FromFile( const char* szFilename )
ovoid FromFile( FILE* fh )
ovoid ToFile( FILE* fh ) const
ovoid ToFile( const char* szFilename ) const


Documentation

This class implements a piece-wise affine warping between two shapes using a Delaunay Triangulisation of the source shape. This triangulisation is the used for both the source and destination shape. The corrospondance between points and triangles gives a continuous deformation field inside the triangles. Since the deformation is performed on a linear per-triangle basis, the field is not smooth across triangles.

oCAAMMesh m_Mesh
The Delaunay Triangulisation of the source or dest shape

ostd::vector<CAAMPoint> m_vDestPoints
The points of the destination shape

obool HasSrcShape() const
Returns true if the source shape has been set

o CAAMWarpLinear( bool useSrcDelaunay )

Constructor.

Parameters:
useSrcDelaunay - If true the Delaunay of the source shape is used.
Returns:
Nothing.
Author:
Mikkel B. Stegmann
Version:
4-26-2000

ovoid SetSrcShape(const CAAMShape &s)

Sets the shape to warp from.

Parameters:
s - Input shape.
Returns:
Nothing.
Author:
Mikkel B. Stegmann
Version:
4-26-2000

ovoid SetDestShape(const CAAMShape &s)

Sets the shape to warp to.

Parameters:
s - Input shape.
Returns:
Nothing.
Author:
Mikkel B. Stegmann
Version:
4-26-2000

obool Warp(const CAAMPoint &in, CAAMPoint &out) const

Warps point 'in' to point 'out' (if possible).

Parameters:
in - Input point.
out - Output point.
Returns:
True if 'in' is inside the source mesh, false if not.
Author:
Mikkel B. Stegmann
Version:
4-26-2000


This class has no child classes.
Author:
Mikkel B. Stegmann
Version:
02-14-2000
See Also:
CAAMWarp

Alphabetic index Hierarchy of classes


Back AAM-API documentation The AAM-Site