All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Mathematics Class CATMathAxis

CATMathAxis
 

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


public class CATMathAxis

Class representing a mathematical axis system in dimension 3.
Role:
It is composed of an Origin, and of three directions (normalized vectors) FirstDirection, SecondDirection, ThirdDirection. If the three directions are not directly orthogonal or normalized, it will be done internally.


Constructor and Destructor Index


o CATMathAxis()
Constructs a canonical CATMathAxis.
o CATMathAxis(CATMathAxis&)
Copy constructor.
o CATMathAxis(CATMathPoint&)
Constructs a CATMathAxis from a CATMathPoint and the three CATMathVector: CATMathI, CATMathJ and CATMathK.
o CATMathAxis(CATMathPoint&,CATMathVector&)
Constructs a CATMathAxis from a CATMathPoint and a CATMathVector specified as the first direction.
o CATMathAxis(CATMathPoint&,CATMathVector&,CATMathVector&)
Constructs a CATMathAxis from a CATMathPoint and two CATMathVector specified as the first and second directions.
o CATMathAxis(CATMathPoint&,CATMathVector&,CATMathVector&,CATMathVector&)
Constructs a CATMathAxis from a CATMathPoint and three CATMathVector.

Method Index


o Dump(ostream*)
Dumps this CATMathAxis.
o GetDirections(CATMathVector&,CATMathVector&,CATMathVector&)
Retrieves the three directions of this CATMathAxis.
o GetFirstDirection()
Returns the first (normalized) direction of this CATMathAxis.
o GetFirstDirection(CATMathVector&)
Returns the first (normalized) direction of this CATMathAxis.
o GetOrigin()
Returns the origin of this CATMathAxis.
o GetOrigin(CATMathPoint&)
Returns the origin of this CATMathAxis.
o GetSecondDirection()
Returns the second (normalized) direction of this CATMathAxis.
o GetSecondDirection(CATMathVector&)
Returns the second (normalized) direction of this CATMathAxis.
o GetThirdDirection()
Returns the third (normalized) direction of this CATMathAxis.
o GetThirdDirection(CATMathVector&)
Returns the third (normalized) direction of this CATMathAxis.
o Set(CATMathPoint&,CATMathVector&,CATMathVector&,CATMathVector&)
Modifies the origin and the directions of this CATMathAxis.
o SetDirections(CATMathVector&,CATMathVector&,CATMathVector&)
o SetOrigin(CATMathPoint&)
Modifies the origin of this CATMathAxis.
o SetVectors(CATMathVector&,CATMathVector&,CATMathVector&)
Modifies the directions of this CATMathAxis.

Constructor and Destructor


o CATMathAxis
public CATMathAxis()
Constructs a canonical CATMathAxis.
Origin= (0,0,0), FirstDirection = (1,0,0), SecondDirection = (0,1,0), ThirdDirection= (0,0,1).
o CATMathAxis
public CATMathAxis( const CATMathAxis& iAxisToCopy)
Copy constructor.
o CATMathAxis
public CATMathAxis( const CATMathPoint& P)
Constructs a CATMathAxis from a CATMathPoint and the three CATMathVector: CATMathI, CATMathJ and CATMathK.

CATMathI is the (1,0,0) CATMathVector
CATMathJ is the (0,1,0) CATMathVector
CATMathK is the (0,0,1) CATMathVector

Parameters:
P
The point used as the axis origin.
o CATMathAxis
public CATMathAxis( const CATMathPoint& P,
const CATMathVector& I)
Constructs a CATMathAxis from a CATMathPoint and a CATMathVector specified as the first direction.

The second and third directions are: CATMathJ and CATMathK.

Parameters:
P
The point used as the axis origin.
I
The CATMathVector used as the first direction.
o CATMathAxis
public CATMathAxis( const CATMathPoint& P,
const CATMathVector& I,
const CATMathVector& J)
Constructs a CATMathAxis from a CATMathPoint and two CATMathVector specified as the first and second directions.

The third direction is CATMathK.

Parameters:
P
The point used as the axis origin.
I
The CATMathVector used as the first direction.
J
The CATMathVector used as the second direction.
o CATMathAxis
public CATMathAxis( const CATMathPoint& P,
const CATMathVector& I,
const CATMathVector& J,
const CATMathVector& K)
Constructs a CATMathAxis from a CATMathPoint and three CATMathVector.

The three vectors must define an axis system (vector null, colinear vectors), but the constructor does not test whether this condition is fulfilled.
The first direction is normalized (if needed) to become the axis first direction.
The axis second direction belongs to the plane defined by the first and decond directions.
The third direction is used to give the orientation of the axis system. Although the input vectors can be not normalized, the resulting axis has three normalized directions.
Throws an error if the three vectors do not define an axis system (vector null, colinear vectors).

Parameters:
P
The point used as the axis origin.
I
The CATMathVector used as the first direction.
J
The CATMathVector used as the second direction.
K
The CATMathVector used as the third direction.

Methods


o Dump
public void Dump(ostream* iStream=0L) const
Dumps this CATMathAxis.
This writes the following lines on the ostream:
 Origin    = ( OriginFirstCoord    , OriginSecondCoord    , OriginThirdCoord )
 FirstDir  = ( FirstDirFirstCoord  , FirstDirSecondCoord  , FirstDirThirdCoord )
 SecondDir = ( SecondDirFirstCoord , SecondDirSecondCoord , SecondDirThirdCoord )
 ThirdDir  = ( ThirdDirFirstCoord  , ThirdDirSecondCoord  , ThirdDirThirdCoord )
Parameters:
iStream
A pointer to the output. If 0L, the method dumps the coordinates on the cout output.
o GetDirections
public void GetDirections(CATMathVector& ioFirstDirection,
CATMathVector& ioSecondDirection,
CATMathVector& ioThirdDirection) const
Retrieves the three directions of this CATMathAxis.
The returned vectors are normalized.
o GetFirstDirection
public CATMathDirection GetFirstDirection()const
Returns the first (normalized) direction of this CATMathAxis. The signature which returns the CATMathDirection as an output argument should be preferably used.
o GetFirstDirection
public void GetFirstDirection(CATMathVector& ioFirstDirection) const
Returns the first (normalized) direction of this CATMathAxis.
o GetOrigin
public CATMathPoint GetOrigin()const
Returns the origin of this CATMathAxis. The signature which returns the CATMathPoint as an output argument should be preferably used.
o GetOrigin
public void GetOrigin(CATMathPoint& ioOrigin) const
Returns the origin of this CATMathAxis.
o GetSecondDirection
public CATMathDirection GetSecondDirection()const
Returns the second (normalized) direction of this CATMathAxis. The signature which returns the CATMathDirection as an output argument should be preferably used.
o GetSecondDirection
public void GetSecondDirection(CATMathVector& ioSecondDirection) const
Returns the second (normalized) direction of this CATMathAxis.
o GetThirdDirection
public CATMathDirection GetThirdDirection()const
Returns the third (normalized) direction of this CATMathAxis. The signature which returns the CATMathDirection as an output argument should be preferably used.
o GetThirdDirection
public void GetThirdDirection(CATMathVector& ioThirdDirection) const
Returns the third (normalized) direction of this CATMathAxis.
o Set
public HRESULT Set( const CATMathPoint& P,
const CATMathVector& DV1,
const CATMathVector& DV2,
const CATMathVector& DV3)
Modifies the origin and the directions of this CATMathAxis.
iFirstDirection is normalized (if needed) to become the axis first direction. The axis second direction belongs to the plane (iFirstDirection, iSecondDirection). iThirdDirection is used to give the orientation of the axis system. Although the input vectors can be not normalized, the resulting axis has three normalized directions.
Returns:
E_FAIL if the three vectors do not define an axis system (vector null, colinear vectors), S_OK otherwise.
o SetDirections
public CATBoolean SetDirections( const CATMathVector& iFirstDirection,
const CATMathVector& iSecondDirection,
const CATMathVector& iThirdDirection)
Deprecated:
V5R15 SetVectors Modifies the directions of this CATMathAxis.
iFirstDirection is normalized (if needed) to become the axis first direction. The axis second direction belongs to the plane (iFirstDirection, iSecondDirection). iThirdDirection is used to give the orientation of the axis system. Although the input vectors can be not normalized, the resulting axis has three normalized directions.
Returns:
FALSE if the three vectors do not define an axis system (vector null, colinear vectors), TRUE otherwise.
o SetOrigin
public void SetOrigin( const CATMathPoint& iOrigin)
Modifies the origin of this CATMathAxis.
o SetVectors
public HRESULT SetVectors( const CATMathVector& DV1,
const CATMathVector& DV2,
const CATMathVector& DV3)
Modifies the directions of this CATMathAxis.
iFirstDirection is normalized (if needed) to become the axis first direction. The axis second direction belongs to the plane (iFirstDirection, iSecondDirection). iThirdDirection is used to give the orientation of the axis system. Although the input vectors can be not normalized, the resulting axis has three normalized directions.
Returns:
E_FAIL if the three vectors do not define an axis system (vector null, colinear vectors), S_OK otherwise.

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

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