Mathematics 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(CATMathPoint&)
Returns the distance between this CATMathLine and a CATMathPoint.
o DistanceTo(CATMathLine&,double&,double&,int&)
Returns the distance between two CATMathLines.
o EvalPoint(double)
o EvalPoint(double,CATMathPoint&)
Returns the point of this CATMathLine corresponding to a given parameter.
o GetDirection()
o GetDirection(CATMathVector&)
Returns the direction of this CATMathLine.
o GetMathType()
Returns the mathematical type.
o GetOrigin()
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&,double&)
Projects a CATMathPoint on this CATMathLine.
o Project(CATMathPoint&,CATMathPoint&)
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 SetLineDirection(CATMathVector&)
Modifies the (normalized) direction of this CATMathLine.
o SetLineScale(double)
Modifies the scale of this CATMathLine.
o SetOrigin(CATMathPoint&)
Modifies the origin of this CATMathLine.
o SetScale(double)
o SetVector(CATMathVector&)
o SquareDistanceTo(CATMathPoint&)
Returns the square distance between this CATMathLine and a CATMathPoint.

Constructor and Destructor


o CATMathLine
public CATMathLine()
Constructs a CATMathLine passing through (0,0,0), with (1,0,0) direction .
o CATMathLine
public CATMathLine( const iLineToCopy)
Copy constructor.
o CATMathLine
public CATMathLine( const iOrigin,
const iSecondPoint)
Deprecated:
V5R15 Set Constructs from two CATMathPoints.
Throws an error if the two points are confused.
o CATMathLine
public CATMathLine( const iOrigin,
const iVector)
Deprecated:
V5R15 Set Constructs from a CATMathPoint and a CATMathVector.
Throws an error if the vector is null.

Methods


o DistanceTo
public DistanceTo( const iPoint)
Returns the distance between this CATMathLine and a CATMathPoint.
o DistanceTo
public DistanceTo( const iOtherLine,
ioParamOnOtherLine,
ioParamOnThisLine,
ioDiagnosis)
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 EvalPoint
public EvalPoint( const iBid)
Deprecated:
V5R20 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 EvalPoint( const iParam,
ioResult)
Returns the point of this CATMathLine corresponding to a given parameter.
Returns:
ioResult=Line._Origin + iParam * Line._Scale * Line._Direction
o GetDirection
public GetDirection()
Deprecated:
V5R20 GetDirection Returns the direction of this CATMathLine. The signature which returns a CATMathDirection in output argument should be preferably used.
o GetDirection
public GetDirection( ioDirection)
Returns the direction of this CATMathLine.
o GetMathType
public GetMathType()
Returns the mathematical type.
Returns:
The CATMathematicType.
o GetOrigin
public GetOrigin()
Deprecated:
V5R20 GetOrigin Returns the origin of this CATMathLine. The signature which returns a CATMathPoint in output argument should be preferably used.
o GetOrigin
public GetOrigin( ioOrigin)
Returns the origin of this CATMathLine.
o GetParam
public GetParam( const iPoint,
ioParam,
const iTol,
const iStartParam,
const iEndParam)
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
public GetScale()
Returns the scale of this CATMathLine.
o Intersect
public Intersect( const iOtherLine,
iStartParamOnOtherLine,
iEndParamOnOtherLine,
iStartParamOnThis,
iEndParamOnThis,
iTol,
ioParamOnOtherLine,
ioParamOnThisLine)
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
public IsA()
Returns the class name: CATMathLine.
o Project
public Project( const iPointToProject,
ioParam)
Projects a CATMathPoint on this CATMathLine.
o Project
public Project( const iPointToProject,
ioProjectedPoint)
Projects a CATMathPoint on this CATMathLine.
o ReverseDirection
public ReverseDirection()
Changes the parameter orientation of this CATMathLine.
o Set
public Set( const iOrigin,
const iSecondPoint)
Constructs from two CATMathPoints.
Returns:
E_FAIL if the two points are confused, S_OK otherwise.
o Set
public Set( const iOrigin,
const iVector)
Set from a CATMathPoint and a CATMathVector.
Returns:
E_FAIL if the vector is null, S_OK otherwise.
o SetDirection
public SetDirection( const iVector)
Deprecated:
V5R15 SetLineDirection 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 SetLineDirection
public SetLineDirection( const iVector)
Modifies the (normalized) direction of this CATMathLine.
Returns:
E_FAIL if the new direction is null, S_OK otherwise.
o SetLineScale
public SetLineScale( iScale)
Modifies the scale of this CATMathLine.
Parameters:
iScale.
The new scale.
Returns:
E_FAIL if the new scale is null, S_OK otherwise.
o SetOrigin
public SetOrigin( const iOrigin)
Modifies the origin of this CATMathLine.
o SetScale
public SetScale( iScale)
Deprecated:
V5R20 SetLineScale 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
public SetVector( const iVector)
Deprecated:
V5R20 SetLineDirection Modifies the (normalized) direction of this CATMathLine.
Returns:
E_FAIL if the new direction is null, S_OK otherwise.
o SquareDistanceTo
public SquareDistanceTo( const iPoint)
Returns the square distance between this CATMathLine and a CATMathPoint.

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

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