All Frameworks Class Hierarchy This Framework Previous Next Indexes
Mathematics Class CATMathPoint2D
CATMathPoint2D
Usage: you must use this class as is. You should never derive it.
public class CATMathPoint2D
Class representing a mathematical cartesian point in dimension 2.
Constructor and Destructor Index
- o
CATMathPoint2D()
- Constructs a CATMathPoint2D with (0,0) coordinates.
- o
CATMathPoint2D(CATMathPoint2D&)
- Copy constructor.
- o
CATMathPoint2D(double,double)
- Constructs a CATMathPoint2D from 2 coordinates.
- o
CATMathPoint2D(double[])
- Constructs a CATMathPoint2D from an array of 2 coordinates.
Method Index
- o
DistanceTo(CATMathPoint2D&)
- Returns the distance this CAMathPoint2D and another CATMathPoint2D.
- o
GetCoord(double&,double&)
- Retrieves the coordinates of this CATMathPoint2D.
- o
GetCoord(double[])
- Retrieves the coordinates of this CATMathPoint2D in an array of 2 doubles.
- o
GetX()
- Returns the X coordinate of this CATMathPoint2D.
- o
GetY()
- Returns the Y coordinate of this CATMathPoint2D.
- o
SetCoord(double,double)
- Modifies the coordinates of this CATMathPoin2D from 2 doubles.
- o
SetCoord(double[])
- Modifies the coordinates of this CATMathPoint2D from an array of 2 values.
- o
SetX(double)
- Modifies the X coordinate of this CATMathPoint2D.
- o
SetY(double)
- Modifies the Y coordinate of this CATMathPoint2D.
- o
SquareDistanceTo(CATMathPoint2D&)
- Returns the square distance between this CAMathPoint2D and another CATMathPoint2D.
- o
operator *(double)
- Defines the right side scalar multiplication.
- o
operator *(double,CATMathPoint2D&)
- Defines the left side scalar multiplication.
- o
operator +(CATMathVector2D&)
- Translates a CATMathPoint2D by a CATMathVector2D.
- o
operator -(CATMathPoint2D&)
- Builds a CATMathVector2D as the difference of two CATMathPoint2Ds.
- o
operator -(CATMathVector2D&)
- Translates a CATMathPoint2D by a CATMathVector2D.
- o
operator /(double)
- Defines the scalar division.
Constructor and Destructor
o CATMathPoint2D
public INLINE CATMathPoint2D( | ) |
-
Constructs a CATMathPoint2D with (0,0) coordinates.
o CATMathPoint2D
-
Copy constructor.
o CATMathPoint2D
public INLINE CATMathPoint2D( | const double | iX, |
| const double | iY) |
-
Constructs a CATMathPoint2D from 2 coordinates.
o CATMathPoint2D
public CATMathPoint2D( | const double[] | iCoord) |
-
Constructs a CATMathPoint2D from an array of 2 coordinates.
Methods
o DistanceTo
-
Returns the distance this CAMathPoint2D and another CATMathPoint2D.
o GetCoord
public INLINE void GetCoord( | double& | ioX, |
| double& | ioY) const |
-
Retrieves the coordinates of this CATMathPoint2D.
o GetCoord
public void GetCoord( | double[] | iCoord) const |
-
Retrieves the coordinates of this CATMathPoint2D in an array of 2 doubles.
o GetX
-
Returns the X coordinate of this CATMathPoint2D.
o GetY
-
Returns the Y coordinate of this CATMathPoint2D.
o SetCoord
public INLINE void SetCoord( | const double | iX, |
| const double | iY) |
-
Modifies the coordinates of this CATMathPoin2D from 2 doubles.
o SetCoord
public void SetCoord( | const double[] | iCoord) |
-
Modifies the coordinates of this CATMathPoint2D from an array of 2 values.
o SetX
public INLINE void SetX( | const double | iX) |
-
Modifies the X coordinate of this CATMathPoint2D.
o SetY
public INLINE void SetY( | const double | iY) |
-
Modifies the Y coordinate of this CATMathPoint2D.
o SquareDistanceTo
-
Returns the square distance between this CAMathPoint2D and another CATMathPoint2D.
o operator *
-
Defines the right side scalar multiplication.
- Parameters:
-
- iPoint
- The CATMathPoint2D of (p1,p2,p3) coordinates.
- iScalar
- The scalar.
- Returns:
- The CATMathPoint2D of (p1*iScalar,p2*iScalar,p3*iScalar) coordinates.
o operator *
-
Defines the left side scalar multiplication.
- Parameters:
-
- iScalar
- The scalar.
- iPoint
- The CATMathPoint2D of (p1,p2,p3) coordinates.
- Returns:
- The CATMathPoint2D of (iScalar*p1,iScalar*p2,iScalar*p3) coordinates.
o operator +
-
Translates a CATMathPoint2D by a CATMathVector2D.
- Parameters:
-
- iPoint
- The CATMathPoint2D of (p1,p2) coordinates.
- iVector
- The CATMathVector2D of (u1,u2) coordinates.
- Returns:
- The CATMathPoint2D of (p1+u1,p2+u2) coordinates.
o operator -
-
Builds a CATMathVector2D as the difference of two CATMathPoint2Ds.
Note that the iPoint1iPoint2 vector is given by iPoint2-iPoint1.
- Parameters:
-
- iPoint1
- The CATMathPoint2D of (p1,p2) coordinates.
- iPoint2
- The CATMathPoint2D of (q1,q2) coordinates.
- Returns:
- The CATMathVector2D of (p1-q1,p2-q2) coordinates.
o operator -
-
Translates a CATMathPoint2D by a CATMathVector2D.
- Parameters:
-
- iPoint
- The CATMathPoint2D of (p1,p2) coordinates.
- iVector
- The CATMathVector2D of (u1,u2) coordinates.
- Returns:
- The CATMathPoint2D of (p1-u1,p2-u2) coordinates.
o operator /
-
Defines the scalar division.
- Parameters:
-
- iPoint
- The CATMathPoint2D of (p1,p2,p3) coordinates.
- iScalar
- The scalar.
- Returns:
- The CATMathPoint2D of (p1/iScalar,p2/iScalar,p3/iScalar) coordinates.
This object is included in the file: CATMathPoint2D.h
If needed, your Imakefile.mk should include the module: CATMathematics