All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Mathematics Class CATMathGridOfPoints

Mathematics.CATCGMVirtual
  |
  +---Mathematics.CATMathExtendableSet
    |
    +---Mathematics.CATMathGrid
      |
      +---CATMathGridOfPoints
 

Usage: you must use this class as is. You should never derive it.


public class CATMathGridOfPoints

Class representing a bi-dimensionnal grid of CATMathPoints.

The size is defined by a number of rows NbRows and a number of columns NbColumns. The index of the fisrt CATMathPoints are (0,0).
The SetNumberOfPoints method enlarges the memory if needed, while the Compress inherited method releases the free unused memory.


Constructor and Destructor Index


o CATMathGridOfPoints()
Constructs an empty CATMathGridOfPoints with 0 row and 0 column.
o CATMathGridOfPoints(CATLONG32,CATLONG32)
Constructs a CATMathGridOfPoints of a given size.
o CATMathGridOfPoints(CATLONG32,CATLONG32,CATMathPoint[])
Constructs from an array of CATMathPoints, assuming it is ordered row after row.
o CATMathGridOfPoints(CATMathGridOfPoints&)
Copy constructor.
o CATMathGridOfPoints(CATMathGridOfPoints&,CATLONG32,CATLONG32,CATLONG32,CATLONG32)
Constructs by extracting a smaller grid from another one.
o CATMathGridOfPoints(CATMathSetOfPoints&,CATLONG32,CATLONG32)
Constructs from a CATMathSetOfPoints, assuming it is ordered column after column.
o ~CATMathGridOfPoints()
Destructor

Method Index


o ApplyTransformation(CATMathTransformation&)
Transforms the CATMathPoints of this CATMathGridOfPoints.
o DistanceTo(CATMathGridOfPoints*,CATLONG32&,CATLONG32&,CATLONG32&,CATLONG32&)
Returns the distance between a point of this CATMathGridOfPoints and a point of another CATMathGridOfPoints.
o DistanceTo(CATMathPoint&,CATLONG32&,CATLONG32&)
Returns the distance between a CATMathPoint and a point of this CATMathGridOfPoints.
o DistanceTo(CATMathSetOfPoints*,CATLONG32&,CATLONG32&,CATLONG32&)
Returns the distance between a point of a CATMathSetOfPoints and a point of this CATMathGridOfPoints.
o GetPoint(CATLONG32,CATLONG32)
Returns the CATMathPoint locating at a given row and column.
o GetPoint(CATLONG32,CATLONG32,CATMathPoint&)
Retrieves the CATMathPoint locating at a given row and column.
o GetPoints()
Returns the array of CATMathPoints sorted row by row.
o SetPoint(CATMathPoint&,CATLONG32,CATLONG32)
Initializes the values of a CATMathPoint in this CATMathGridOfPoints.
o SquareDistanceTo(CATMathGridOfPoints*,CATLONG32&,CATLONG32&,CATLONG32&,CATLONG32&)
Returns the square distance between a point of this CATMathGridOfPoints and a point of another CATMathGridOfPoints.
o SquareDistanceTo(CATMathPoint&,CATLONG32&,CATLONG32&)
Returns the square distance between a CATMathPoint and a point of this CATMathGridOfPoints.
o SquareDistanceTo(CATMathSetOfPoints*,CATLONG32&,CATLONG32&,CATLONG32&)
Returns the square distance between a point of a CATMathSetOfPoints and a point of this CATMathGridOfPoints.

Constructor and Destructor


o CATMathGridOfPoints
public CATMathGridOfPoints()
Constructs an empty CATMathGridOfPoints with 0 row and 0 column.
o CATMathGridOfPoints
public CATMathGridOfPoints(CATLONG32 iNbRows,
CATLONG32 iNbColumns)
Constructs a CATMathGridOfPoints of a given size.
The memory is allocated, but the values of the points are not initialized. Use SetPoint to initialize them.
o CATMathGridOfPoints
public CATMathGridOfPoints(CATLONG32 iNbRows,
CATLONG32 iNbColumns,
const CATMathPoint[] iArrayPoint)
Constructs from an array of CATMathPoints, assuming it is ordered row after row.
o CATMathGridOfPoints
public CATMathGridOfPoints( const CATMathGridOfPoints& iGridToCopy)
Copy constructor.
o CATMathGridOfPoints
public CATMathGridOfPoints( const CATMathGridOfPoints& iSourceGrid,
CATLONG32 iStartRow,
CATLONG32 iEndRow,
CATLONG32 iStartColumn,
CATLONG32 iEndColumn)
Constructs by extracting a smaller grid from another one.
o CATMathGridOfPoints
public CATMathGridOfPoints( const CATMathSetOfPoints& iSourceSet,
CATLONG32 iNbRows,
CATLONG32 iNbColumns)
Constructs from a CATMathSetOfPoints, assuming it is ordered column after column.
o ~CATMathGridOfPoints
public virtual ~CATMathGridOfPoints()
Destructor

Methods


o ApplyTransformation
public virtual void ApplyTransformation( const CATMathTransformation& iTransfo)
Transforms the CATMathPoints of this CATMathGridOfPoints.
o DistanceTo
public double DistanceTo( const CATMathGridOfPoints* iGridOfPoints2,
CATLONG32& iRow1,
CATLONG32& iColumn1,
CATLONG32& iRow2,
CATLONG32& Column2) const
Returns the distance between a point of this CATMathGridOfPoints and a point of another CATMathGridOfPoints.
Parameters:
iGridOfPoints2
The other grid of points which the second point belongs to.
iRow1
The row (beginning at 0) of the point of this to which the distance is computed.
iColumn1
The column (beginning at 0) of the point of this to which the distance is computed.
iRow2
The row (beginning at 0) of the point of the second grid of points to which the distance is computed.
iColumn2
The column (beginning at 0) of the point of the second grid of points to which the distance is computed.
o DistanceTo
public double DistanceTo( const CATMathPoint& iP,
CATLONG32& iRow,
CATLONG32& iColumn) const
Returns the distance between a CATMathPoint and a point of this CATMathGridOfPoints.
Parameters:
iP
The point to which the distance is computed.
iRow
The row (beginning at 0) of the point of this to which the distance is computed.
iColumn
The column (beginning at 0) of the point of this to which the distance is computed.
o DistanceTo
public double DistanceTo( const CATMathSetOfPoints* iSetOfPoints2,
CATLONG32& iRow1,
CATLONG32& iColumn1,
CATLONG32& iIndex2) const
Returns the distance between a point of a CATMathSetOfPoints and a point of this CATMathGridOfPoints.
Parameters:
iSetOfPoints2
The set of points which the second point belongs to.
iRow1
The row (beginning at 0) of the point of this to which the distance is computed.
iColumn1
The column (beginning at 0) of the point of this to which the distance is computed.
iIndex2
The index (beginning at 0) of the second point in its set to which the distance is computed.
o GetPoint
public CATMathPoint GetPoint(CATLONG32 iRow,
CATLONG32 iColumn) const
Returns the CATMathPoint locating at a given row and column.
The indexes iRow and iColumn start at 0.
Use preferently the second method signature if you want to avoid an useless constructor.
o GetPoint
public void GetPoint(CATLONG32 iRow,
CATLONG32 iColumn,
CATMathPoint& ioPoint) const
Retrieves the CATMathPoint locating at a given row and column.
The indexes iRow and iColumn start at 0.
o GetPoints
public CATMathPoint * GetPoints()const
Returns the array of CATMathPoints sorted row by row.
A CATMathPoint at the (iRow,iColumn) location is accessed using the formula iRow*NbRows+iColumn in the returned array.
Note that the returned array is used by the CATMathGridOfPoints and must not be deleted.
o SetPoint
public void SetPoint( const CATMathPoint& iPoint,
CATLONG32 iRow,
CATLONG32 iColumn)
Initializes the values of a CATMathPoint in this CATMathGridOfPoints.
The indexes iRow and iColumn start at 0.
o SquareDistanceTo
public double SquareDistanceTo( const CATMathGridOfPoints* iGridOfPoints2,
CATLONG32& iRow1,
CATLONG32& iColumn1,
CATLONG32& iRow2,
CATLONG32& iColumn2) const
Returns the square distance between a point of this CATMathGridOfPoints and a point of another CATMathGridOfPoints.
Parameters:
iGridOfPoints2
The other grid of points which the second point belongs to.
iRow1
The row (beginning at 0) of the point of this to which the distance is computed.
iColumn1
The column (beginning at 0) of the point of this to which the distance is computed.
iRow2
The row (beginning at 0) of the point of the second grid of points to which the distance is computed.
iColumn2
The column (beginning at 0) of the point of the second grid of points to which the distance is computed.
o SquareDistanceTo
public double SquareDistanceTo( const CATMathPoint& iP,
CATLONG32& iRow,
CATLONG32& iColumn) const
Returns the square distance between a CATMathPoint and a point of this CATMathGridOfPoints.
Parameters:
iP
The point to which the distance is computed.
iRow
The row (beginning at 0) of the point of this to which the distance is computed.
iColumn
The column (beginning at 0) of the point of this to which the distance is computed.
o SquareDistanceTo
public double SquareDistanceTo( const CATMathSetOfPoints* iSetOfPointst2,
CATLONG32& iRow1,
CATLONG32& iColumn1,
CATLONG32& iIndex2) const
Returns the square distance between a point of a CATMathSetOfPoints and a point of this CATMathGridOfPoints.
Parameters:
iSetOfPoints2
The set of points which the second point belongs to.
iRow1
The row (beginning at 0) of the point of this to which the distance is computed.
iColumn1
The column (beginning at 0) of the point of this to which the distance is computed.
iIndex2
The index (beginning at 0) of the second point in its set to which the distance is computed.

This object is included in the file: CATMathGridOfPoints.h
If needed, your Imakefile.mk should include the module: CATMathematics

Copyright © 2003, Dassault Systèmes. All rights reserved.