Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuFixel< SIZE, TYPE > Class Template Reference

vuFixel defines a basic template class for a fixel. More...

#include <vuFixel.h>

Collaboration diagram for vuFixel< SIZE, TYPE >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuFixel ()
 default constructor.
 vuFixel (const vuFixel< SIZE, TYPE > &inst)
 copy constructor
 vuFixel (const TYPE *array)
 initialize all components with values from array
 vuFixel (const TYPE value)
 initialize all values with value
 ~vuFixel ()
 destructor
TYPE & operator[] (unsigned int index)
 provides direct random access to the components
TYPE operator[] (unsigned int index) const
 provides direct reading access to the components
TYPE * getBuffer ()
 returns a pointer to the TYPE array containing the data
TYPE const * getBuffer () const
 const version of getBuffer()
vuFixel< SIZE, TYPE > & operator= (const TYPE *rhs)
 assignment from const TYPE*
vuFixel< SIZE, TYPE > & operator= (TYPE *rhs)
 assignment from TYPE*
vuFixel< SIZE, TYPE > & operator= (const vuFixel< SIZE, TYPE > &rhs)
 assignment operator
bool operator== (const vuFixel< SIZE, TYPE > &rhs) const
 operator ==, This returns true if the two fixels are equivalent.
vuFixel< SIZE, TYPE > operator+ (const vuFixel< SIZE, TYPE > &rhs) const
 addition operator, This performs a component wise addition of each component of the 2 fixels and returns the result.
vuFixel< SIZE, TYPE > operator+ (TYPE a) const
 addition operator, This will add a to the all components
vuFixel< SIZE, TYPE > operator- (const vuFixel< SIZE, TYPE > &rhs) const
 minus operator, This will perform a component wise subtraction on all components
vuFixel< SIZE, TYPE > operator * (const vuFixel< SIZE, TYPE > &rhs) const
 multiply operator, This will perform a component wise multiplication on all components
vuFixel< SIZE, TYPE > operator/ (const vuFixel< SIZE, TYPE > &rhs) const
 divide operator, This will perform a component wise division on all components
vuFixel< SIZE, TYPE > operator * (TYPE rhs) const
 operator multiplication with scalar In comparision to *= this operator creates a copy where the result written to.
vuFixel< SIZE, TYPE > & operator+= (const vuFixel< SIZE, TYPE > &rhs)
 operator for component wise addition
vuFixel< SIZE, TYPE > & operator-= (const vuFixel< SIZE, TYPE > &rhs)
 operator for component wise subtraction
vuFixel< SIZE, TYPE > & operator *= (const vuFixel< SIZE, TYPE > &rhs)
 operator for component wise multiplication
vuFixel< SIZE, TYPE > & operator/= (const vuFixel< SIZE, TYPE > &rhs)
 operator for component wise division
vuFixel< SIZE, TYPE > & operator *= (TYPE rhs)
 operator for multiplication with scalar
vuFixel< SIZE, TYPE > & operator/= (TYPE rhs)
 operator for division by scalar
word size () const
 returns the number of components.
TYPE maxComponent () const
 returns value of maximal component
TYPE minComponent () const
 returns value of minimal component
istream & read (istream &is)
 a friend, read fixel from stream
ostream & write (ostream &os) const
 a friend, write fixel to stream

Protected Attributes

TYPE m_buffer [SIZE]

Detailed Description

template<int SIZE, class TYPE>
class vuFixel< SIZE, TYPE >

vuFixel defines a basic template class for a fixel.

A fixel is an arbitrary FIeld ELement, comparable to a colour, but does not support alpha.

It's a one dimensional vector of length SIZE and basic type TYPE.

Definition at line 19 of file vuFixel.h.


Constructor & Destructor Documentation

template<int S, class T>
vuFixel< S, T >::vuFixel  ) 
 

default constructor.

Sets all values to zero.

Definition at line 5 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T >::vuFixel const vuFixel< SIZE, TYPE > &  inst  ) 
 

copy constructor

Definition at line 11 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T >::vuFixel const TYPE *  array  ) 
 

initialize all components with values from array

Definition at line 17 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T >::vuFixel const TYPE  value  ) 
 

initialize all values with value

Definition at line 23 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T >::~vuFixel  ) 
 

destructor

Definition at line 29 of file vuFixel.cpp.


Member Function Documentation

template<int S, class T>
T const * vuFixel< S, T >::getBuffer  )  const
 

const version of getBuffer()

Definition at line 52 of file vuFixel.cpp.

References T.

template<int S, class T>
T * vuFixel< S, T >::getBuffer  ) 
 

returns a pointer to the TYPE array containing the data

Definition at line 46 of file vuFixel.cpp.

References T.

template<int S, class T>
T vuFixel< S, T >::maxComponent  )  const
 

returns value of maximal component

Definition at line 197 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer, and T.

template<int S, class T>
T vuFixel< S, T >::minComponent  )  const
 

returns value of minimal component

Definition at line 206 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer, and T.

template<int S, class T>
vuFixel< S, T > vuFixel< S, T >::operator * TYPE  rhs  )  const
 

operator multiplication with scalar In comparision to *= this operator creates a copy where the result written to.

Definition at line 134 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > vuFixel< S, T >::operator * const vuFixel< SIZE, TYPE > &  rhs  )  const
 

multiply operator, This will perform a component wise multiplication on all components

Definition at line 116 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator *= TYPE  rhs  ) 
 

operator for multiplication with scalar

Definition at line 175 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator *= const vuFixel< SIZE, TYPE > &  rhs  ) 
 

operator for component wise multiplication

Definition at line 159 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > vuFixel< S, T >::operator+ TYPE  a  )  const
 

addition operator, This will add a to the all components

Definition at line 98 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > vuFixel< S, T >::operator+ const vuFixel< SIZE, TYPE > &  rhs  )  const
 

addition operator, This performs a component wise addition of each component of the 2 fixels and returns the result.

Definition at line 89 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator+= const vuFixel< SIZE, TYPE > &  rhs  ) 
 

operator for component wise addition

Definition at line 143 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > vuFixel< S, T >::operator- const vuFixel< SIZE, TYPE > &  rhs  )  const
 

minus operator, This will perform a component wise subtraction on all components

Definition at line 107 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator-= const vuFixel< SIZE, TYPE > &  rhs  ) 
 

operator for component wise subtraction

Definition at line 151 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > vuFixel< S, T >::operator/ const vuFixel< SIZE, TYPE > &  rhs  )  const
 

divide operator, This will perform a component wise division on all components

Definition at line 125 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator/= TYPE  rhs  ) 
 

operator for division by scalar

Definition at line 183 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator/= const vuFixel< SIZE, TYPE > &  rhs  ) 
 

operator for component wise division

Definition at line 167 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator= const vuFixel< SIZE, TYPE > &  rhs  ) 
 

assignment operator

Definition at line 72 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator= TYPE *  rhs  ) 
 

assignment from TYPE*

Definition at line 65 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
vuFixel< S, T > & vuFixel< S, T >::operator= const TYPE *  rhs  ) 
 

assignment from const TYPE*

Definition at line 58 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
bool vuFixel< S, T >::operator== const vuFixel< SIZE, TYPE > &  rhs  )  const
 

operator ==, This returns true if the two fixels are equivalent.

Definition at line 81 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer.

template<int S, class T>
T vuFixel< S, T >::operator[] unsigned int  index  )  const
 

provides direct reading access to the components

Definition at line 40 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer, and T.

template<int S, class T>
T & vuFixel< S, T >::operator[] unsigned int  index  ) 
 

provides direct random access to the components

Definition at line 34 of file vuFixel.cpp.

References vuFixel< SIZE, TYPE >::m_buffer, and T.

template<int SIZE, class TYPE>
istream& vuFixel< SIZE, TYPE >::read istream &  is  ) 
 

a friend, read fixel from stream

template<int S, class T>
word vuFixel< S, T >::size  )  const
 

returns the number of components.

This depends on the SIZE given during creation of the template.

Definition at line 191 of file vuFixel.cpp.

References word.

template<int SIZE, class TYPE>
ostream& vuFixel< SIZE, TYPE >::write ostream &  os  )  const
 

a friend, write fixel to stream


Member Data Documentation

template<int SIZE, class TYPE>
TYPE vuFixel< SIZE, TYPE >::m_buffer[SIZE] [protected]
 

Definition at line 138 of file vuFixel.h.

Referenced by vuFixel< SIZE, TYPE >::maxComponent(), vuFixel< SIZE, TYPE >::minComponent(), vuFixel< SIZE, TYPE >::operator *(), vuFixel< SIZE, TYPE >::operator *=(), vuFixel< SIZE, TYPE >::operator+(), vuFixel< SIZE, TYPE >::operator+=(), vuFixel< SIZE, TYPE >::operator-(), vuFixel< SIZE, TYPE >::operator-=(), vuFixel< SIZE, TYPE >::operator/(), vuFixel< SIZE, TYPE >::operator/=(), vuFixel< SIZE, TYPE >::operator=(), vuFixel< SIZE, TYPE >::operator==(), vuFixel< SIZE, TYPE >::operator[](), and vuFixel< SIZE, TYPE >::vuFixel().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:14 2004 for vuVolume by  doxygen 1.3.9.1