library of assembled shared sources

http://lass.cocamware.com

lass::prim::Normalized Struct Reference
[NormalizingPolicy]

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".


Detailed Description

Policy to auto-normalize normals.

Author:
Bram de Greve [BdG]
Date:
2003
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.


Member Function Documentation

template<typename VectorType >
static void lass::prim::Normalized::normalize ( VectorType &  ioSubject  )  [inline, static]

Normalize a vector iSubject.

Definition at line 113 of file normalizing_policy.h.

template<typename VectorType , typename ValueType >
static void lass::prim::Normalized::normalizeAndScale ( VectorType &  ioSubject,
ValueType &  ioExtraValue 
) [inline, static]

Normalize iSubject, and scale iExtraValue as well so iExtraValue / iSubject.norm() is constant.

Typically used by cartesian equations.

Postcondition:
iExtraValue / iSubject.norm() is the same as before the call.

Definition at line 123 of file normalizing_policy.h.

References LASS_ASSERT, and lass::num::norm().

template<typename ValueType , typename VectorType >
static ValueType lass::prim::Normalized::divideByNorm ( ValueType  iValue,
const VectorType &   
) [inline, static]

since iNormObject should be normalized by now, we can "divide by 1".

Returns:
iValue
Precondition:
iNormObject is supposed to be normalized!

Definition at line 136 of file normalizing_policy.h.

template<typename ValueType , typename VectorType >
static ValueType lass::prim::Normalized::divideBySquaredNorm ( ValueType  iValue,
const VectorType &   
) [inline, static]

since iNormObject should be normalized by now, we can "divide by 1".

Returns:
iValue
Precondition:
iNormObject is supposed to be normalized!

Definition at line 146 of file normalizing_policy.h.


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

Generated on Mon Nov 10 14:22:13 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo