axisAngle Class Reference

A coordinateRotation specified by a rotation axis and a rotation angle about that axis. More...

Inheritance diagram for axisAngle:
Collaboration diagram for axisAngle:

Public Member Functions

 TypeNameNoDebug ("axisAngle")
 Runtime type information. More...
 
 axisAngle ()
 Default construct. Axis = Z, angle = 0. More...
 
 axisAngle (const axisAngle &crot)
 Copy construct. More...
 
 axisAngle (const vector &axis, scalar angle, bool degrees)
 Construct from axis and angle. More...
 
 axisAngle (const vector::components axis, scalar angle, bool degrees)
 Construct from x/y/z axis enumeration and angle. More...
 
 axisAngle (const dictionary &dict)
 Construct from dictionary. More...
 
autoPtr< coordinateRotationclone () const
 Return clone. More...
 
virtual ~axisAngle ()=default
 Destructor. More...
 
virtual void clear ()
 Reset specification. More...
 
virtual tensor R () const
 Calculate and return the rotation tensor calculated from axis and angle. More...
 
virtual void write (Ostream &os) const
 Write information. More...
 
virtual void writeEntry (const word &keyword, Ostream &os) const
 Write dictionary entry. More...
 
- Public Member Functions inherited from coordinateRotation
 TypeNameNoDebug ("coordinateRotation")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, coordinateRotation, dictionary,(const dictionary &dict),(dict))
 
virtual ~coordinateRotation ()=default
 Destructor. More...
 

Static Public Member Functions

static tensor rotation (const vector &axis, const scalar angle, bool degrees=false)
 The rotation tensor for given axis/angle. More...
 
static tensor rotation (const vector::components axis, const scalar angle, bool degrees=false)
 Rotation tensor calculated for given axis and angle. More...
 
- Static Public Member Functions inherited from coordinateRotation
static autoPtr< coordinateRotationNew (const word &modelType, const dictionary &dict)
 Select construct the specified coordinate rotation type. More...
 
static autoPtr< coordinateRotationNew (const dictionary &dict)
 Select construct from dictionary (requires the "type" entry) More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from coordinateRotation
static vector findOrthogonal (const vector &axis)
 Determine best-guess for an orthogonal axis. More...
 

Detailed Description

A coordinateRotation specified by a rotation axis and a rotation angle about that axis.

rotation
{
    type        axisAngle;
    axis        (1 0 0);
    angle       90;
}


Dictionary entries

Property Description Reqd Default
type Type name: axisAngle yes
axis Axis of rotation (vector) yes
angle Rotation angle yes
degrees The angle is in degrees no true
Note
The rotation axis is normalized internally.
Source files

Definition at line 95 of file axisAngleRotation.H.

Constructor & Destructor Documentation

◆ axisAngle() [1/5]

axisAngle ( )

Default construct. Axis = Z, angle = 0.

Definition at line 91 of file axisAngleRotation.C.

◆ axisAngle() [2/5]

axisAngle ( const axisAngle crot)

Copy construct.

Definition at line 100 of file axisAngleRotation.C.

◆ axisAngle() [3/5]

axisAngle ( const vector axis,
scalar  angle,
bool  degrees 
)

Construct from axis and angle.

Definition at line 112 of file axisAngleRotation.C.

◆ axisAngle() [4/5]

axisAngle ( const vector::components  axis,
scalar  angle,
bool  degrees 
)

Construct from x/y/z axis enumeration and angle.

Definition at line 128 of file axisAngleRotation.C.

◆ axisAngle() [5/5]

axisAngle ( const dictionary dict)
explicit

Construct from dictionary.

Definition at line 143 of file axisAngleRotation.C.

◆ ~axisAngle()

virtual ~axisAngle ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeNameNoDebug()

TypeNameNoDebug ( "axisAngle"  )

Runtime type information.

◆ clone()

autoPtr<coordinateRotation> clone ( ) const
inlinevirtual

Return clone.

Implements coordinateRotation.

Definition at line 163 of file axisAngleRotation.H.

◆ rotation() [1/2]

Foam::tensor rotation ( const vector axis,
const scalar  angle,
bool  degrees = false 
)
static

The rotation tensor for given axis/angle.

Definition at line 60 of file axisAngleRotation.C.

References Foam::degToRad(), SphericalTensor< scalar >::I, Foam::mag(), and quaternion::R().

Referenced by axisAngle::rotation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotation() [2/2]

Foam::tensor rotation ( const vector::components  axis,
const scalar  angle,
bool  degrees = false 
)
static

Rotation tensor calculated for given axis and angle.

Definition at line 76 of file axisAngleRotation.C.

References axisAngle::rotation(), and Foam::Zero.

Here is the call graph for this function:

◆ clear()

void clear ( )
virtual

Reset specification.

Implements coordinateRotation.

Definition at line 156 of file axisAngleRotation.C.

References Foam::Zero.

◆ R()

Foam::tensor R ( ) const
virtual

Calculate and return the rotation tensor calculated from axis and angle.

Implements coordinateRotation.

Definition at line 163 of file axisAngleRotation.C.

◆ write()

void write ( Ostream os) const
virtual

Write information.

Implements coordinateRotation.

Definition at line 169 of file axisAngleRotation.C.

References os().

Here is the call graph for this function:

◆ writeEntry()

void writeEntry ( const word keyword,
Ostream os 
) const
virtual

Write dictionary entry.

Implements coordinateRotation.

Definition at line 177 of file axisAngleRotation.C.

References os(), and Foam::type().

Here is the call graph for this function:

The documentation for this class was generated from the following files: