All Frameworks Class Hierarchy This Framework Previous Next Indexes
Mathematics Class CATMathLine2D
CATMathLine2D
Usage: you must use this class as is. You should never derive it.
public class CATMathLine2D
Class representing an untrimmed 2D mathematical line.
It is composed of an Origin (CATMathPoint2D),
and a normalized vector Direction (CATMathDirection2D).
Constructor and Destructor Index
- o
CATMathLine2D()
- Constructs a CATMathLine2D, passing through (0,0), with (1,0)
direction.
- o
CATMathLine2D(CATMathLine2D&)
- Copy constructor.
- o
CATMathLine2D(CATMathPoint2D&,CATMathPoint2D&)
-
- o
CATMathLine2D(CATMathPoint2D&,CATMathVector2D&)
-
Method Index
- o
DistanceTo(CATMathPoint2D&)
- Returns the distance between this CATMathLine2D and a CATMathPoint2D.
- o
Dump(ostream*)
- Dumps this CATMathLine2D.
- o
EvalPoint(double)
- Returns the CATMathPoint2D of this CATMathLine2D corresponding to a given
parameter.
- o
EvalPoint(double,CATMathPoint2D&)
- Returns the CATMathPoint2D of this CATMathLine2D corresponding to a given
parameter.
- o
GetDirection()
- Retrieves the (normalized) direction of this CATMathLine2D.
- o
GetDirection(CATMathVector2D&)
- Retrieves the (normalized) direction of this CATMathLine2D.
- o
GetOrigin()
- Returns the origin of this CATMathVector2D.
- o
GetOrigin(CATMathPoint2D&)
- Returns the origin of this CATMathVector2D.
- o
GetScale()
- Returns the scale of this CATMathLine2D.
- o
Intersect(CATMathLine2D&,double&,double&)
- Intersects this CATMathLine2D with another one.
- o
Project(CATMathPoint2D&,CATMathPoint2D&)
- Retrieves the projection of a CATMathPoint2D on this CATMathLine2D.
- o
Project(CATMathPoint2D&,double&)
- Retrieves the projection of a CATMathPoint2D on this CATMathLine2D.
- o
Set(CATMathPoint2D&,CATMathPoint2D&)
- Set from two CATMathPoint2D.
- o
Set(CATMathPoint2D&,CATMathVector2D&)
- Set from a CATMathPoint2D and a CATMathVector2D.
- o
SetDirection(CATMathDirection2D&)
- Modifies the direction of this CATMathLine2D.
- o
SetDirection(CATMathVector2D&)
-
- o
SetOrigin(CATMathPoint2D&)
- Modifies the origin of this CATMathLine2D.
- o
SetScale(double)
- Modifies the scale of this CATMathLine2D.
- o
SetVector(CATMathVector2D&)
- Modifies the direction of this CATMathLine2D.
Constructor and Destructor
o CATMathLine2D
-
Constructs a CATMathLine2D, passing through (0,0), with (1,0)
direction.
o CATMathLine2D
-
Copy constructor.
o CATMathLine2D
-
- Deprecated:
- V5R15 Set
Constructs from two CATMathPoint2D.
Throws an error if the two points are confused.
o CATMathLine2D
-
- Deprecated:
- V5R15 Set
Constructs from a CATMathPoint2D and a CATMathVector2D.
Throws an error if the vector is null.
Methods
o DistanceTo
-
Returns the distance between this CATMathLine2D and a CATMathPoint2D.
o Dump
public void Dump( | ostream* | iStream | =0L) const |
-
Dumps this CATMathLine2D.
This writes the following lines on the ostream:
Origin = ( OriginFirstCoord , OriginSecondCoord )
Direction = ( DirFirstCoord , DirSecondCoord )
- Parameters:
-
- iStream
- A pointer to the output. If 0L, the method dumps the
coordinates on the cout output.
o EvalPoint
-
Returns the CATMathPoint2D of this CATMathLine2D corresponding to a given
parameter. The signature which returns
a CATMathPoint2D as an output argument should be preferably used.
o EvalPoint
-
Returns the CATMathPoint2D of this CATMathLine2D corresponding to a given
parameter.
o GetDirection
-
Retrieves the (normalized) direction of this CATMathLine2D. The signature which returns
a CATMathDirection2D as an output argument should be preferably used.
o GetDirection
-
Retrieves the (normalized) direction of this CATMathLine2D.
o GetOrigin
-
Returns the origin of this CATMathVector2D. The signature which returns
a CATMathPoint2D as an output argument should be preferably used.
o GetOrigin
-
Returns the origin of this CATMathVector2D.
o GetScale
-
Returns the scale of this CATMathLine2D.
o Intersect
public int Intersect( | const CATMathLine2D& | iOtherLine, |
| double& | ioParamOnOtherLine, |
| double& | ioParamOnThis) const |
-
Intersects this CATMathLine2D with another one.
- Parameters:
-
- ioParamOnOtherLine
- Parameter of the intersection point on iLine.
- ioParamOnThis
- Parameter of the intersection point on this CATMathLine2D.
- Returns:
-
- 0
- if there is no intersection
- 1
- if there is an intersection
- 2
- if they are identical
o Project
-
Retrieves the projection of a CATMathPoint2D on this CATMathLine2D.
- Parameters:
-
- iPoint
- The point to project.
- ioResult
- The projected point as a CATMathPoint2D.
o Project
public void Project( | const CATMathPoint2D& | iPoint, |
| double& | ioParamOnLine) const |
-
Retrieves the projection of a CATMathPoint2D on this CATMathLine2D.
- Parameters:
-
- iPoint
- The point to project.
- ioParamOnLine
- The parameter of the projected point on this CATMathLine2D.
o Set
-
Set from two CATMathPoint2D.
- Returns:
- E_FAIL if the two points are confused, S_OK otherwise.
o Set
-
Set from a CATMathPoint2D and a CATMathVector2D.
- Returns:
- E_FAIL if the vector is null, S_OK otherwise.
o SetDirection
-
Modifies the direction of this CATMathLine2D.
The SetVector method should be preferably used.
o SetDirection
-
- Deprecated:
- V5R15 SetVector
Modifies the direction of this CATMathLine2D.
Throws an error if the vector is null.
- Returns:
- FALSE if the new direction is null, TRUE otherwise.
o SetOrigin
-
Modifies the origin of this CATMathLine2D.
o SetScale
-
Modifies the scale of this CATMathLine2D.
- Parameters:
-
- iScale.The
- new scale.
- Returns:
- FALSE if the new scale is null, TRUE otherwise.
o SetVector
-
Modifies the direction of this CATMathLine2D.
and the Length of this CATMathLine2D.
- Returns:
- E_FAIL if the new direction is null, S_OK otherwise.
This object is included in the file: CATMathLine2D.h
If needed, your Imakefile.mk should include the module: CATMathematics