Mathematics CATMathPoint

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


public class CATMathPoint

Class representing a mathematical cartesian point in dimension 3.

Mathematical points are mostly used as results of evaluation methods on curves and surfaces.


Constructor and Destructor Index


o CATMathPoint()
Constructs a CATMathPoint with (0,0,0) coordinates.
o CATMathPoint(double[])
Constructs a CATMathPoint from an array of 3 coordinates.
o CATMathPoint(CATMathPoint&)
Copy constructor.
o CATMathPoint(double,double,double)
Constructs a CATMathPoint from coordinates.

Method Index


o DistanceTo(CATMathPoint&)
Returns the distance between this CATMathPoint and another CATMathPoint.
o DistanceTo(CATMathPoint[],int,int&)
Returns the distance between this CATMathPoint and an array of CATMathPoints.
o Dump(ostream*)
Dumps the coordinates of a CATMathPoint.
o GetCoord(double[])
Retrieves the coordinates of a CATMathPoint in an array of 3 doubles.
o GetCoord(double&,double&,double&)
Retrieves the coordinates of this CATMathPoint.
o GetCylindricalCoord(double&,CATAngle&,double&)
Retrieves this CATMathPoint in its cylindrical coordinates.
o GetSphericalCoord(double&,CATAngle&,CATAngle&)
Retrieves this CATMathPoint in its spherical coordinates.
o GetX()
Returns the X coordinate of this CATMathPoint.
o GetY()
Returns the Y coordinate of this CATMathPoint.
o GetZ()
Returns the Z coordinate of this CATMathPoint.
o SetCoord(double[])
Modifies the coordinates of this CATMathPoint from an array of 3 doubles.
o SetCoord(double,double,double)
Modifies the coordinates of this CATMathPoint from 3 doubles.
o SetCylindricalCoord(double,CATAngle,double)
Modifies this CATMathPoint with its cylindrical coordinates.
o SetSphericalCoord(double,CATAngle,CATAngle)
Modifies this CATMathPoint with its spherical coordinates.
o SetX(double)
Modifies the X coordinate of this CATMathPoint.
o SetY(double)
Modifies the Y coordinate of this CATMathPoint.
o SetZ(double)
Modifies the Z coordinate of this CATMathPoint.
o SquareDistanceTo(CATMathPoint&)
Returns the square distance between this CATMathPoint and another CATMathPoint.
o SquareDistanceToOrigin()
Returns the square distance between this CATMathPoint and the origin.
o operator *(double,CATMathPoint&)
Defines the left side scalar multiplication.
o operator *(CATMathPoint&,double)
Defines the right side scalar multiplication.
o operator +(CATMathPoint&,CATMathVector&)
Translates a CATMathPoint by a CATMathVector.
o operator +=(CATMathPoint&,CATMathVector&)
Translates a CATMathPoint by a CATMathVector.
o operator -(CATMathPoint&,CATMathPoint&)
Builds a CATMathVector as the difference of two CATMathPoints.
o operator -(CATMathPoint&,CATMathVector&)
Translates a CATMathPoint by a CATMathVector.
o operator -=(CATMathPoint&,CATMathVector&)
Translates a CATMathPoint by a CATMathVector.
o operator /(CATMathPoint&,double)
Defines the scalar division.

Constructor and Destructor


o CATMathPoint
public CATMathPoint()
Constructs a CATMathPoint with (0,0,0) coordinates.
o CATMathPoint
public CATMathPoint( const iCoord)
Constructs a CATMathPoint from an array of 3 coordinates.
o CATMathPoint
public CATMathPoint( const iPointToCopy)
Copy constructor.
o CATMathPoint
public CATMathPoint( const iX,
const iY,
const iZ)
Constructs a CATMathPoint from coordinates.

Methods


o DistanceTo
public DistanceTo( const iOtherPoint)
Returns the distance between this CATMathPoint and another CATMathPoint.
o DistanceTo
public DistanceTo( const iOtherPoint,
const iNbPt,
ioIndex)
Returns the distance between this CATMathPoint and an array of CATMathPoints.
Parameters:
iOtherPoint[]
The array of CATMathPoints to which the distance is computed.
iNbPt
The number of points of the array.
ioIndex
The index of the closest point in the iOtherPoint[] array.
o Dump
public Dump( iStream=0L)
Dumps the coordinates of a CATMathPoint.
This writes the following line on the ostream:
( FirstCoord , SecondCoord , ThirdCoord )
Parameters:
iStream
A pointer to the output. If 0L, the method dumps the coordinates on the cout output.
o GetCoord
public GetCoord( iCoord)
Retrieves the coordinates of a CATMathPoint in an array of 3 doubles.
o GetCoord
public GetCoord( ioX,
ioY,
ioZ)
Retrieves the coordinates of this CATMathPoint.
o GetCylindricalCoord
public GetCylindricalCoord( ioRadius,
ioAngle,
ioHeight)
Retrieves this CATMathPoint in its cylindrical coordinates.
ioAngle is expressed in radians.
o GetSphericalCoord
public GetSphericalCoord( oRadius,
ioLongitudeAngle,
ioLatitudeAngle)
Retrieves this CATMathPoint in its spherical coordinates.
ioLongitudeAngle and ioLatitudeAngle are expressed in radians.
o GetX
public GetX()
Returns the X coordinate of this CATMathPoint.
o GetY
public GetY()
Returns the Y coordinate of this CATMathPoint.
o GetZ
public GetZ()
Returns the Z coordinate of this CATMathPoint.
o SetCoord
public SetCoord( const iCoord)
Modifies the coordinates of this CATMathPoint from an array of 3 doubles.
o SetCoord
public SetCoord( const iX,
const iY,
const iZ)
Modifies the coordinates of this CATMathPoint from 3 doubles.
o SetCylindricalCoord
public SetCylindricalCoord( const iRadius,
const iAngle,
const iHeight)
Modifies this CATMathPoint with its cylindrical coordinates.
iAngle is expressed in radians.
o SetSphericalCoord
public SetSphericalCoord( const iRadius,
const iLongitudeAngle,
const iLatitudeAngle)
Modifies this CATMathPoint with its spherical coordinates.
iLongitudeAngle and iLatitudeAngle are expressed in radians.
o SetX
public SetX( const iFirstCoord)
Modifies the X coordinate of this CATMathPoint.
o SetY
public SetY( const iSecondCoord)
Modifies the Y coordinate of this CATMathPoint.
o SetZ
public SetZ( const iThirdCoord)
Modifies the Z coordinate of this CATMathPoint.
o SquareDistanceTo
public SquareDistanceTo( const iOtherPoint)
Returns the square distance between this CATMathPoint and another CATMathPoint.
o SquareDistanceToOrigin
public SquareDistanceToOrigin()
Returns the square distance between this CATMathPoint and the origin.
o operator *
public operator *( const iScalar,
const iPoint)
Defines the left side scalar multiplication.
Parameters:
iScalar
The scalar.
iPoint
The CATMathPoint of (p1,p2,p3) coordinates.
Returns:
The CATMathPoint of (iScalar*p1,iScalar*p2,iScalar*p3) coordinates.
o operator *
public operator *( const iPoint,
const iScalar)
Defines the right side scalar multiplication.
Parameters:
iPoint
The CATMathPoint of (p1,p2,p3) coordinates.
iScalar
The scalar.
Returns:
The CATMathPoint of (p1*iScalar,p2*iScalar,p3*iScalar) coordinates.
o operator +
public operator +( const iPoint,
const iVector)
Translates a CATMathPoint by a CATMathVector.
Parameters:
iPoint
The CATMathPoint of (p1,p2,p3) coordinates.
iVector
The CATMathVector of (u1,u2,u3) coordinates.
Returns:
The CATMathPoint of (p1+u1,p2+u2,p3+u3) coordinates.
o operator +=
public operator +=( iPoint,
const iVector)
Translates a CATMathPoint by a CATMathVector.
Parameters:
iPoint
The CATMathPoint of (p1,p2,p3) coordinates.
iVector
The CATMathVector of (u1,u2,u3) coordinates.
Returns:
The CATMathPoint of (p1=p1+u1,p2=p2+u2,p3=p3+u3) coordinates.
o operator -
public operator -( const iPoint1,
const iPoint2)
Builds a CATMathVector as the difference of two CATMathPoints.
Note that the iPoint1iPoint2 vector is given by iPoint2-iPoint1.
Parameters:
iPoint1
The CATMathPoint of (p1,p2,p3) coordinates.
iPoint2
The CATMathPoint of (q1,q2,q3) coordinates.
Returns:
The CATMathVector of (p1-q1,p2-q2,p3-q3) coordinates.
o operator -
public operator -( const iPoint,
const iVector)
Translates a CATMathPoint by a CATMathVector.
Parameters:
iPoint
The CATMathPoint of (p1,p2,p3) coordinates,
iVector
The CATMathVector of (u1,u2,u3) coordinates,
Returns:
The CATMathPoint of (p1-u1,p2-u2,p3-u3) coordinates.
o operator -=
public operator -=( iPoint,
const iVector)
Translates a CATMathPoint by a CATMathVector.
Parameters:
iPoint
The CATMathPoint of (p1,p2,p3) coordinates,
iVector
The CATMathVector of (u1,u2,u3) coordinates,
Returns:
The CATMathPoint of (p1=p1-u1,p2=p2-u2,p3=p3-u3) coordinates.
o operator /
public operator /( const iPoint,
const iScalar)
Defines the scalar division.
Parameters:
iPoint
The CATMathPoint of (p1,p2,p3) coordinates.
iScalar
The scalar.
Returns:
The CATMathPoint of (p1/iScalar,p2/iScalar,p3/iScalar) coordinates.

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

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.