Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dominik Mehlich
waLBerla
Commits
ba344f72
Commit
ba344f72
authored
Oct 04, 2019
by
Sebastian Eibl
Browse files
added rotate around point function
parent
cb331d8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/math/RotationFunctions.h
0 → 100644
View file @
ba344f72
//======================================================================================================================
//
// This file is part of waLBerla. waLBerla is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// waLBerla is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
//! \file RotationFunctions.h
//! \author Sebastian Eibl <sebastian.eibl@fau.de>
//
//======================================================================================================================
#pragma once
#include
<core/math/Rot3.h>
#include
<core/math/Vector3.h>
namespace
walberla
{
namespace
math
{
template
<
typename
Type
>
inline
void
rotateAroundPoint
(
Vector3
<
Type
>&
pos
,
Rot3
<
Type
>&
rot
,
const
Vector3
<
Type
>&
rotateAround
,
const
Rot3
<
Type
>&
dRot
)
{
const
auto
dp
=
pos
-
rotateAround
;
pos
=
rotateAround
+
dRot
.
getMatrix
()
*
dp
;
rot
.
rotate
(
dRot
);
}
}
// mpi
}
// walberla
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment