Mathematics 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&)
o CATMathAxis(CATMathPoint&,CATMathVector&,CATMathVector&)
o CATMathAxis(CATMathPoint&,CATMathVector&,CATMathVector&,CATMathVector&)

Method Index


o Dump(ostream*)
Dumps this CATMathAxis.
o GetDirections(CATMathVector&,CATMathVector&,CATMathVector&)
o GetDirections(CATMathVector&,CATMathVector&,CATMathVector&)
Retrieves the three directions of this CATMathAxis.
o GetFirstDirection()
o GetFirstDirection(CATMathVector&)
o GetFirstDirection(CATMathVector&)
Returns the first (normalized) direction of this CATMathAxis.
o GetOrigin()
o GetOrigin(CATMathPoint&)
o GetOrigin(CATMathPoint&)
Returns the origin of this CATMathAxis.
o GetSecondDirection()
o GetSecondDirection(CATMathVector&)
o GetSecondDirection(CATMathVector&)
Returns the second (normalized) direction of this CATMathAxis.
o GetThirdDirection()
o GetThirdDirection(CATMathVector&)
o GetThirdDirection(CATMathVector&)
Returns the third (normalized) direction of this CATMathAxis.
o Set(CATMathPoint&,CATMathVector&)
Modifies the origin and the directions of this CATMathAxis.
o Set(CATMathPoint&,CATMathVector&,CATMathVector&)
Modifies the origin and the directions 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 iAxisToCopy)
Copy constructor.
o CATMathAxis
public CATMathAxis( const 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 P,
const I)
Deprecated:
V5R20 Set 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 P,
const I,
const J)
Deprecated:
V5R20 Set 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 P,
const I,
const J,
const K)
Deprecated:
V5R20 Set 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 second 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 Dump( iStream=0L)
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 GetDirections( ioFirstDirection,
ioSecondDirection,
ioThirdDirection)
o GetDirections
public GetDirections( ioFirstDirection,
ioSecondDirection,
ioThirdDirection)
Retrieves the three directions of this CATMathAxis.
The returned vectors are normalized.
o GetFirstDirection
public GetFirstDirection()
Deprecated:
V5R20 GetFirstDirection 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 GetFirstDirection( ioFirstDirection)
o GetFirstDirection
public GetFirstDirection( ioFirstDirection)
Returns the first (normalized) direction of this CATMathAxis.
o GetOrigin
public GetOrigin()
Deprecated:
V5R20 GetOrigin Returns the origin of this CATMathAxis. The signature which returns the CATMathPoint as an output argument should be preferably used.
o GetOrigin
public GetOrigin( ioOrigin)
o GetOrigin
public GetOrigin( ioOrigin)
Returns the origin of this CATMathAxis.
o GetSecondDirection
public GetSecondDirection()
Deprecated:
V5R20 GetSecondDirection 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 GetSecondDirection( ioSecondDirection)
o GetSecondDirection
public GetSecondDirection( ioSecondDirection)
Returns the second (normalized) direction of this CATMathAxis.
o GetThirdDirection
public GetThirdDirection()
Deprecated:
V5R20 GetThirdDirection 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 GetThirdDirection( ioThirdDirection)
o GetThirdDirection
public GetThirdDirection( ioThirdDirection)
Returns the third (normalized) direction of this CATMathAxis.
o Set
public Set( const P,
const I)
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, CATMathJ). CATMathK 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 Set
public Set( const P,
const DV1,
const DV2)
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). CATMathK 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 Set
public Set( const P,
const DV1,
const DV2,
const 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 SetDirections( const iFirstDirection,
const iSecondDirection,
const 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 SetOrigin( const iOrigin)
Modifies the origin of this CATMathAxis.
o SetVectors
public SetVectors( const DV1,
const DV2,
const 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 © 1999-2014, Dassault Systèmes. All rights reserved.