transformPoints, surfaceTransformPoints: Updated quaternion construction from Euler-angles
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2024
This commit is contained in:
@ -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) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -256,7 +256,7 @@ int main(int argc, char *argv[])
|
|||||||
// Convert to radians
|
// Convert to radians
|
||||||
v *= pi/180.0;
|
v *= pi/180.0;
|
||||||
|
|
||||||
quaternion R(v.x(), v.y(), v.z());
|
quaternion R(quaternion::rotationSequence::XYZ, v);
|
||||||
|
|
||||||
Info<< "Rotating points by quaternion " << R << endl;
|
Info<< "Rotating points by quaternion " << R << endl;
|
||||||
points = transform(R, points);
|
points = transform(R, points);
|
||||||
|
|||||||
@ -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) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -149,7 +149,7 @@ int main(int argc, char *argv[])
|
|||||||
// Convert to radians
|
// Convert to radians
|
||||||
v *= pi/180.0;
|
v *= pi/180.0;
|
||||||
|
|
||||||
quaternion R(v.x(), v.y(), v.z());
|
quaternion R(quaternion::rotationSequence::XYZ, v);
|
||||||
|
|
||||||
Info<< "Rotating points by quaternion " << R << endl;
|
Info<< "Rotating points by quaternion " << R << endl;
|
||||||
points = transform(R, points);
|
points = transform(R, points);
|
||||||
|
|||||||
Reference in New Issue
Block a user