Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
dda3459f
Commit
dda3459f
authored
11 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: septernion: added slerp
parent
b53fff01
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OpenFOAM/primitives/septernion/septernion.C
+11
-0
11 additions, 0 deletions
src/OpenFOAM/primitives/septernion/septernion.C
src/OpenFOAM/primitives/septernion/septernion.H
+8
-1
8 additions, 1 deletion
src/OpenFOAM/primitives/septernion/septernion.H
with
19 additions
and
1 deletion
src/OpenFOAM/primitives/septernion/septernion.C
+
11
−
0
View file @
dda3459f
...
...
@@ -59,6 +59,17 @@ Foam::word Foam::name(const septernion& s)
}
Foam
::
septernion
Foam
::
slerp
(
const
septernion
&
qa
,
const
septernion
&
qb
,
const
scalar
t
)
{
return
septernion
((
1
.
0
-
t
)
*
qa
.
t
()
+
t
*
qb
.
t
(),
slerp
(
qa
.
r
(),
qb
.
r
(),
t
));
}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
Foam
::
Istream
&
Foam
::
operator
>>
(
Istream
&
is
,
septernion
&
s
)
...
...
This diff is collapsed.
Click to expand it.
src/OpenFOAM/primitives/septernion/septernion.H
+
8
−
1
View file @
dda3459f
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -157,6 +157,13 @@ inline septernion inv(const septernion& tr);
//- Return a string representation of a septernion
word
name
(
const
septernion
&
);
//- Spherical linear interpolation of septernions. 0 for qa, 1 for qb
septernion
slerp
(
const
septernion
&
qa
,
const
septernion
&
qb
,
const
scalar
t
);
//- Data associated with septernion type are contiguous
template
<
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment