Library of Assembled Shared Sources
lass::prim::Unnormalized Struct Reference

Policy to keep normals unnormalized. More...

#include <normalizing_policy.h>

Static Public Member Functions

template<typename VectorType>
static void normalize (VectorType &)
 Don't normalize normals we want to keep unnormalized!
 
template<typename VectorType, typename ValueType>
static void normalizeAndScale (VectorType &, ValueType &)
 Don't normalize and don't scale.
 
template<typename ValueType, typename VectorType>
static ValueType divideByNorm (ValueType iValue, const VectorType &iNormObject)
 
template<typename ValueType, typename VectorType>
static ValueType divideBySquaredNorm (ValueType iValue, const VectorType &iNormObject)
 

Detailed Description

Policy to keep normals unnormalized.

Author
Bram de Greve [BdG]
Date
2003

Using this policy will keep direction vectors and normals at their original length. You can do this for precision reasons, for speed issues, or any other reason that is yours. However, the maths will still be correct, because the implementations will know of this unnormalized vectors, and will correct with extra factors where necessary. But, these corrections can sometimes be faster than using normalized vectors for start, because they often can avoid the square root.

Definition at line 154 of file normalizing_policy.h.

Member Function Documentation

◆ normalize()

template<typename VectorType>
static void lass::prim::Unnormalized::normalize ( VectorType & )
inlinestatic

Don't normalize normals we want to keep unnormalized!

:) this is a noop.

Definition at line 160 of file normalizing_policy.h.

◆ divideByNorm()

template<typename ValueType, typename VectorType>
static ValueType lass::prim::Unnormalized::divideByNorm ( ValueType iValue,
const VectorType & iNormObject )
inlinestatic
Returns
iValue divided by the norm of iNormObject

Definition at line 175 of file normalizing_policy.h.

◆ divideBySquaredNorm()

template<typename ValueType, typename VectorType>
static ValueType lass::prim::Unnormalized::divideBySquaredNorm ( ValueType iValue,
const VectorType & iNormObject )
inlinestatic
Returns
iValue divided by the squared norm of iNormObject

Definition at line 183 of file normalizing_policy.h.


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