|
|
Valtype * | ptr () noexcept |
| | Pointer accessor for direct copying.
|
|
const Valtype * | ptr () const noexcept |
| | Pointer accessor for direct copying.
|
| Frame & | Init (const VectorBundle< Valtype, ValtypeT > &vb, const Vector< ValtypeT > &up) noexcept |
| | Initializes the Frame structure to vb and calculates nor as to be orthogonal to up.
|
| Frame & | Init (const VectorBundle2< Valtype, ValtypeT > &vb2) noexcept |
| | Initializes the Frame structure.
|
|
Frame & | Normalize () noexcept |
| | Makes the vectors unit vectors.
|
|
Frame & | OrthoNormalize () noexcept |
| | Normalizes the vectors preserving the direction of T as is. It then adjusts Nor and Bin in a way to form an orthogonal frame.
|
| bool | IsOrthoNormal (ValtypeT epsilon_length=2 *std::numeric_limits< ValtypeT >::epsilon(), ValtypeT epsilon_angle=2 *std::numeric_limits< ValtypeT >::epsilon()) const noexcept |
| Frame & | TransportTo (Valtype d) noexcept |
| | Moves the Frame by d in direction T.
|
| Frame & | TransportBy (const Vector< Valtype > &v) noexcept |
| | Moves the Frame by v.
|
| Frame & | TransportTo (const Position< Valtype > &p) noexcept |
| | Transport this Frame to p.
|
| Frame & | TransportTan (Valtype d) noexcept |
| | Moves the Frame by d in direction T.
|
| Frame & | TransportNor (Valtype d) noexcept |
| | Moves the Frame by d in direction N.
|
| Frame & | TransportBin (Valtype d) noexcept |
| | Moves the Frame by d in direction B.
|
|
Frame & | FlipTan () noexcept |
| | Rotates the Frame by pi around T.
|
|
Frame & | FlipNor () noexcept |
| | Rotates the Frame by pi around N.
|
|
Frame & | FlipBin () noexcept |
| | Rotates the Frame by pi around B.
|
|
Frame & | Rotate (const Vector< ValtypeT > &nr, ValtypeT angle) noexcept |
| | Rotate the vectors around nr with angle in radiants.
|
|
Frame & | Rotate (const Vector< ValtypeT > &r) noexcept |
| | Rotate the vectors around r with angle r.Length() in radiants.
|
| template<typename Valtype2> |
| Frame & | Rotate (const VectorBundle< Valtype, Valtype2 > &axis) noexcept |
| | Rotates the frame by axis (length of axis.T make angle in radiants).
|
| template<typename Valtype2> |
| Frame & | Rotate (const VectorBundle< Valtype, Valtype2 > &axis, Valtype2 angle) noexcept |
| | Rotates the frame by axis and angle in radiants.
|
| Frame & | RotateTan (ValtypeT angle) noexcept |
| | Rotates the vectors around the tan vector (roll).
|
|
Frame & | RotateTan (const Vector< ValtypeT > &up) noexcept |
| | Brings B as close as possible to up by rotating around T.
|
| Frame & | RotateNor (ValtypeT angle) noexcept |
| | Rotates the vectors around the nor vector (-pitch).
|
| Frame & | RotateBin (ValtypeT angle) noexcept |
| | Rotates the vectors around the bin vector (-yaw).
|
| constexpr bool | Equals (const Frame &frame, Valtype epsilon_length=std::numeric_limits< Valtype >::epsilon(), ValtypeT epsilon_lengthT=std::numeric_limits< ValtypeT >::epsilon()) const noexcept |
| | Comparison within some ranges.
|
|
Frame & | Round (int toDigit) noexcept |
| | Rounds the frames position and vectors to a certain digit after the point.
|
|
template<typename Valtype2> |
| Frame< Valtype, ValtypeT > & | operator= (const Matrix< Valtype2, 4, 4 > &trans) noexcept |
|
template<typename Valtype2> |
| Frame< Valtype, ValtypeT > & | operator= (const Valtype2 *pVal) noexcept |
|
template<typename Valtype2> |
| Frame< Valtype, ValtypeT > & | Rotate (const VectorBundle< Valtype, Valtype2 > &axis) noexcept |
|
template<typename Valtype2> |
| Frame< Valtype, ValtypeT > & | Rotate (const VectorBundle< Valtype, Valtype2 > &axis, Valtype2 angle) noexcept |
- Parameters
-
| vb2 | VectorBundle2 object giving the P,T,N part; B gets computed. |
| vb | VectorBundle object giving the P,T part; N and B get computed. |
| up | Up direction. N gets calculated so that it is perpendicular to this. |
| pos | Position object giving the P part. |
| tan | Vector object giving the T part. |
| nor | Vector object giving the N part. |
| bin | Vector object giving the B part. |
| rot | Rotation object giving the T,N and B part. |
| trans | Transformation object. Compute the Frame so that it is the frame of reference corresponding to the transformation. |
| pHTrans | Pointer to homogenuous transformation matrix. The first three columns of the transformation matrix are the transformed global axis vectors. The position is the transformed homogen origin (0,0,0,1). |
|
|
constexpr | Frame () noexcept=default |
| | Does not initialize the members.
|
|
constexpr | Frame (Valtype px, Valtype py, Valtype pz, ValtypeT tx, ValtypeT ty, ValtypeT tz, ValtypeT nx, ValtypeT ny, ValtypeT nz, ValtypeT bx, ValtypeT by, ValtypeT bz) noexcept |
| | Does not initialize the members.
|
|
constexpr | Frame (const VectorBundle2< Valtype, ValtypeT > &vb2) noexcept |
| | Does not initialize the members.
|
|
| Frame (const VectorBundle< Valtype, ValtypeT > &vb, const Vector< ValtypeT > &up) noexcept |
| | Does not initialize the members.
|
|
constexpr | Frame (const Position< Valtype > &pos) noexcept |
| | Does not initialize the members.
|
|
constexpr | Frame (const Position< Valtype > &pos, const Vector< ValtypeT > &tan, const Vector< ValtypeT > &nor, const Vector< ValtypeT > &bin) noexcept |
| | Does not initialize the members.
|
|
| Frame (const Position< Valtype > &pos, const Rotation< ValtypeT > &rot) noexcept |
| | Does not initialize the members.
|
|
| Frame (const Rotation< ValtypeT > &rot) noexcept |
| | Does not initialize the members.
|
|
template<typename Valtype2> |
| | Frame (const Matrix< Valtype2, 4, 4 > &trans) noexcept |
| | Does not initialize the members.
|
|
template<typename Valtype2> |
| | Frame (const Valtype2 *pVal) noexcept |
| | Does not initialize the members.
|
- Parameters
-
| vb2 | VectorBundle2 object giving the P,T,N part; B gets computed. |
| rot | Rotation object giving the T,N and B part. |
| trans | Transformation object. Compute the Frame so that it is the frame of reference corresponding to the transformation. |
|
|
Frame & | operator= (const VectorBundle2< Valtype, ValtypeT > &vb2) noexcept |
|
Frame & | operator= (const Rotation< ValtypeT > &rot) noexcept |
|
template<typename Valtype2> |
| Frame & | operator= (const Matrix< Valtype2, 4, 4 > &trans) noexcept |
|
template<typename Valtype2> |
| Frame & | operator= (const Valtype2 *pVal) noexcept |
- Returns
- A Vector2 bundle with the P, T and N values.
|
|
| operator VectorBundle2< Valtype, ValtypeT > () const noexcept |
|
| operator VectorBundle< Valtype, ValtypeT > () const noexcept |
|
Frame & | Init () noexcept |
| | Initializes the Frame structure to position (or zero) and the vectors to standard right-handed orthogonal unit vector system.
|
|
Frame & | Init (const Position< Valtype > &pos) noexcept |
| | Initializes the Frame structure to position (or zero) and the vectors to standard right-handed orthogonal unit vector system.
|
Rotate the Frame so that a reference vector points along dir.
- Returns
- A reference to this object. Frame& Invert();
- Parameters
-
| dir | Direction to point to. |
| reference | The vector formulated in the frame reference, that is supposed to point in the direction of dir |
| up | Direction to bring B to by a final rotation. |
|
|
Frame & | LookAt (const Vector< ValtypeT > &reference, const Vector< ValtypeT > &dir) noexcept |
|
Frame & | LookTAt (const Vector< ValtypeT > &dir) noexcept |
|
Frame & | LookTAt (const Vector< ValtypeT > &dir, const Vector< ValtypeT > &up) noexcept |
|
Frame & | LookNAt (const Vector< ValtypeT > &dir) noexcept |
|
Frame & | LookBAt (const Vector< ValtypeT > &dir) noexcept |
Calculate the vectors as orthonormal vectors from Yaw, Pitch and Roll.
The angles used in aviation refer to a right handed coordinate system and rotate Yaw, Pitch and Roll in the order of Z, Y, and X following a right handed orientation rule. Note that in order to keep the Pitch positive on upward rotation, aeroplanes are typically oriented with the Z-axis down in the frame.
- Parameters
-
| yaw | The Yaw angle (rotation around Z). |
| pitch | The Pitch angle (rotation around rotated Y). |
| roll | The Roll angle (rotation around rotated X). |
| epsilon | If T is epsilon-close to Ez, the yaw will be zero and Pitch +- pi/2. |
- Returns
- Yaw, Pitch, Roll in a Position struct.
|
|
Frame & | AircraftPrincipalAxes (ValtypeT yaw, ValtypeT pitch, ValtypeT roll) |
|
Frame & | AircraftPrincipalAxes (const Position< ValtypeT > &angles) |
|
Position< ValtypeT > | AircraftPrincipalAxes (ValtypeT epsilon=std::numeric_limits< ValtypeT >::epsilon()) const |
Transformation to the coordinate system in wich this Frame is formulated.
The coordinates are understood to be formulated relative to this Frame and get calculated to be formulated to the base Frame.
|
|
template<typename Valtype2> |
| Position< Valtype2 > & | ToParent (Position< Valtype2 > &p) const noexcept |
|
template<typename Valtype2> |
| Vector< Valtype2 > & | ToParent (Vector< Valtype2 > &v) const noexcept |
|
template<typename Valtype2> |
| Vector< Valtype2 > & | NormalToParent (Vector< Valtype2 > &normal) const noexcept |
|
template<typename Valtype2, typename ValtypeT2> |
| VectorBundle< Valtype2, ValtypeT2 > & | ToParent (VectorBundle< Valtype2, ValtypeT2 > &v) const noexcept |
|
template<typename Valtype2, typename ValtypeT2> |
| VectorBundle2< Valtype2, ValtypeT2 > & | ToParent (VectorBundle2< Valtype2, ValtypeT2 > &v) const noexcept |
|
template<typename Valtype2, typename ValtypeT2> |
| Frame< Valtype2, ValtypeT2 > & | ToParent (Frame< Valtype2, ValtypeT2 > &frame) const noexcept |
|
template<typename Valtype2> |
| Box< Valtype2 > & | ToParent (Box< Valtype2 > &box) const noexcept |
|
template<typename Valtype2> |
| Sphere< Valtype2 > & | ToParent (Sphere< Valtype2 > &sphere) const noexcept |
Transformation from the coordinate system in wich this Frame is formulated.
The coordinates are understood to be formulated relative to the parent Frame and get calculated to be formulated relative to this Frame.
|
|
template<typename Valtype2> |
| Position< Valtype2 > & | FromParent (Position< Valtype2 > &p) const noexcept |
|
template<typename Valtype2> |
| Vector< Valtype2 > & | FromParent (Vector< Valtype2 > &v) const noexcept |
|
template<typename Valtype2, typename ValtypeT2> |
| VectorBundle< Valtype2, ValtypeT2 > & | FromParent (VectorBundle< Valtype2, ValtypeT2 > &b) const noexcept |
|
template<typename Valtype2, typename ValtypeT2> |
| VectorBundle2< Valtype2, ValtypeT2 > & | FromParent (VectorBundle2< Valtype2, ValtypeT2 > &b) const noexcept |
|
template<typename Valtype2, typename ValtypeT2> |
| Frame< Valtype2, ValtypeT2 > & | FromParent (Frame< Valtype2, ValtypeT2 > &frame) const noexcept |
template<typename Valtype, typename ValtypeT = Valtype>
struct spat::Frame< Valtype, ValtypeT >
A Frame ("TNBFrame") describes a location in 3d space and an orientation using a right handed coordinate cross of vectors.
These axes normaly are used right handed. If tan points in the direction of the thump of the right hand and the index finger points along the nor vector, then bin points along the middle finger.