All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Mathematics Class CATMathSetOfPoints

Mathematics.CATCGMVirtual
  |
  +---Mathematics.CATMathExtendableSet
    |
    +---Mathematics.CATMathSetOf3DObjects
      |
      +---CATMathSetOfPoints
 

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


public class CATMathSetOfPoints

Class representing a set of CATMathPoints.

The size is defined by a number of CATMathPoints NbPoints. The index of the first CATMathPoint is 0.
The SetNumberOfPoints method enlarges the memory if needed, while the Compress inherited method releases the free unused memory.


Constructor and Destructor Index


o CATMathSetOfPoints()
Constructs an empty CATMathSetOfPoints with no point.
o CATMathSetOfPoints(CATLONG32)
Constructs a CATMathSetOfPoints of a given size.
o CATMathSetOfPoints(CATLONG32,CATMathPoint[])
Constructs from an array of CATMathPoints.
o CATMathSetOfPoints(CATMathSetOfPoints&)
Copy constructor.
o ~CATMathSetOfPoints()
Destructor.

Method Index


o ComputeAffineSpace(CATMathPoint&,CATMathVector&,CATMathVector&,CATMathVector&,CATMathSetOfPoints::AffineSpace&,double&,double,double*)
o ComputeAffineSupport(CATMathPoint&,CATMathVector&,CATMathVector&,CATMathVector&,CATMathSetOfPoints::AffineSpace&,double&,double,double*)
Returns the type of the mean affine sub-space generated by this set of points.
o DistanceTo(CATMathPoint&,CATLONG32&)
Returns the distance between a CATMathPoint and this CATMathSetOfPoints.
o DistanceTo(CATMathSetOfPoints*,CATLONG32&,CATLONG32&)
Returns the distance between this CATMathSetOfPoints and another CATMathSetOfPoints.
o GetAffineSpace(CATMathPoint&,CATMathVector&,CATMathVector&,CATMathVector&,CATMathSetOfPoints::AffineSpace&)
Throws an error if an error occurs Returns the type of the mean affine sub-space generated by this set of points.
o GetNumberOfPoints()
Returns the number of points of this CATMathSetOfPoints.
o GetPoint(CATLONG32)
Returns the CATMathPoint locating at a given row and column.
o GetPoint(CATLONG32,CATMathPoint&)
Retrieves the CATMathPoint locating at a index.
o GetPoints()
Returns the array of CATMathPoints.
o SetNumberOfPoints(CATLONG32)
Allocates the memory for this CATMathSetOfPoints.
o SetPoint(CATMathPoint&,CATLONG32)
Initializes the values of a CATMathPoint in the CATMathSetOfPoints.
o SquareDistanceTo(CATMathPoint&,CATLONG32&)
Returns the square distance between a CATMathPoint and this CATMathSetOfPoints.
o SquareDistanceTo(CATMathSetOfPoints*,CATLONG32&,CATLONG32&)
Returns the square distance between this CATMathSetOfPoints and another CATMathSetOfPoints.

Enumerated Type Index


o AffineSpace
Defines the type of space generated by a set of points.

Constructor and Destructor


o CATMathSetOfPoints
public CATMathSetOfPoints()
Constructs an empty CATMathSetOfPoints with no point.
o CATMathSetOfPoints
public CATMathSetOfPoints(CATLONG32 iNbPoints)
Constructs a CATMathSetOfPoints of a given size.
The memory is allocated, but the values of the points are not initialized. Use SetPoint to initialize them.
o CATMathSetOfPoints
public CATMathSetOfPoints(CATLONG32 iNbPoints,
const CATMathPoint[] iPointsToCopy)
Constructs from an array of CATMathPoints.
o CATMathSetOfPoints
public CATMathSetOfPoints( const CATMathSetOfPoints& iSetToCopy)
Copy constructor.
o ~CATMathSetOfPoints
public ~CATMathSetOfPoints()
Destructor.

Methods


o ComputeAffineSpace
public void ComputeAffineSpace(CATMathPoint& ioOrigin,
CATMathVector& ioVector1,
CATMathVector& ioVector2,
CATMathVector& ioVector3,
CATMathSetOfPoints::AffineSpace& ioAffineSpace,
double& oDistance,
double iTol,
double* weights= NULL)
Deprecated:
V5R15 ComputeAffineSupport Throws an error if an error occurs Returns the type of the mean affine sub-space generated by this set of points. Note that it does not return the type of the affine space of the smallest dimension passing through the points. The SPACE type is returned in very specific cases. The LINE and POINT types are returned in cases of degeneracy. In a general case, the PLANE type is returned and this is the mean plane which is calculated.
Parameters:
ioAffineSpace
The type of space generated by the set of points. According to it, different types of data are computed:
POINT
Only the ioOrigin is valued.
LINE
The ioOrigin and the ioVector1 are valuated.
PLANE
The ioOrigin and the first two vectors are valuated.
SPACE
The ioOrigin and the three vectors are valuated.
iTol
geometrical tolerance to decide if the set of points are in the affine support
iweights
array of weights of the Points in the Set used to compute an inertial matrix and the centre of mass.
o ComputeAffineSupport
public HRESULT ComputeAffineSupport(CATMathPoint& ioOrigin,
CATMathVector& ioVector1,
CATMathVector& ioVector2,
CATMathVector& ioVector3,
CATMathSetOfPoints::AffineSpace& ioAffineSpace,
double& oDistance,
double iTol,
double* weights= NULL)
Returns the type of the mean affine sub-space generated by this set of points. Note that it does not return the type of the affine space of the smallest dimension passing through the points. The SPACE type is returned in very specific cases. The LINE and POINT types are returned in cases of degeneracy. In a general case, the PLANE type is returned and this is the mean plane which is calculated.
Parameters:
ioAffineSpace
The type of space generated by the set of points. According to it, different types of data are computed:
POINT
Only the ioOrigin is valued.
LINE
The ioOrigin and the ioVector1 are valuated.
PLANE
The ioOrigin and the first two vectors are valuated.
SPACE
The ioOrigin and the three vectors are valuated.
iTol
geometrical tolerance to decide if the set of points are in the affine support
iweights
array of weights of the Points in the Set used to compute an inertial matrix and the centre of mass.
Returns:
E_FAIL if an error occurs , S_OK otherwise.
o DistanceTo
public double DistanceTo( const CATMathPoint& iP,
CATLONG32& ioIndex) const
Returns the distance between a CATMathPoint and this CATMathSetOfPoints.
Parameters:
iP
The point to which the distance is computed.
ioIndex
The index (beginning at 0) of a point of this to which the distance is minimum.
o DistanceTo
public double DistanceTo( const CATMathSetOfPoints* iSetOfPoints2,
CATLONG32& ioIndex1,
CATLONG32& ioIndex2) const
Returns the distance between this CATMathSetOfPoints and another CATMathSetOfPoints.
Parameters:
iSetOfPoints2
The other set of points.
ioIndex1
The index (beginning at 0) of the point of this to which the distance is minimum.
ioIndex2
The index (beginning at 0) of the point of iSetOfPoints2 to which the distance is minimum.
o GetAffineSpace
public void GetAffineSpace(CATMathPoint& ioOrigin,
CATMathVector& ioVector1,
CATMathVector& ioVector2,
CATMathVector& ioVector3,
CATMathSetOfPoints::AffineSpace& ioAffineSpace)
Throws an error if an error occurs Returns the type of the mean affine sub-space generated by this set of points. Note that it does not return the type of the affine space of the smallest dimension passing through the points. The SPACE type is returned in very specific cases. The LINE and POINT types are returned in cases of degeneracy. In a general case, the PLANE type is returned and this is the mean plane which is calculated.
Parameters:
ioAffineSpace
The type of space generated by the set of points. According to it, different types of data are computed:
POINT
Only the ioOrigin is valued.
LINE
The ioOrigin and the ioVector1 are valuated.
PLANE
The ioOrigin and the first two vectors are valuated.
SPACE
The ioOrigin and the three vectors are valuated.
o GetNumberOfPoints
public CATLONG32 GetNumberOfPoints()const
Returns the number of points of this CATMathSetOfPoints.
o GetPoint
public CATMathPoint GetPoint(CATLONG32 iIndexPoint) const
Returns the CATMathPoint locating at a given row and column.
The index iIndexPoint starts at 0.
Use preferently the second method signature if you want to avoid an useless constructor.
o GetPoint
public void GetPoint(CATLONG32 iIndexPoint,
CATMathPoint& ioPoint)
Retrieves the CATMathPoint locating at a index.
The index iIndexPoint starts at 0.
o GetPoints
public CATMathPoint * GetPoints()const
Returns the array of CATMathPoints.
Note that the returned array is used by the CATMathSetOfPoints and must not be deleted.
o SetNumberOfPoints
public void SetNumberOfPoints(CATLONG32 iCountPoints)
Allocates the memory for this CATMathSetOfPoints.
o SetPoint
public void SetPoint( const CATMathPoint& iPoint,
CATLONG32 iIndex)
Initializes the values of a CATMathPoint in the CATMathSetOfPoints.
The index iIndexPoint starts at 0.
o SquareDistanceTo
public double SquareDistanceTo( const CATMathPoint& iP,
CATLONG32& ioIndex) const
Returns the square distance between a CATMathPoint and this CATMathSetOfPoints.
Parameters:
iP
The point to which the distance is computed.
ioIndex
The index (beginning at 0) of the point of this to which the distance is minimum.
o SquareDistanceTo
public double SquareDistanceTo( const CATMathSetOfPoints* iSetOfPoints2,
CATLONG32& ioIndex1,
CATLONG32& ioIndex2) const
Returns the square distance between this CATMathSetOfPoints and another CATMathSetOfPoints.
Parameters:
iSetOfPoints2
The other set of points.
ioIndex1
The index (beginning at 0) of the point of this to which the distance is minimum.
ioIndex2
The index (beginning at 0) of the point of iSetOfPoints2 to which the distance is minimum.

Enumerated Types


o AffineSpace
enum AffineSpace {
  POINT,
  LINE,
  PLANE,
  SPACE
}
Defines the type of space generated by a set of points.
Parameters:
POINT
All the points are at the same position.
LINE
The points are aligned on a line.
PLANE
The points are lying on a plane.
SPACE
The points represent the space .

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

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