Library of Assembled Shared Sources
|
Policy to auto-normalize normals. More...
#include <normalizing_policy.h>
Static Public Member Functions | |
template<typename VectorType> | |
static void | normalize (VectorType &ioSubject) |
Normalize a vector iSubject. | |
template<typename VectorType, typename ValueType> | |
static void | normalizeAndScale (VectorType &ioSubject, ValueType &ioExtraValue) |
Normalize iSubject, and scale iExtraValue as well so iExtraValue / iSubject.norm() is constant. | |
template<typename ValueType, typename VectorType> | |
static ValueType | divideByNorm (ValueType iValue, const VectorType &) |
since iNormObject should be normalized by now, we can "divide by 1". | |
template<typename ValueType, typename VectorType> | |
static ValueType | divideBySquaredNorm (ValueType iValue, const VectorType &) |
since iNormObject should be normalized by now, we can "divide by 1". | |
Policy to auto-normalize normals.
Using this policy will automatically normalize all direction vectors and normals. That way, you don't have to bother what you have as input, you know that they will be normalized anyway. Also, for the implementation of the primitives, optimized routines are provided that take advantage of the knowledge that the vectors are normalized. But this are implementation details you should not worry about.
Definition at line 108 of file normalizing_policy.h.
|
inlinestatic |
Normalize iSubject, and scale iExtraValue as well so iExtraValue / iSubject.norm() is constant.
Typically used by cartesian equations.
Definition at line 123 of file normalizing_policy.h.
References norm().
|
inlinestatic |
since iNormObject should be normalized by now, we can "divide by 1".
Definition at line 136 of file normalizing_policy.h.
|
inlinestatic |
since iNormObject should be normalized by now, we can "divide by 1".
Definition at line 146 of file normalizing_policy.h.