All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Mathematics Class CATMathPlane

CATMathPlane
 

Usage: you must use this class as is. You should never derive it.


public class CATMathPlane

Class representing a mathematical plane in 3D.

It is composed of an Origin and of two normalized vectors FirstDirection and SecondDirection.


Constructor and Destructor Index


o CATMathPlane()
Constructs a plane where Origin=(0,0,0), FirstDirection=(1,0,0) and SecondDirection=(0,1,0) .
o CATMathPlane(CATMathPlane&)
Copy constructor.
o CATMathPlane(CATMathPoint&,CATMathPoint&,CATMathPoint&)
o CATMathPlane(CATMathPoint&,CATMathVector&)
Constructs a plane from a point and a normal.
o CATMathPlane(CATMathPoint&,CATMathVector&,CATMathVector&)

Method Index


o DistanceTo(CATMathPoint&)
Returns the distance between this CATMathPlane and a CATMathPoint.
o Dump(ostream*)
Dumps this CATMathPlane.
o EvalPoint(double,double)
Returns the point of this CATMathPlane corresponding to given parameters.
o EvalPoint(double,double,CATMathPoint&)
Returns the point of this CATMathPlane corresponding to given parameters.
o GetDirections(CATMathVector&,CATMathVector&)
Retrieves the orthonormalized directions of this CATMathPlane.
o GetFirstDirection()
Retrieves the first (normalized) direction of this CATMathPlane.
o GetFirstDirection(CATMathVector&)
Retrieves the first (normalized) direction of this CATMathPlane.
o GetNormal()
Retrieves the (normalized) normal to this CATMathPlane.
o GetNormal(CATMathVector&)
Retrieves the (normalized) normal to this CATMathPlane.
o GetOrigin()
Retrieves the origin of this CATMathPlane.
o GetOrigin(CATMathPoint&)
Retrieves the origin of this CATMathPlane.
o GetSecondDirection()
Retrieves the fisecondrst (normalized) direction of this CATMathPlane.
o GetSecondDirection(CATMathVector&)
Retrieves the second (normalized) direction of this CATMathPlane.
o Intersect(CATMathLine&,double&,double&,double&,double)
Intersects this CATMathPlane with a CATMathLine.
o Intersect(CATMathPlane&,CATMathLine&)
Intersects this CATMathPlane with another one.
o Project(CATMathPoint&,CATMathPoint&)
Returns the projection of a CATMathPoint on a CATMathPlane.
o Project(CATMathPoint&,double&,double&)
Retrieves the projection of a CATMathPoint on a CATMathPlane.
o Set(CATMathPoint&,CATMathPoint&,CATMathPoint&)
Constructs a plane passing through three points.
o Set(CATMathPoint&,CATMathVector&,CATMathVector&)
Constructs a plane from a point and two vectors.
o SetDirections(CATMathVector&,CATMathVector&)
o SetOrigin(CATMathPoint&)
Modifies the origin of this CATMathPlane.
o SetVectors(CATMathVector&,CATMathVector&)
Modifies the directions of this CATMathPlane.

Constructor and Destructor


o CATMathPlane
public CATMathPlane()
Constructs a plane where Origin=(0,0,0), FirstDirection=(1,0,0) and SecondDirection=(0,1,0) .
o CATMathPlane
public CATMathPlane( const CATMathPlane& iPlaneToCopy)
Copy constructor.
o CATMathPlane
public CATMathPlane( const CATMathPoint& iOrigin,
const CATMathPoint& iSecondPoint,
const CATMathPoint& iThirdPoint)
Deprecated:
V5R15 Set Constructs a plane passing through three points.
Throws an error if the three points are aligned.
o CATMathPlane
public CATMathPlane( const CATMathPoint& iOrigin,
const CATMathVector& iNormal)
Constructs a plane from a point and a normal.
The normal must not be null, but this is not checked.
o CATMathPlane
public CATMathPlane( const CATMathPoint& iOrigin,
const CATMathVector& iFirstDirection,
const CATMathVector& iSecondDirection)
Deprecated:
V5R15 Set Constructs a plane from a point and two vectors.
Throws an error if the input vectors are colinear. The input vectors are used to compute the normalized and orthogonal directions of the plane.

Methods


o DistanceTo
public double DistanceTo( const CATMathPoint& iPoint) const
Returns the distance between this CATMathPlane and a CATMathPoint.
o Dump
public void Dump(ostream* iStream=0L) const
Dumps this CATMathPlane.
This writes the following lines on the ostream:
 Origin    = ( OriginFirstCoord    , OriginSecondCoord    , OriginThirdCoord )
 FirstDir  = ( FirstDirFirstCoord  , FirstDirSecondCoord  , FirstDirThirdCoord )
 SecondDir = ( SecondDirFirstCoord , SecondDirSecondCoord , SecondDirThirdCoord )
Parameters:
iStream
A pointer to the output. If 0L, the method dumps the coordinates on the cout output.
o EvalPoint
public CATMathPoint EvalPoint( const double iBid1,
const double iBid2) const
Returns the point of this CATMathPlane corresponding to given parameters. You should use preferably the
EvalPoint(const double iParam1, const double iParam2, CATMathPoint & ioResult
signature.
o EvalPoint
public void EvalPoint( const double iParam1,
const double iParam2,
CATMathPoint& ioResult) const
Returns the point of this CATMathPlane corresponding to given parameters.
Returns:
ioResult=Plane.Origin + iParam1 * Plane.FirstDirection + iParam2 * Plane.SecondDirection
o GetDirections
public void GetDirections(CATMathVector& ioFirstDirection,
CATMathVector& ioSecondDirection) const
Retrieves the orthonormalized directions of this CATMathPlane.
o GetFirstDirection
public CATMathDirection GetFirstDirection()const
Retrieves the first (normalized) direction of this CATMathPlane. You should use preferably the
GetFirstDirection (CATMathVector & ioFirstDirection) 
signature.
o GetFirstDirection
public void GetFirstDirection(CATMathVector& ioFirstDirection) const
Retrieves the first (normalized) direction of this CATMathPlane.
o GetNormal
public CATMathDirection GetNormal()const
Retrieves the (normalized) normal to this CATMathPlane. You should use preferably the
GetNormal (CATMathVector & ioNormal)  
signature.
o GetNormal
public void GetNormal(CATMathVector& ioNormal) const
Retrieves the (normalized) normal to this CATMathPlane.
o GetOrigin
public CATMathPoint GetOrigin()const
Retrieves the origin of this CATMathPlane. You should use preferably the
GetOrigin (CATMathPoint & ioOrigin)  
signature.
o GetOrigin
public void GetOrigin(CATMathPoint& ioOrigin) const
Retrieves the origin of this CATMathPlane.
o GetSecondDirection
public CATMathDirection GetSecondDirection()const
Retrieves the fisecondrst (normalized) direction of this CATMathPlane. You should use preferably the
GetSecondDirection (CATMathVector & ioFirstDirection) 
signature.
o GetSecondDirection
public void GetSecondDirection(CATMathVector& ioSecondDirection) const
Retrieves the second (normalized) direction of this CATMathPlane.
o Intersect
public int Intersect( const CATMathLine& iLine,
double& ioParamOnLine,
double& ioFirstParamOnPlane,
double& ioSecondParamOnPlane,
double iTol=CATGetDefaultTolerance().EpsgForRelativeTest())const
Intersects this CATMathPlane with a CATMathLine.
Parameters:
iLine
The CATMathLine to intersect.
ioParamOnLine
The parameter of the intersection on the line.
ioFirstParamOnThis
The parameter of the intersection on this CATMathPlane.
ioSecondParamOnThis
The parameter of the intersection on the second direction of this CATMathPlane.
iTol
The default tolerance.
Returns:
0
if there is no intersection
1
if there is an intersection
2
if the line is included in the plane
o Intersect
public int Intersect( const CATMathPlane& iOtherPlane,
CATMathLine& ioIntersectionLine) const
Intersects this CATMathPlane with another one.
Parameters:
iOtherPlane
The other CATMathPlane to intersect.
ioIntersectionLine
The resulting CATMathLine.
Returns:
0
if there is no intersection
1
if there is an intersection
2
if they are identical
o Project
public void Project( const CATMathPoint& iPointToProject,
CATMathPoint& ioResult) const
Returns the projection of a CATMathPoint on a CATMathPlane.
o Project
public void Project( const CATMathPoint& iPointToProject,
double& ioFirstParamOnPlane,
double& ioSecondParamOnPLane) const
Retrieves the projection of a CATMathPoint on a CATMathPlane.
Parameters:
ioFirstParamOnPlane
The parameter of the projection on the first direction of the plane.
ioSecondParamOnPlane
The parameter of the projection on second direction of the plane.
o Set
public HRESULT Set( const CATMathPoint& iOrigin,
const CATMathPoint& iSecondPoint,
const CATMathPoint& iThirdPoint)
Constructs a plane passing through three points.
Returns:
E_FAIL if the three points are aligned, S_OK otherwise.
o Set
public HRESULT Set( const CATMathPoint& iOrigin,
const CATMathVector& iFirstDirection,
const CATMathVector& iSecondDirection)
Constructs a plane from a point and two vectors. The input vectors are used to compute the normalized and orthogonal directions of the plane.
Returns:
E_FAIL if the input vectors are colinear, S_OK otherwise.
o SetDirections
public CATBoolean SetDirections( const CATMathVector& iFirstDirection,
const CATMathVector& iSecondDirection)
Deprecated:
V5R15 SetVectors Modifies the directions of this CATMathPlane.
Throws an error if the new directions are colinear.
Returns:
FALSE if the new directions are colinear, TRUE otherwise.
o SetOrigin
public void SetOrigin( const CATMathPoint& iOrigin)
Modifies the origin of this CATMathPlane.
o SetVectors
public HRESULT SetVectors( const CATMathVector& iFirstDirection,
const CATMathVector& iSecondDirection)
Modifies the directions of this CATMathPlane.
Returns:
E_FAIL if the new directions are colinear, S_OK otherwise.

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

Copyright © 2003, Dassault Systèmes. All rights reserved.