Mathematics 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)
o EvalPoint(double,CATMathPoint2D&)
Returns the CATMathPoint2D of this CATMathLine2D corresponding to a given parameter.
o GetDirection()
o GetDirection(CATMathVector2D&)
Retrieves the (normalized) direction of this CATMathLine2D.
o GetOrigin()
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&,double&)
Retrieves the projection of a CATMathPoint2D on this CATMathLine2D.
o Project(CATMathPoint2D&,CATMathPoint2D&)
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(CATMathVector2D&)
o SetDirection(CATMathDirection2D&)
o SetLineDirection(CATMathVector2D&)
Modifies the direction of this CATMathLine2D.
o SetOrigin(CATMathPoint2D&)
Modifies the origin of this CATMathLine2D.
o SetScale(double)
Modifies the scale of this CATMathLine2D.
o SetVector(CATMathVector2D&)

Constructor and Destructor


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

Methods


o DistanceTo
public DistanceTo( const iPoint)
Returns the distance between this CATMathLine2D and a CATMathPoint2D.
o Dump
public Dump( iStream=0L)
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
public EvalPoint( const iParam)
Deprecated:
V5R20 EvalPoint Use the signature which returns a CATMathPoint2D as an output argument. Returns the CATMathPoint2D of this CATMathLine2D corresponding to a given parameter.
o EvalPoint
public EvalPoint( const iParam,
ioResult)
Returns the CATMathPoint2D of this CATMathLine2D corresponding to a given parameter.
o GetDirection
public GetDirection()
Deprecated:
V5R20 GetDirection Use the signature which returns a CATMathVector2D as an output argument. Retrieves the (normalized) direction of this CATMathLine2D.
o GetDirection
public GetDirection( ioNormalizedVector)
Retrieves the (normalized) direction of this CATMathLine2D.
o GetOrigin
public GetOrigin()
Deprecated:
V5R20 GetOrigin Use the signature which returns a CATMathPoint2D as an output argument. Returns the origin of this CATMathVector2D.
o GetOrigin
public GetOrigin( ioOrigin)
Returns the origin of this CATMathVector2D.
o GetScale
public GetScale()
Returns the scale of this CATMathLine2D.
o Intersect
public Intersect( const iOtherLine,
ioParamOnOtherLine,
ioParamOnThis)
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
public Project( const iPoint,
ioParamOnLine)
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 Project
public Project( const iPoint,
ioResult)
Retrieves the projection of a CATMathPoint2D on this CATMathLine2D.
Parameters:
iPoint
The point to project.
ioResult
The projected point as a CATMathPoint2D.
o Set
public Set( const iOrigin,
const iSecondPoint)
Set from two CATMathPoint2D.
Returns:
E_FAIL if the two points are confused, S_OK otherwise.
o Set
public Set( const iOrigin,
const iVector)
Set from a CATMathPoint2D and a CATMathVector2D.
Returns:
E_FAIL if the vector is null, S_OK otherwise.
o SetDirection
public SetDirection( const iVector)
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 SetDirection
public SetDirection( const iDirection)
Deprecated:
V5R20 SetLineDirection Modifies the direction of this CATMathLine2D.
o SetLineDirection
public SetLineDirection( const iVector)
Modifies the direction of this CATMathLine2D.
and the Length of this CATMathLine2D.
Returns:
E_FAIL if the new direction is null, S_OK otherwise.
o SetOrigin
public SetOrigin( const iOrigin)
Modifies the origin of this CATMathLine2D.
o SetScale
public SetScale( const iScale)
Modifies the scale of this CATMathLine2D.
Parameters:
iScale.The
new scale.
Returns:
FALSE if the new scale is null, TRUE otherwise.
o SetVector
public SetVector( const iVector)
Deprecated:
V5R20 SetLineDirection 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

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