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

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 ( ) const

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 > ( ) const

◆ operator!=()

◆ operator*=() [1/3]

Transform vector by matrix.

◆ operator*=() [2/3]

◆ operator*=() [3/3]

The copy constructor.

◆ operator+=()

combined operators

The copy constructor.

◆ operator-=()

The copy constructor.

◆ operator/=()

The copy constructor.

◆ operator<()

◆ operator==()

◆ operator[]() [1/2]

access a single element, non-const.

◆ operator[]() [2/2]

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 ( ) const

Get the squared length of the vector.

Returns
Square length

◆ SymMul()

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: