All Frameworks Class Hierarchy This Framework Previous Next Indexes
Mathematics Class CATMathLine
Mathematics.CATCGMVirtual
|
+---Mathematics.CATMathCurve
|
+---CATMathLine
Usage: you must use this class as is. You should never derive it.
public class CATMathLine
Class representing an untrimmed 3D mathematical line.
It is composed of an _Origin (CATMathPoint),
a normalized vector _Direction (CATMathVector),
and a scale _Scale.
The parameterization of the CATMathMathLine is defined as follows:
Line(Param) = Line._Origin + Param * Line._Scale * Line._Direction,
where Param is the parameter.
Constructor and Destructor Index
- o
CATMathLine()
- Constructs a CATMathLine passing through (0,0,0), with (1,0,0)
direction .
- o
CATMathLine(CATMathLine&)
- Copy constructor.
- o
CATMathLine(CATMathPoint&,CATMathPoint&)
-
- o
CATMathLine(CATMathPoint&,CATMathVector&)
-
Method Index
- o
DistanceTo(CATMathLine&,double&,double&,int&)
- Returns the distance between two CATMathLines.
- o
DistanceTo(CATMathPoint&)
- Returns the distance between this CATMathLine and a CATMathPoint.
- o
EvalPoint(double)
- Returns the point of this CATMathLine corresponding to a given parameter.
- o
EvalPoint(double,CATMathPoint&)
- Returns the point of this CATMathLine corresponding to a given parameter.
- o
GetDirection()
- Returns the direction of this CATMathLine.
- o
GetDirection(CATMathVector&)
- Returns the direction of this CATMathLine.
- o
GetMathType()
- Returns the mathematical type.
- o
GetOrigin()
- Returns the origin of this CATMathLine.
- o
GetOrigin(CATMathPoint&)
- Returns the origin of this CATMathLine.
- o
GetParam(CATMathPoint&,double*,double,double,double)
- Retrieves the param on this CATMathLine corresponding to a CATMathPoint
inside limitations.
- o
GetScale()
- Returns the scale of this CATMathLine.
- o
Intersect(CATMathLine&,double,double,double,double,double,double&,double&)
- Intersects this CATMathLine with another one.
- o
IsA()
- Returns the class name: CATMathLine.
- o
Project(CATMathPoint&,CATMathPoint&)
- Projects a CATMathPoint on this CATMathLine.
- o
Project(CATMathPoint&,double&)
- Projects a CATMathPoint on this CATMathLine.
- o
ReverseDirection()
- Changes the parameter orientation of this CATMathLine.
- o
Set(CATMathPoint&,CATMathPoint&)
- Constructs from two CATMathPoints.
- o
Set(CATMathPoint&,CATMathVector&)
- Set from a CATMathPoint and a CATMathVector.
- o
SetDirection(CATMathVector&)
-
- o
SetOrigin(CATMathPoint&)
- Modifies the origin of this CATMathLine.
- o
SetScale(double)
- Modifies the scale of this CATMathLine.
- o
SetVector(CATMathVector&)
- Modifies the (normalized) direction of this CATMathLine.
Constructor and Destructor
o CATMathLine
-
Constructs a CATMathLine passing through (0,0,0), with (1,0,0)
direction .
o CATMathLine
-
Copy constructor.
o CATMathLine
-
- Deprecated:
- V5R15 Set
Constructs from two CATMathPoints.
Throws an error if the two points are confused.
o CATMathLine
-
- Deprecated:
- V5R15 Set
Constructs from a CATMathPoint and a CATMathVector.
Throws an error if the vector is null.
Methods
o DistanceTo
public double DistanceTo( | const CATMathLine& | iOtherLine, |
| double& | ioParamOnOtherLine, |
| double& | ioParamOnThisLine, |
| int& | ioDiagnosis) const |
-
Returns the distance between two CATMathLines.
- Parameters:
-
- ioParamOnOtherLine
- The parameter of the point of iOtherLine closest to this CATMathLine.
- ioParamOnThisLine
- Parameter of the point of this CATMathLine closest to iOtherLine.
- ioDiagnosis
-
- 0
- if the lines are parallel (in this case,
oParamOnLine1 and oParamOnLine2
are null).
- 1
- if the lines are not parallel.
- 2
- if the lines are identical (in this case,
oParamOnLine1 and oParamOnLine2
are null).
o DistanceTo
-
Returns the distance between this CATMathLine and a CATMathPoint.
o EvalPoint
-
Returns the point of this CATMathLine corresponding to a given parameter.
The signature which returns the CATMathPoint as an output argument should be preferably used.
o EvalPoint
public void EvalPoint( | const double | iParam, |
| CATMathPoint& | ioResult) const |
-
Returns the point of this CATMathLine corresponding to a given parameter.
- Returns:
- ioResult=Line._Origin + iParam * Line._Scale * Line._Direction
o GetDirection
-
Returns the direction of this CATMathLine. The signature which returns a CATMathDirection in output argument
should be preferably used.
o GetDirection
-
Returns the direction of this CATMathLine.
o GetMathType
-
Returns the mathematical type.
- Returns:
- The CATMathematicType.
o GetOrigin
-
Returns the origin of this CATMathLine. The signature which returns a CATMathPoint in output argument
should be preferably used.
o GetOrigin
-
Returns the origin of this CATMathLine.
o GetParam
public int GetParam( | const CATMathPoint& | iPoint, |
| double* | ioParam, |
| const double | iTol, |
| const double | iStartParam, |
| const double | iEndParam) const |
-
Retrieves the param on this CATMathLine corresponding to a CATMathPoint
inside limitations.
- Parameters:
-
- iPoint
- The CATMathPoint which coordinates are to be transformed as a param.
- ioParam
- The param on this corresponding to iPoint.
- iTol
- The 3D tolerance, defining a tube along the line with two hemispheres at each end.
If the input point is not inside this tube, no parameter is retrieved.
- iStartParam,
- iEndParam The limits, expressed as parameters, to take into account for trimming this CATMathLine.
- Returns:
- The number of parameters that can be evaluated on this point.
- 0
- No parameter corresponds to this point.
- 1
- Only one parameter corresponds to this point.
- 2
- Two parameters correspond to this point.
o GetScale
-
Returns the scale of this CATMathLine.
o Intersect
public int Intersect( | const CATMathLine& | iOtherLine, |
| double | iStartParamOnOtherLine, |
| double | iEndParamOnOtherLine, |
| double | iStartParamOnThis, |
| double | iEndParamOnThis, |
| double | iTol, |
| double& | ioParamOnOtherLine, |
| double& | ioParamOnThisLine) const |
-
Intersects this CATMathLine with another one.
- Parameters:
-
- iOtherLine
- The other CATMathLine to intersect.
- iStartParamOnOtherLine,
- iEndParamOnOtherLine The limits to take into account for iOtherLine.
- iStartParamOnThis,
- iEndParamOnThis The limits to take into account for this CATMathLine.
- ioParamOnLine1
- The parameter of the intersection on iOtherLine.
- ioParamOnLine2
- The parameter of the intersection on this CATMathLine.
- Returns:
-
- 0
- if there is no intersection
- 1
- if there is an intersection
o IsA
-
Returns the class name: CATMathLine.
o Project
-
Projects a CATMathPoint on this CATMathLine.
o Project
public void Project( | const CATMathPoint& | iPointToProject, |
| double& | ioParam) const |
-
Projects a CATMathPoint on this CATMathLine.
o ReverseDirection
public void ReverseDirection( | ) |
-
Changes the parameter orientation of this CATMathLine.
o Set
-
Constructs from two CATMathPoints.
- Returns:
- E_FAIL if the two points are confused, S_OK otherwise.
o Set
-
Set from a CATMathPoint and a CATMathVector.
- Returns:
- E_FAIL if the vector is null, S_OK otherwise.
o SetDirection
-
- Deprecated:
- V5R15 SetVector
Modifies the (normalized) direction of this CATMathLine.
Throws an error if the new direction is null.
- Returns:
- FALSE if the new direction is null, TRUE otherwise.
o SetOrigin
-
Modifies the origin of this CATMathLine.
o SetScale
-
Modifies the scale of this CATMathLine.
- Parameters:
-
- iScale.The
- new scale.
Throws an error if the new scale is null.
- Returns:
- FALSE if the new scale is null, TRUE otherwise.
o SetVector
-
Modifies the (normalized) direction of this CATMathLine.
- Returns:
- E_FAIL if the new direction is null, S_OK otherwise.
This object is included in the file: CATMathLine.h
If needed, your Imakefile.mk should include the module: CATMathematics