Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
aiVector3t< TReal > Class Template Reference

Represents a three-dimensional vector. More...

#include <vector3.h>

Public Member Functions

 aiVector3t () AI_NO_EXCEPT
 The default class constructor. More...
 
 aiVector3t (const aiVector3t &o)=default
 The copy constructor. More...
 
 aiVector3t (TReal _x, TReal _y, TReal _z)
 The class constructor with the components. More...
 
 aiVector3t (TReal _xyz)
 The class constructor with a default value. More...
 
bool Equal (const aiVector3t &other, TReal epsilon=ai_epsilon) const
 
More...
 
TReal Length () const
 Get the length of the vector. More...
 
aiVector3tNormalize ()
 Normalize the vector. More...
 
aiVector3tNormalizeSafe ()
 Normalize the vector with extra check for zero vectors. More...
 
template<typename TOther >
 operator aiVector3t< TOther > () const
 
bool operator!= (const aiVector3t &other) const
 
aiVector3toperator*= (const aiMatrix3x3t< TReal > &mat)
 Transform vector by matrix. More...
 
aiVector3toperator*= (const aiMatrix4x4t< TReal > &mat)
 
const aiVector3toperator*= (TReal f)
 The copy constructor. More...
 
const aiVector3toperator+= (const aiVector3t &o)
 combined operators More...
 
const aiVector3toperator-= (const aiVector3t &o)
 The copy constructor. More...
 
const aiVector3toperator/= (TReal f)
 The copy constructor. More...
 
bool operator< (const aiVector3t &other) const
 
bool operator== (const aiVector3t &other) const
 
TReal & operator[] (unsigned int i)
 access a single element, non-const. More...
 
TReal operator[] (unsigned int i) const
 access a single element, const. More...
 
void Set (TReal pX, TReal pY, TReal pZ)
 Set the components of a vector. More...
 
TReal SquareLength () const
 Get the squared length of the vector. More...
 
const aiVector3t SymMul (const aiVector3t &o)
 Componentwise multiplication of two vectors. More...
 

Public Attributes

TReal x
 
TReal y
 
TReal z
 

Detailed Description

template<typename TReal>
class aiVector3t< TReal >

Represents a three-dimensional vector.

Constructor & Destructor Documentation

◆ aiVector3t() [1/4]

template<typename TReal >
aiVector3t< TReal >::aiVector3t ( )
inline

The default class constructor.

◆ aiVector3t() [2/4]

template<typename TReal >
aiVector3t< TReal >::aiVector3t ( TReal  _x,
TReal  _y,
TReal  _z 
)
inline

The class constructor with the components.

Parameters
_xThe x-component for the vector.
_yThe y-component for the vector.
_zThe z-component for the vector.

◆ aiVector3t() [3/4]

template<typename TReal >
aiVector3t< TReal >::aiVector3t ( TReal  _xyz)
inlineexplicit

The class constructor with a default value.

Parameters
_xyzThe value for x, y and z.

◆ aiVector3t() [4/4]

template<typename TReal >
aiVector3t< TReal >::aiVector3t ( const aiVector3t< TReal > &  o)
default

The copy constructor.

Parameters
oThe instance to copy from.

Member Function Documentation

◆ Equal()

template<typename TReal >
AI_FORCE_INLINE bool aiVector3t< TReal >::Equal ( const aiVector3t< TReal > &  other,
TReal  epsilon = ai_epsilon 
) const


◆ Length()

template<typename TReal >
AI_FORCE_INLINE TReal aiVector3t< TReal >::Length

Get the length of the vector.

Returns
length

◆ Normalize()

template<typename TReal >
aiVector3t< TReal > & aiVector3t< TReal >::Normalize

Normalize the vector.

◆ NormalizeSafe()

template<typename TReal >
AI_FORCE_INLINE aiVector3t< TReal > & aiVector3t< TReal >::NormalizeSafe

Normalize the vector with extra check for zero vectors.

◆ operator aiVector3t< TOther >()

template<typename TReal >
template<typename TOther >
aiVector3t< TReal >::operator aiVector3t< TOther >

◆ operator!=()

template<typename TReal >
AI_FORCE_INLINE bool aiVector3t< TReal >::operator!= ( const aiVector3t< TReal > &  other) const

◆ operator*=() [1/3]

template<typename TReal >
AI_FORCE_INLINE aiVector3t< TReal > & aiVector3t< TReal >::operator*= ( const aiMatrix3x3t< TReal > &  mat)

Transform vector by matrix.

◆ operator*=() [2/3]

template<typename TReal >
AI_FORCE_INLINE aiVector3t< TReal > & aiVector3t< TReal >::operator*= ( const aiMatrix4x4t< TReal > &  mat)

◆ operator*=() [3/3]

template<typename TReal >
AI_FORCE_INLINE const aiVector3t< TReal > & aiVector3t< TReal >::operator*= ( TReal  f)

The copy constructor.

◆ operator+=()

template<typename TReal >
AI_FORCE_INLINE const aiVector3t< TReal > & aiVector3t< TReal >::operator+= ( const aiVector3t< TReal > &  o)

combined operators

The copy constructor.

◆ operator-=()

template<typename TReal >
AI_FORCE_INLINE const aiVector3t< TReal > & aiVector3t< TReal >::operator-= ( const aiVector3t< TReal > &  o)

The copy constructor.

◆ operator/=()

template<typename TReal >
AI_FORCE_INLINE const aiVector3t< TReal > & aiVector3t< TReal >::operator/= ( TReal  f)

The copy constructor.

◆ operator<()

template<typename TReal >
AI_FORCE_INLINE bool aiVector3t< TReal >::operator< ( const aiVector3t< TReal > &  other) const

◆ operator==()

template<typename TReal >
AI_FORCE_INLINE bool aiVector3t< TReal >::operator== ( const aiVector3t< TReal > &  other) const

◆ operator[]() [1/2]

template<typename TReal >
AI_FORCE_INLINE TReal & aiVector3t< TReal >::operator[] ( unsigned int  i)

access a single element, non-const.

◆ operator[]() [2/2]

template<typename TReal >
AI_FORCE_INLINE TReal aiVector3t< TReal >::operator[] ( unsigned int  i) const

access a single element, const.

◆ Set()

template<typename TReal >
AI_FORCE_INLINE void aiVector3t< TReal >::Set ( TReal  pX,
TReal  pY,
TReal  pZ 
)

Set the components of a vector.

Parameters
pXX component
pYY component
pZZ component

◆ SquareLength()

template<typename TReal >
AI_FORCE_INLINE TReal aiVector3t< TReal >::SquareLength

Get the squared length of the vector.

Returns
Square length

◆ SymMul()

template<typename TReal >
AI_FORCE_INLINE const aiVector3t< TReal > aiVector3t< TReal >::SymMul ( const aiVector3t< TReal > &  o)

Componentwise multiplication of two vectors.

Note that vec*vec yields the dot product.

Parameters
oSecond factor

Member Data Documentation

◆ x

template<typename TReal >
TReal aiVector3t< TReal >::x

◆ y

template<typename TReal >
TReal aiVector3t< TReal >::y

◆ z

template<typename TReal >
TReal aiVector3t< TReal >::z

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