libimgdoc2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
imgdoc2::Vector3dT< t > Struct Template Reference

#include <types.h>

Public Member Functions

 Vector3dT ()
 Default constructor. All properties are set to zero.
 
 Vector3dT (t x, t y, t z)
 
 Vector3dT (const Point3dT< t > p)
 
Vector3dT< t > Normalize () const
 
AbsoluteValueSquared () const
 
AbsoluteValue () const
 

Static Public Member Functions

static Vector3dT< t > Cross (const Vector3dT< t > &vectorA, const Vector3dT< t > &vectorB)
 
static t Dot (const Vector3dT< t > &vectorA, const Vector3dT< t > &vectorB)
 

Public Attributes

x
 The component of the vector in x-direction.
 
y
 The component of the vector in y-direction.
 
z
 The component of the vector in z-direction.
 

Detailed Description

template<typename t>
struct imgdoc2::Vector3dT< t >

Structure defining a vector in three dimensions.

Template Parameters
tGeneric type parameter.

Constructor & Destructor Documentation

◆ Vector3dT() [1/2]

template<typename t >
imgdoc2::Vector3dT< t >::Vector3dT ( x,
y,
z 
)
inline

Constructor.

Parameters
xThe component of the vector in x-direction.
yThe component of the vector in y-direction.
zThe component of the vector in z-direction.

◆ Vector3dT() [2/2]

template<typename t >
imgdoc2::Vector3dT< t >::Vector3dT ( const Point3dT< t >  p)
inlineexplicit

Constructor.

Parameters
pA Point3dT<t> to convert into a vector.

Member Function Documentation

◆ AbsoluteValue()

template<typename t >
t imgdoc2::Vector3dT< t >::AbsoluteValue ( ) const
inline

Calculate the length of the vector.

Returns
The length of the vector.

◆ AbsoluteValueSquared()

template<typename t >
t imgdoc2::Vector3dT< t >::AbsoluteValueSquared ( ) const
inline

Calculate the squared length of the vector.

Returns
The squared length of the vector.

◆ Cross()

template<typename t >
static Vector3dT< t > imgdoc2::Vector3dT< t >::Cross ( const Vector3dT< t > &  vectorA,
const Vector3dT< t > &  vectorB 
)
inlinestatic

Calculate the cross-product of two vectors.

Parameters
vectorAThe first vector.
vectorBThe second vector.
Returns
The cross-product of the two vectors.

◆ Dot()

template<typename t >
static t imgdoc2::Vector3dT< t >::Dot ( const Vector3dT< t > &  vectorA,
const Vector3dT< t > &  vectorB 
)
inlinestatic

Calculate the dot-product of two vectors.

Parameters
vectorAThe first vector.
vectorBThe second vector.
Returns
The dot-product of the two vectors.

◆ Normalize()

template<typename t >
Vector3dT< t > imgdoc2::Vector3dT< t >::Normalize ( ) const
inline

Gets a normalized vector.

Returns
The normalized vector.

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