Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
spat::VectorBundle2< Valtype, ValtypeT > Struct Template Reference

Implements a tangential space bundle. More...

#include <C:/Trend/Development/Trax3/Code/spat/VectorBundle2.h>

Inheritance diagram for spat::VectorBundle2< Valtype, ValtypeT >:

Public Member Functions

 operator VectorBundle< Valtype, ValtypeT > () const noexcept
 Implicit conversion.
Valtype * ptr () noexcept
 Pointer accessor for direct copying.
const Valtype * ptr () const noexcept
 Pointer accessor for direct copying.
VectorBundle2Init () noexcept
 Initializes the VectorBundle2 structure to position zero and the vectors to standard right-handed unit vector system.
VectorBundle2Init (const VectorBundle< Valtype, ValtypeT > &bundle, const Vector< ValtypeT > &up) noexcept
 Initializes the VectorBundle2 structure to vb and calculates nor as to be orthogonal to up.
VectorBundle2Normalize () noexcept
 Makes the vectors unit vectors.
VectorBundle2OrthoNormalize () noexcept
 Normalizes the vectors preserving the direction of T as is. It then adjusts Nor and Bin in a way to form a orthogonal frame.
bool IsOrthoNormal (ValtypeT epsilon_length=2 *std::numeric_limits< ValtypeT >::epsilon(), ValtypeT epsilon_angle=2 *std::numeric_limits< ValtypeT >::epsilon()) const noexcept
VectorBundle2TransportTo (Valtype d) noexcept
 Moves the Frame by d in direction T.
VectorBundle2TransportTo (const Position2D< Valtype > &p) noexcept
 Transport this Frame to p.
VectorBundle2TransportTan (Valtype d) noexcept
 Moves the Frame by d in direction T.
VectorBundle2TransportNor (Valtype d) noexcept
 Moves the Frame by d in direction N.
VectorBundle2Rotate (const Vector< ValtypeT > &nr, ValtypeT angle) noexcept
 Rotate the vectors around nr with angle in radiants.
VectorBundle2Rotate (const Vector< ValtypeT > &r) noexcept
 Rotate the vectors around r with angle r.Length() in radiants.
VectorBundle2RotateTan (ValtypeT angle) noexcept
 Rotates the vectors around the tan vector.
VectorBundle2RotateNor (ValtypeT angle) noexcept
 Rotates the vectors around the nor vector.
constexpr bool Equals (const VectorBundle2 &bundle, Valtype epsilon_length=std::numeric_limits< Valtype >::epsilon(), ValtypeT epsilon_lengthT=std::numeric_limits< ValtypeT >::epsilon()) const noexcept
 Comparison within some ranges.
template<typename Valtype2>
VectorBundle2< Valtype, ValtypeT > & operator= (const Valtype2 *pVal) noexcept
Construction
Parameters
x
y
z
dx
dy
dz
pos
tan
nor
bundle
rot
frame
constexpr VectorBundle2 () noexcept=default
 Does not initialize the members.
constexpr VectorBundle2 (Valtype x, Valtype y, Valtype z, ValtypeT tx, ValtypeT ty, ValtypeT tz, ValtypeT nx, ValtypeT ny, ValtypeT nz) noexcept
 Does not initialize the members.
constexpr VectorBundle2 (const Position< Valtype > &pos, const Vector< ValtypeT > &tan, const Vector< ValtypeT > &nor) noexcept
 Does not initialize the members.
constexpr VectorBundle2 (const VectorBundle< Valtype, ValtypeT > &bundle, const Vector< ValtypeT > &nor) noexcept
 Does not initialize the members.
 VectorBundle2 (const Position< Valtype > &pos, const Rotation< ValtypeT > &rot) noexcept
 Does not initialize the members.
constexpr VectorBundle2 (const Frame< Valtype, ValtypeT > &frame) noexcept
 Does not initialize the members.
 VectorBundle2 (const Rotation< ValtypeT > &rot) noexcept
 Does not initialize the members.
template<typename Valtype2>
 VectorBundle2 (const Valtype2 *pVal) noexcept
 Does not initialize the members.
Assignment
Parameters
frame
rot
VectorBundle2operator= (const Frame< Valtype, ValtypeT > &frame) noexcept
VectorBundle2operator= (const Rotation< ValtypeT > &rot) noexcept
template<typename Valtype2>
VectorBundle2operator= (const Valtype2 *pVal) noexcept

Public Attributes

Position< Valtype > P
 Base space postion.
Vector< ValtypeT > T
 Tangent vector or x-axis.
Vector< ValtypeT > N
 Normal axis or y-axis.

Detailed Description

template<typename Valtype, typename ValtypeT = Valtype>
struct spat::VectorBundle2< Valtype, ValtypeT >

Implements a tangential space bundle.

Specifies the coordinates of a point in 3D space and two additional Vector.

Member Function Documentation

◆ Equals()

template<typename Valtype, typename ValtypeT>
bool spat::VectorBundle2< Valtype, ValtypeT >::Equals ( const VectorBundle2< Valtype, ValtypeT > & bundle,
Valtype epsilon_length = std::numeric_limits<Valtype>::epsilon(),
ValtypeT epsilon_lengthT = std::numeric_limits<ValtypeT>::epsilon() ) const
inlineconstexprnoexcept

Comparison within some ranges.

The area within two positions regarded as equal is a sphere with radius epsilon_length; the absolute difference of two vectors will at most be epsilon_lengthT. If the two vectors are both unit vectors, the actual difference between them will be sin(a) with a being the rotational angle. This makes a small enough epsilon_lengthT a limit in rotational angle.

Parameters
bundleVectorBundle2 to compare with.
epsilon_lengthepsilon distance <= which two positions are regarded as equal.
epsilon_lengthTepsilon for the Vectors of the VectorBundle2s.

◆ Init()

template<typename Valtype, typename ValtypeT>
VectorBundle2< Valtype, ValtypeT > & spat::VectorBundle2< Valtype, ValtypeT >::Init ( const VectorBundle< Valtype, ValtypeT > & bundle,
const Vector< ValtypeT > & up )
inlinenoexcept

Initializes the VectorBundle2 structure to vb and calculates nor as to be orthogonal to up.

Parameters
bundleValues for pos and tan
upVector pointing in up direction

◆ IsOrthoNormal()

template<typename Valtype, typename ValtypeT>
bool spat::VectorBundle2< Valtype, ValtypeT >::IsOrthoNormal ( ValtypeT epsilon_length = 2*std::numeric_limits<ValtypeT>::epsilon(),
ValtypeT epsilon_angle = 2*std::numeric_limits<ValtypeT>::epsilon() ) const
inlinenoexcept
Parameters
epsilon_lengthMargin for deviation.
epsilon_angleMargin for deviation.
Returns
true if the Frame forms an orthonormal frameset.

◆ operator VectorBundle< Valtype, ValtypeT >()

template<typename Valtype, typename ValtypeT>
spat::VectorBundle2< Valtype, ValtypeT >::operator VectorBundle< Valtype, ValtypeT > ( ) const
inlinenoexcept

Implicit conversion.

Returns
A Vector bundle with the P and T values.

◆ TransportNor()

template<typename Valtype, typename ValtypeT>
VectorBundle2< Valtype, ValtypeT > & spat::VectorBundle2< Valtype, ValtypeT >::TransportNor ( Valtype d)
inlinenoexcept

Moves the Frame by d in direction N.

Parameters
dDistance to move along N.

◆ TransportTan()

template<typename Valtype, typename ValtypeT>
VectorBundle2< Valtype, ValtypeT > & spat::VectorBundle2< Valtype, ValtypeT >::TransportTan ( Valtype d)
inlinenoexcept

Moves the Frame by d in direction T.

Parameters
dDistance to move along T.

◆ TransportTo() [1/2]

template<typename Valtype, typename ValtypeT>
VectorBundle2< Valtype, ValtypeT > & spat::VectorBundle2< Valtype, ValtypeT >::TransportTo ( const Position2D< Valtype > & p)
inlinenoexcept

Transport this Frame to p.

Parameters
pa point in space formulated with respect to this Frame.

◆ TransportTo() [2/2]

template<typename Valtype, typename ValtypeT>
VectorBundle2< Valtype, ValtypeT > & spat::VectorBundle2< Valtype, ValtypeT >::TransportTo ( Valtype d)
inlinenoexcept

Moves the Frame by d in direction T.

Parameters
dDistance to move along T.

The documentation for this struct was generated from the following files: