Math::Tuple< T, DoCropping, Count > Class Template Reference

#include <Tuple.hh>

Inheritance diagram for Math::Tuple< T, DoCropping, Count >:

Inheritance graph
[legend]
Collaboration diagram for Math::Tuple< T, DoCropping, Count >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename T, bool DoCropping = false, int Count = 3>
class Math::Tuple< T, DoCropping, Count >

Tuple of some numerical elements in range 0 - 1.0 with defined operations. Suitable for creating vectors and colors.

Definition at line 32 of file Tuple.hh.

void CropHigh ()
void CropLow ()
void CropBoth ()
std::string Dump () const
 Tuple ()
SquareLength () const
Length () const
TupleNormalize ()
Bool operator== (const Tuple &M) const
Bool operator!= (const Tuple &M) const
Tupleoperator+= (const Tuple &M)
Tupleoperator-= (const Tuple &M)
Tupleoperator*= (const Tuple &M)
Tupleoperator+= (T M)
Tupleoperator-= (T M)
Tupleoperator*= (T M)
Tupleoperator/= (T M)
Tuple operator+ (const Tuple &M) const
Tuple operator- (const Tuple &M) const
Tuple operator- () const
Tuple operator* (const Tuple &M) const
Tuple operator+ (T M) const
Tuple operator- (T M) const
Tuple operator* (T M) const
Tuple operator/ (T M) const
T & operator[] (Int i)
operator[] (Int i) const
operator! () const
Tuple Pow (T Value)

Protected Attributes

D [Count]

Constructor & Destructor Documentation

template<typename T, bool DoCropping = false, int Count = 3>
Math::Tuple< T, DoCropping, Count >::Tuple (  )  [inline]

Initialize with lower bound values

Definition at line 74 of file Tuple.hh.


Member Function Documentation

template<typename T, bool DoCropping = false, int Count = 3>
void Math::Tuple< T, DoCropping, Count >::CropHigh (  )  [inline, protected]

Crop tuple into bounds

Definition at line 38 of file Tuple.hh.

Referenced by Math::Tuple< Double, false, 3 >::operator+(), and Math::Tuple< Double, false, 3 >::operator+=().

Here is the caller graph for this function:

template<typename T, bool DoCropping = false, int Count = 3>
void Math::Tuple< T, DoCropping, Count >::CropLow (  )  [inline, protected]

Crop tuple into bounds

Definition at line 45 of file Tuple.hh.

Referenced by Math::Tuple< Double, false, 3 >::operator-(), and Math::Tuple< Double, false, 3 >::operator-=().

Here is the caller graph for this function:

template<typename T, bool DoCropping = false, int Count = 3>
void Math::Tuple< T, DoCropping, Count >::CropBoth (  )  [inline, protected]

template<typename T, bool DoCropping = false, int Count = 3>
std::string Math::Tuple< T, DoCropping, Count >::Dump (  )  const [inline, protected]

Crop tuple into bounds

Definition at line 63 of file Tuple.hh.

Referenced by World::operator<<(), and Math::operator<<().

Here is the caller graph for this function:

template<typename T, bool DoCropping = false, int Count = 3>
T Math::Tuple< T, DoCropping, Count >::SquareLength (  )  const [inline]

Returns:
Square length of tuple

Definition at line 82 of file Tuple.hh.

Referenced by World::Sphere::Collide(), and Math::Tuple< Double, false, 3 >::Length().

Here is the caller graph for this function:

template<typename T, bool DoCropping = false, int Count = 3>
T Math::Tuple< T, DoCropping, Count >::Length (  )  const [inline]

Returns:
Length of tuple.

Definition at line 91 of file Tuple.hh.

Referenced by Math::Tuple< Double, false, 3 >::Normalize(), and Math::Tuple< Double, false, 3 >::operator!().

Here is the caller graph for this function:

template<typename T, bool DoCropping = false, int Count = 3>
Tuple& Math::Tuple< T, DoCropping, Count >::Normalize (  )  [inline]

Normalizes tuple in place

Returns:
Reference to this object

Definition at line 97 of file Tuple.hh.

Referenced by World::Camera::Camera().

Here is the caller graph for this function:

template<typename T, bool DoCropping = false, int Count = 3>
Bool Math::Tuple< T, DoCropping, Count >::operator== ( const Tuple< T, DoCropping, Count > &  M  )  const [inline]

Equality comparator

Definition at line 106 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Bool Math::Tuple< T, DoCropping, Count >::operator!= ( const Tuple< T, DoCropping, Count > &  M  )  const [inline]

Inequality comparator

Definition at line 113 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple& Math::Tuple< T, DoCropping, Count >::operator+= ( const Tuple< T, DoCropping, Count > &  M  )  [inline]

In-place addition of tuples

Definition at line 119 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple& Math::Tuple< T, DoCropping, Count >::operator-= ( const Tuple< T, DoCropping, Count > &  M  )  [inline]

In-place substraction of tuples elements

Definition at line 128 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple& Math::Tuple< T, DoCropping, Count >::operator*= ( const Tuple< T, DoCropping, Count > &  M  )  [inline]

In-place multiplication of tuples elements

Definition at line 137 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple& Math::Tuple< T, DoCropping, Count >::operator+= ( M  )  [inline]

In-place addition of a constant to all elements

Definition at line 145 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple& Math::Tuple< T, DoCropping, Count >::operator-= ( M  )  [inline]

In-place substraction of a constant from all elements

Definition at line 154 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple& Math::Tuple< T, DoCropping, Count >::operator*= ( M  )  [inline]

In-place multiplication of all elements by a constant

Definition at line 163 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple& Math::Tuple< T, DoCropping, Count >::operator/= ( M  )  [inline]

In-place division of all elements by a constant

Definition at line 172 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::operator+ ( const Tuple< T, DoCropping, Count > &  M  )  const [inline]

Tuple addition

Definition at line 182 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::operator- ( const Tuple< T, DoCropping, Count > &  M  )  const [inline]

Tuple substraction

Definition at line 192 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::operator- (  )  const [inline]

Tuple unary minus

Definition at line 202 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::operator* ( const Tuple< T, DoCropping, Count > &  M  )  const [inline]

Tuple element-by-element multiplication

Definition at line 217 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::operator+ ( M  )  const [inline]

Add a constant to all elements

Definition at line 226 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::operator- ( M  )  const [inline]

Substract a constant from all elements

Definition at line 236 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::operator* ( M  )  const [inline]

Multiply all elements by a constant

Definition at line 246 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::operator/ ( M  )  const [inline]

Divide all elements by a constant

Definition at line 256 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
T& Math::Tuple< T, DoCropping, Count >::operator[] ( Int  i  )  [inline]

Provides read/write access to tuple values

Returns:
Reference to an element.

Definition at line 268 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
T Math::Tuple< T, DoCropping, Count >::operator[] ( Int  i  )  const [inline]

Provides read only access to tuple elements

Definition at line 279 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
T Math::Tuple< T, DoCropping, Count >::operator! (  )  const [inline]

Returns:
Tuple length.

Definition at line 290 of file Tuple.hh.

template<typename T, bool DoCropping = false, int Count = 3>
Tuple Math::Tuple< T, DoCropping, Count >::Pow ( Value  )  [inline]

Crop tuple into bounds

Definition at line 294 of file Tuple.hh.


Member Data Documentation

template<typename T, bool DoCropping = false, int Count = 3>
T Math::Tuple< T, DoCropping, Count >::D[Count] [protected]


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

Generated on Wed Mar 12 00:35:39 2008 for blaRAY by  doxygen 1.5.5