mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: construct axisAngleRotation from x/y/z axis enumeration (#863)
- can be helpful for handling rotations within global planes
This commit is contained in:
committed by
Andrew Heather
parent
b6161f413f
commit
53d01c8a0a
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -106,6 +106,22 @@ Foam::coordinateRotations::axisAngle::axisAngle
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::coordinateRotations::axisAngle::axisAngle
|
||||||
|
(
|
||||||
|
const vector::components axis,
|
||||||
|
scalar angle,
|
||||||
|
bool degrees
|
||||||
|
)
|
||||||
|
:
|
||||||
|
coordinateRotation(),
|
||||||
|
axis_(Zero),
|
||||||
|
angle_(angle),
|
||||||
|
degrees_(degrees)
|
||||||
|
{
|
||||||
|
axis_[axis] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::coordinateRotations::axisAngle::axisAngle(const dictionary& dict)
|
Foam::coordinateRotations::axisAngle::axisAngle(const dictionary& dict)
|
||||||
:
|
:
|
||||||
axisAngle
|
axisAngle
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -50,7 +50,7 @@ Note
|
|||||||
The rotation axis will be normalized internally.
|
The rotation axis will be normalized internally.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
axisAngle.C
|
axisAngleRotation.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -111,6 +111,9 @@ public:
|
|||||||
//- Construct from axis and angle
|
//- Construct from axis and angle
|
||||||
axisAngle(const vector& axis, scalar angle, bool degrees);
|
axisAngle(const vector& axis, scalar angle, bool degrees);
|
||||||
|
|
||||||
|
//- Construct from x/y/z axis enumeration and angle
|
||||||
|
axisAngle(const vector::components axis, scalar angle, bool degrees);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
explicit axisAngle(const dictionary& dict);
|
explicit axisAngle(const dictionary& dict);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user