Simbody
3.6
Orientation.h
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
// File: Orientation.h
3
// Class: None
4
// Parent: None
5
// Purpose: Includes UnitVec3, Quaternion, Rotation, Transform, and related classes
6
//-----------------------------------------------------------------------------
7
#ifndef SimTK_SIMMATRIX_ORIENTATION_H_
8
#define SimTK_SIMMATRIX_ORIENTATION_H_
9
10
/* -------------------------------------------------------------------------- *
11
* Simbody(tm): SimTKcommon *
12
* -------------------------------------------------------------------------- *
13
* This is part of the SimTK biosimulation toolkit originating from *
14
* Simbios, the NIH National Center for Physics-Based Simulation of *
15
* Biological Structures at Stanford, funded under the NIH Roadmap for *
16
* Medical Research, grant U54 GM072970. See https://simtk.org/home/simbody. *
17
* *
18
* Portions copyright (c) 2005-12 Stanford University and the Authors. *
19
* Authors: Michael Sherman *
20
* Contributors: *
21
* *
22
* Licensed under the Apache License, Version 2.0 (the "License"); you may *
23
* not use this file except in compliance with the License. You may obtain a *
24
* copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
25
* *
26
* Unless required by applicable law or agreed to in writing, software *
27
* distributed under the License is distributed on an "AS IS" BASIS, *
28
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
29
* See the License for the specific language governing permissions and *
30
* limitations under the License. *
31
* -------------------------------------------------------------------------- */
32
40
//-----------------------------------------------------------------------------
41
#include "
SimTKcommon/internal/common.h
"
42
#include "
SimTKcommon/SmallMatrix.h
"
43
#include "
SimTKcommon/internal/UnitVec.h
"
44
#include "
SimTKcommon/internal/Quaternion.h
"
45
#include "
SimTKcommon/internal/Rotation.h
"
46
#include "
SimTKcommon/internal/Transform.h
"
47
//-----------------------------------------------------------------------------
48
#include <iosfwd>
// Forward declaration of iostream
49
//-----------------------------------------------------------------------------
50
51
//-----------------------------------------------------------------------------
52
// Some handy conversion constants.
53
// Use templatized inline conversion routines instead whenever possible.
54
// These are defined so that you can multiply by them. For example, if you have
55
// an angle qRad in radians and want to convert to degrees, write qDeg = qRad*SimTK_RTD.
56
// Note that the expressions here will always be evaluated at compile time, yielding
57
// long double results which you can cast to smaller sizes if you want.
58
//-----------------------------------------------------------------------------
59
#define SimTK_RTD (180/SimTK_PI)
60
#define SimTK_DTR (SimTK_PI/180)
61
62
//-----------------------------------------------------------------------------
63
namespace
SimTK
{
64
65
inline
static
Real
convertRadiansToDegrees
(
const
Real
rad) {
return
rad*
Real
(
SimTK_RTD
); }
66
inline
static
Real
convertDegreesToRadians
(
const
Real
deg) {
return
deg*
Real
(
SimTK_DTR
); }
67
68
69
//------------------------------------------------------------------------------
70
}
// End of namespace SimTK
71
72
//--------------------------------------------------------------------------
73
#endif // SimTK_SIMMATRIX_ORIENTATION_H_
74
//--------------------------------------------------------------------------
UnitVec.h
common.h
Transform.h
SimTK
This is a System that represents the dynamics of a particle moving along a smooth surface.
Definition:
Assembler.h:37
Rotation.h
SimTK_DTR
#define SimTK_DTR
Definition:
Orientation.h:60
SimTK::convertDegreesToRadians
static Real convertDegreesToRadians(const Real deg)
Definition:
Orientation.h:66
SmallMatrix.h
Quaternion.h
SimTK::Real
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition:
SimTKcommon/include/SimTKcommon/internal/common.h:606
SimTK_RTD
#define SimTK_RTD
Definition:
Orientation.h:59
SimTK::convertRadiansToDegrees
static Real convertRadiansToDegrees(const Real rad)
Definition:
Orientation.h:65
SimTKcommon
Mechanics
include
SimTKcommon
Orientation.h
Generated on Mon Apr 25 2022 14:03:04 for Simbody by
1.8.17