Three-dimensional normal data structure. More...
#include <mitsuba/mitsuba.h>
Inheritance diagram for mitsuba::Normal:Public Member Functions | |
| Normal () | |
| Construct a new normal without initializing it. More... | |
| Normal (Float x, Float y, Float z) | |
| Initialize the vector with the specified X and Z components. More... | |
| Normal (Float val) | |
| Initialize all components of the the normal with the specified value. More... | |
| Normal (Stream *stream) | |
| Unserialize a normal from a binary data stream. More... | |
| Normal (const TVector3< Float > &v) | |
| Construct a normal from a vector data structure. More... | |
| void | operator= (const TVector3< Float > &v) |
| Assign a vector to this normal. More... | |
Public Member Functions inherited from mitsuba::TVector3< Float > | |
| TVector3 () | |
| Construct a new vector without initializing it. More... | |
| TVector3 (Floatx, Floaty, Floatz) | |
| Initialize the vector with the specified X, Y and Z components. More... | |
| TVector3 (Floatval) | |
| Initialize all components of the the vector with the specified value. More... | |
| TVector3 (const TVector3< T2 > &v) | |
| Initialize the vector with the components of another vector data structure. More... | |
| TVector3 (const TPoint3< T2 > &p) | |
| Initialize the vector with the components of a point data structure. More... | |
| TVector3 (Stream *stream) | |
| Unserialize a vector from a binary data stream. More... | |
| TVector3 | operator+ (const TVector3 &v) const |
| Add two vectors and return the result. More... | |
| TVector3 | operator- (const TVector3 &v) const |
| Subtract two vectors and return the result. More... | |
| TVector3 | operator- () const |
| Return a negated version of the vector. More... | |
| TVector3 & | operator+= (const TVector3 &v) |
| Add another vector to the current one. More... | |
| TVector3 & | operator-= (const TVector3 &v) |
| Subtract another vector from the current one. More... | |
| TVector3 | operator* (Floatf) const |
| Multiply the vector by the given scalar and return the result. More... | |
| TVector3 & | operator*= (Floatf) |
| Multiply the vector by the given scalar. More... | |
| TVector3 | operator/ (Floatf) const |
| Divide the vector by the given scalar and return the result. More... | |
| TVector3 & | operator/= (Floatf) |
| Divide the vector by the given scalar. More... | |
| Float & | operator[] (int i) |
| Index into the vector's components. More... | |
| Float | operator[] (int i) const |
| Index into the vector's components (const version) More... | |
| Float | lengthSquared () const |
| Return the squared 2-norm of this vector. More... | |
| LengthType | length () const |
| Return the 2-norm of this vector. More... | |
| bool | isZero () const |
| Return whether or not this vector is identically zero. More... | |
| bool | operator== (const TVector3 &v) const |
| Equality test. More... | |
| bool | operator!= (const TVector3 &v) const |
| Inequality test. More... | |
| void | serialize (Stream *stream) const |
| Serialize this vector to a binary data stream. More... | |
| std::string | toString () const |
| Return a readable string representation of this vector. More... | |
Additional Inherited Members | |
Public Types inherited from mitsuba::TVector3< Float > | |
| typedef Float | Scalar |
| typedef TPoint3< Float > | PointType |
| typedef detail::VectorLength < Float, std::numeric_limits < Float >::is_integer >::type | LengthType |
Public Attributes inherited from mitsuba::TVector3< Float > | |
| Float | x |
| Float | y |
| Float | z |
Static Public Attributes inherited from mitsuba::TVector3< Float > | |
| static const int | dim |
| Number of dimensions. More... | |
Three-dimensional normal data structure.
Internally represented using floating point numbers of the chosen compile-time precision. The main difference of this data structure when compared to TVector3<Float> is in how instances of Normal are treated by linear transformations.
|
inline |
Construct a new normal without initializing it.
This construtor is useful when the normal will either not be used at all (it might be part of a larger data structure) or initialized at a later point in time. Always make sure that one of the two is the case! Otherwise your program will do computations involving uninitialized memory, which will probably lead to a difficult-to-find bug.
Initialize the vector with the specified X and Z components.
|
inlineexplicit |
Initialize all components of the the normal with the specified value.
|
inline |
Unserialize a normal from a binary data stream.
Construct a normal from a vector data structure.
Assign a vector to this normal.