All Frameworks Class Hierarchy This Framework Previous Next Indexes
Mathematics Class CATMathPoint
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(CATMathPoint&)
- Copy constructor.
- o
CATMathPoint(double,double,double)
- Constructs a CATMathPoint from coordinates.
- o
CATMathPoint(double[])
- Constructs a CATMathPoint from an array of 3 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&,double&,double&)
- Retrieves the coordinates of this CATMathPoint.
- o
GetCoord(double[])
- Retrieves the coordinates of a CATMathPoint in an array of 3 doubles.
- 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,double,double)
- Modifies the coordinates of this CATMathPoint from 3 doubles.
- o
SetCoord(double[])
- Modifies the coordinates of this CATMathPoint from an array of 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
operator *(CATMathPoint&,double)
- Defines the right side scalar multiplication.
- o
operator *(double,CATMathPoint&)
- Defines the left 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 INLINE CATMathPoint( | ) |
-
Constructs a CATMathPoint with (0,0,0) coordinates.
o CATMathPoint
-
Copy constructor.
o CATMathPoint
public INLINE CATMathPoint( | const double | iX, |
| const double | iY, |
| const double | iZ) |
-
Constructs a CATMathPoint from coordinates.
o CATMathPoint
public INLINE CATMathPoint( | const double[] | iCoord) |
-
Constructs a CATMathPoint from an array of 3 coordinates.
Methods
o DistanceTo
-
Returns the distance between this CATMathPoint and another CATMathPoint.
o DistanceTo
-
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 void Dump( | ostream* | iStream | =0L) const |
-
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 INLINE void GetCoord( | double& | ioX, |
| double& | ioY, |
| double& | ioZ) const |
-
Retrieves the coordinates of this CATMathPoint.
o GetCoord
public INLINE void GetCoord( | double[] | iCoord) const |
-
Retrieves the coordinates of a CATMathPoint in an array of 3 doubles.
o GetCylindricalCoord
public void GetCylindricalCoord( | double& | ioRadius, |
| CATAngle& | ioAngle, |
| double& | ioHeight) const |
-
Retrieves this CATMathPoint in its cylindrical coordinates.
ioAngle is expressed in radians.
o GetSphericalCoord
public void GetSphericalCoord( | double& | oRadius, |
| CATAngle& | ioLongitudeAngle, |
| CATAngle& | ioLatitudeAngle) const |
-
Retrieves this CATMathPoint in its spherical coordinates.
ioLongitudeAngle and ioLatitudeAngle
are expressed in radians.
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
public INLINE void SetCoord( | const double | iX, |
| const double | iY, |
| const double | iZ) |
-
Modifies the coordinates of this CATMathPoint from 3 doubles.
o SetCoord
public INLINE void SetCoord( | const double[] | iCoord) |
-
Modifies the coordinates of this CATMathPoint from an array of 3 doubles.
o SetCylindricalCoord
public void SetCylindricalCoord( | const double | iRadius, |
| const CATAngle | iAngle, |
| const double | iHeight) |
-
Modifies this CATMathPoint with its cylindrical coordinates.
iAngle is expressed in radians.
o SetSphericalCoord
public void SetSphericalCoord( | const double | iRadius, |
| const CATAngle | iLongitudeAngle, |
| const CATAngle | iLatitudeAngle) |
-
Modifies this CATMathPoint with its spherical coordinates.
iLongitudeAngle and iLatitudeAngle
are expressed in radians.
o SetX
public INLINE void SetX( | const double | iFirstCoord) |
-
Modifies the X coordinate of this CATMathPoint.
o SetY
public INLINE void SetY( | const double | iSecondCoord) |
-
Modifies the Y coordinate of this CATMathPoint.
o SetZ
public INLINE void SetZ( | const double | iThirdCoord) |
-
Modifies the Z coordinate of this CATMathPoint.
o SquareDistanceTo
-
Returns the square distance between this CATMathPoint and another CATMathPoint.
o operator *
-
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 *
-
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 +
-
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 +=
-
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 -
-
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 -
-
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 -=
-
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 /
-
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