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

Implements a Vector bundle. More...

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

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

Public Member Functions

Valtype * ptr () noexcept
 Pointer accessor for direct copying.
const Valtype * ptr () const noexcept
 Pointer accessor for direct copying.
VectorBundleInit () noexcept
 Initializes the VectorBundle structure to position zero and the ex Vector.
VectorBundleInit (const VectorBundle &vb) noexcept
 Initializes the VectorBundle structure to vb.
VectorBundleTransportTo (Valtype d) noexcept
 Moves the Frame by d in direction T.
VectorBundleTransportBy (const Vector< Valtype > &v) noexcept
 Transport this Frame by v.
VectorBundleRotate (const Vector< Valtype > &nr, Valtype angle) noexcept
 Rotate the tan around nr with angle in radiants.
VectorBundleRotate (const Vector< Valtype > &r) noexcept
 Rotate the tan around r with angle r.Length() in radiants.
constexpr bool Equals (const VectorBundle &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>
VectorBundle< Valtype, ValtypeT > & operator= (const Valtype2 *pVal) noexcept
Construction
Parameters
pos
tan
x
y
z
dx
dy
dz
rot
frame
constexpr VectorBundle () noexcept=default
 Does not initialize the members.
constexpr VectorBundle (const Position< Valtype > &pos) noexcept
 Does not initialize the members.
constexpr VectorBundle (const Position< Valtype > &pos, const Vector< ValtypeT > &tan) noexcept
 Does not initialize the members.
constexpr VectorBundle (Valtype x, Valtype y, Valtype z, ValtypeT dx, ValtypeT dy, ValtypeT dz) noexcept
 Does not initialize the members.
constexpr VectorBundle (const VectorBundle2< Valtype, ValtypeT > &bundle) noexcept
 Does not initialize the members.
constexpr VectorBundle (const Frame< Valtype, ValtypeT > &frame) noexcept
 Does not initialize the members.
template<typename Valtype2>
 VectorBundle (const Valtype2 *const pVal) noexcept
 Does not initialize the members.
Assignment
Parameters
frame
VectorBundleoperator= (const Frame< Valtype, ValtypeT > &frame) noexcept
template<typename Valtype2>
VectorBundleoperator= (const Valtype2 *pVal) noexcept

Public Attributes

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

Detailed Description

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

Implements a Vector bundle.

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

Member Function Documentation

◆ Equals()

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

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
bundleVectorBundle to compare with.
epsilon_lengthepsilon distance <= which two positions are regarded as equal.
epsilon_lengthTepsilon for the Vectors of the VectorBundles.

◆ Init()

template<typename Valtype, typename ValtypeT>
VectorBundle< Valtype, ValtypeT > & spat::VectorBundle< Valtype, ValtypeT >::Init ( const VectorBundle< Valtype, ValtypeT > & vb)
inlinenoexcept

Initializes the VectorBundle structure to vb.

Parameters
vbValues for pos and tan

◆ TransportBy()

template<typename Valtype, typename ValtypeT>
VectorBundle< Valtype, ValtypeT > & spat::VectorBundle< Valtype, ValtypeT >::TransportBy ( const Vector< Valtype > & v)
inlinenoexcept

Transport this Frame by v.

Parameters
va vector to translate this frames pos value by.

◆ TransportTo()

template<typename Valtype, typename ValtypeT>
VectorBundle< Valtype, ValtypeT > & spat::VectorBundle< 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: