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

FrameBuffer< N > Class Template Reference

Frame buffer class with basic functionality. More...

#include <FrameBuf16.h>

Inheritance diagram for FrameBuffer< N >:

Inheritance graph
[legend]
Collaboration diagram for FrameBuffer< N >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FrameBuffer ()
 default constructor
 FrameBuffer (int width, int height)
 contructor
 ~FrameBuffer ()
 destructor
int getNumberOfChannels ()
 this will return the number of channels of the buffer
int getHeight ()
 this will return the height of the buffer
int getWidth ()
 this will return the width of the buffer
wordgetData ()
 this will return a ptr to the array of buffer data
bool setSize (int width, int height)
 this will clear the buffer and set the size of the buffer to the new size
bool freeBuffer ()
 this will clear the buffer and release it's memory
bool copy (FrameBuffer< N > &fb, int x, int y)
 copy into current frame buffer number of channel has to be equal
bool add (FrameBuffer< N > &fb, int x, int y)
 add intensities into buffer
bool addColourWithMask (FrameBuffer< 1 > &fb, Colour< N > &colour, int x, int y)
 add intensities into buffer
bool subColourWithMask (FrameBuffer< 1 > &fb, Colour< N > &colour, int x, int y)
 subtract intensities from current frame buffer
bool addColourWithM1subM2 (FrameBuffer< 1 > &m1, FrameBuffer< 1 > &m2, Colour< N > &colour, const int x, const int y)
 add intensities into buffer using the difference of the two alpha masks
bool blendOver (FrameBuffer< N > &fb, int x, int y)
 blends other buffer over current
bool blendOver (FrameBuffer< N > &fb)
 blends other buffer over current
bool blendUnder (FrameBuffer< N > &fb, int x, int y)
 blends other buffer over current alpha values in current buffer are used as transmittance and are modified accordingly by blending in new images
bool blendUnder (FrameBuffer< N > &fb)
 blends other buffer under current
bool clear (const Colour< N > colour)
 clears the buffer with colour col
bool print ()
 prints the contents of the framebuffer to the screen
 FrameBuffer ()
 default constructor
 FrameBuffer (int width, int height)
 constructor
 ~FrameBuffer ()
 destructor
int getNumberOfChannels ()
 returns the number of channels
int getHeight ()
 returns the height of the frame buffer
int getWidth ()
 returns the width of the frame buffer
floatgetData ()
 returns a ptr to the buffer data
bool setSize (int width, int height)
 this will clear the buffer and reset the size of the buffer
bool freeBuffer ()
 this will clear the buffer and set the size of the buffer to 0, 0
bool copy (FrameBuffer< N > &fb, int x, int y)
 copy into current frame buffer number of channel has to be equal
bool add (FrameBuffer< N > &fb, int x, int y)
 add intensities into buffer
bool addColourWithMask (FrameBuffer< 1 > &fb, vuColour< N > &colour, int x, int y)
 add intensities into buffer
bool subColourWithMask (FrameBuffer< 1 > &fb, vuColour< N > &colour, int x, int y)
 subtract intensities from current frame buffer
bool addColourWithM1subM2 (FrameBuffer< 1 > &m1, FrameBuffer< 1 > &m2, vuColour< N > &colour, const int x, const int y)
 add intensities into buffer using the difference of the two alpha masks
bool blendOver (FrameBuffer< N > &fb, int x, int y)
 blends other buffer over current
bool blendOver (FrameBuffer< N > &fb)
 blends other buffer over current
bool blendUnder (FrameBuffer< N > &fb, int x, int y)
 blends other buffer over current alpha values in current buffer are used as transmittance and are modified accordingly by blending in new images
bool blendUnder (FrameBuffer< N > &fb)
 blends other buffer under current
bool clear (const vuColour< N > colour)
 clears the buffer with colour col
bool print ()
 prints the contents of the framebuffer to the screen intended for debugging purpose on _small_ framebuffers

Protected Attributes

int m_Width
int m_Height
 the height and width of the buffer
wordm_Buffer
 this is the ptr to the array that stores the buffer's data.
floatm_Buffer
 ptr to the array of data that holds the buffer's data

Friends

class Colour<N>
class vuColour<N>

Detailed Description

template<int N>
class FrameBuffer< N >

Frame buffer class with basic functionality.

Based on floats, provides RGBA channels. The buffer is based on words (16 bit unsigned).

Definition at line 21 of file FrameBuf16.h.


Constructor & Destructor Documentation

template<int N>
FrameBuffer< N >::FrameBuffer  )  [inline]
 

default constructor

Definition at line 27 of file FrameBuf16.h.

template<int N>
FrameBuffer< N >::FrameBuffer int  width,
int  height
[inline]
 

contructor

Definition at line 30 of file FrameBuf16.h.

template<int N>
FrameBuffer< N >::~FrameBuffer  )  [inline]
 

destructor

Definition at line 37 of file FrameBuf16.h.

template<int N>
FrameBuffer< N >::FrameBuffer  )  [inline]
 

default constructor

Definition at line 28 of file FrameBuffer.h.

template<int N>
FrameBuffer< N >::FrameBuffer int  width,
int  height
[inline]
 

constructor

Definition at line 31 of file FrameBuffer.h.

template<int N>
FrameBuffer< N >::~FrameBuffer  )  [inline]
 

destructor

Definition at line 38 of file FrameBuffer.h.


Member Function Documentation

template<int N>
bool FrameBuffer< N >::add FrameBuffer< N > &  fb,
int  x,
int  y
[inline]
 

add intensities into buffer

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 111 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::add FrameBuffer< N > &  fb,
int  x,
int  y
[inline]
 

add intensities into buffer

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 106 of file FrameBuf16.h.

template<int N>
bool FrameBuffer< N >::addColourWithM1subM2 FrameBuffer< 1 > &  m1,
FrameBuffer< 1 > &  m2,
vuColour< N > &  colour,
const int  x,
const int  y
[inline]
 

add intensities into buffer using the difference of the two alpha masks

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 195 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::addColourWithM1subM2 FrameBuffer< 1 > &  m1,
FrameBuffer< 1 > &  m2,
Colour< N > &  colour,
const int  x,
const int  y
[inline]
 

add intensities into buffer using the difference of the two alpha masks

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 197 of file FrameBuf16.h.

Referenced by vu1512112::drawSlice(), and main().

template<int N>
bool FrameBuffer< N >::addColourWithMask FrameBuffer< 1 > &  fb,
vuColour< N > &  colour,
int  x,
int  y
[inline]
 

add intensities into buffer

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 136 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::addColourWithMask FrameBuffer< 1 > &  fb,
Colour< N > &  colour,
int  x,
int  y
[inline]
 

add intensities into buffer

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 130 of file FrameBuf16.h.

Referenced by main().

template<int N>
bool FrameBuffer< N >::blendOver FrameBuffer< N > &  fb  )  [inline]
 

blends other buffer over current

Definition at line 281 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::blendOver FrameBuffer< N > &  fb,
int  x,
int  y
[inline]
 

blends other buffer over current

Definition at line 251 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::blendOver FrameBuffer< N > &  fb  )  [inline]
 

blends other buffer over current

Definition at line 284 of file FrameBuf16.h.

template<int N>
bool FrameBuffer< N >::blendOver FrameBuffer< N > &  fb,
int  x,
int  y
[inline]
 

blends other buffer over current

Definition at line 255 of file FrameBuf16.h.

Referenced by main().

template<int N>
bool FrameBuffer< N >::blendUnder FrameBuffer< N > &  fb  )  [inline]
 

blends other buffer under current

Definition at line 350 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::blendUnder FrameBuffer< N > &  fb,
int  x,
int  y
[inline]
 

blends other buffer over current alpha values in current buffer are used as transmittance and are modified accordingly by blending in new images

Definition at line 321 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::blendUnder FrameBuffer< N > &  fb  )  [inline]
 

blends other buffer under current

Definition at line 353 of file FrameBuf16.h.

template<int N>
bool FrameBuffer< N >::blendUnder FrameBuffer< N > &  fb,
int  x,
int  y
[inline]
 

blends other buffer over current alpha values in current buffer are used as transmittance and are modified accordingly by blending in new images

Definition at line 324 of file FrameBuf16.h.

Referenced by vu1512112::drawSlices(), and main().

template<int N>
bool FrameBuffer< N >::clear const vuColour< N >  colour  )  [inline]
 

clears the buffer with colour col

Definition at line 387 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::clear const Colour< N >  colour  )  [inline]
 

clears the buffer with colour col

Definition at line 393 of file FrameBuf16.h.

Referenced by vu1512112::drawSlices(), main(), vu1512112::render(), and vu1512112::setImageSize().

template<int N>
bool FrameBuffer< N >::copy FrameBuffer< N > &  fb,
int  x,
int  y
[inline]
 

copy into current frame buffer number of channel has to be equal

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 78 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::copy FrameBuffer< N > &  fb,
int  x,
int  y
[inline]
 

copy into current frame buffer number of channel has to be equal

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 79 of file FrameBuf16.h.

template<int N>
bool FrameBuffer< N >::freeBuffer  )  [inline]
 

this will clear the buffer and set the size of the buffer to 0, 0

Definition at line 64 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::freeBuffer  )  [inline]
 

this will clear the buffer and release it's memory

Definition at line 65 of file FrameBuf16.h.

template<int N>
float* FrameBuffer< N >::getData void   )  [inline]
 

returns a ptr to the buffer data

Definition at line 50 of file FrameBuffer.h.

template<int N>
word* FrameBuffer< N >::getData void   )  [inline]
 

this will return a ptr to the array of buffer data

Definition at line 49 of file FrameBuf16.h.

Referenced by FrameBuffer< 4 >::addColourWithM1subM2(), FrameBuffer< 4 >::addColourWithMask(), FrameBuffer< 4 >::blendOver(), FrameBuffer< 4 >::blendUnder(), SplatSlicer::buildSplat(), main(), vu1512112::render(), and FrameBuffer< 4 >::subColourWithMask().

template<int N>
int FrameBuffer< N >::getHeight void   )  [inline]
 

returns the height of the frame buffer

Definition at line 46 of file FrameBuffer.h.

template<int N>
int FrameBuffer< N >::getHeight void   )  [inline]
 

this will return the height of the buffer

Definition at line 45 of file FrameBuf16.h.

Referenced by FrameBuffer< 4 >::addColourWithM1subM2(), FrameBuffer< 4 >::addColourWithMask(), FrameBuffer< 4 >::blendOver(), FrameBuffer< 4 >::blendUnder(), and FrameBuffer< 4 >::subColourWithMask().

template<int N>
int FrameBuffer< N >::getNumberOfChannels  )  [inline]
 

returns the number of channels

Definition at line 44 of file FrameBuffer.h.

template<int N>
int FrameBuffer< N >::getNumberOfChannels  )  [inline]
 

this will return the number of channels of the buffer

Definition at line 43 of file FrameBuf16.h.

Referenced by FrameBuffer< 4 >::copy().

template<int N>
int FrameBuffer< N >::getWidth void   )  [inline]
 

returns the width of the frame buffer

Definition at line 48 of file FrameBuffer.h.

template<int N>
int FrameBuffer< N >::getWidth void   )  [inline]
 

this will return the width of the buffer

Definition at line 47 of file FrameBuf16.h.

Referenced by FrameBuffer< 4 >::addColourWithM1subM2(), FrameBuffer< 4 >::addColourWithMask(), FrameBuffer< 4 >::blendOver(), FrameBuffer< 4 >::blendUnder(), and FrameBuffer< 4 >::subColourWithMask().

template<int N>
bool FrameBuffer< N >::print  )  [inline]
 

prints the contents of the framebuffer to the screen intended for debugging purpose on _small_ framebuffers

Definition at line 401 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::print  )  [inline]
 

prints the contents of the framebuffer to the screen

Definition at line 413 of file FrameBuf16.h.

Referenced by main().

template<int N>
bool FrameBuffer< N >::setSize int  width,
int  height
[inline]
 

this will clear the buffer and reset the size of the buffer

Definition at line 53 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::setSize int  width,
int  height
[inline]
 

this will clear the buffer and set the size of the buffer to the new size

Returns:
true if successful

false if not successful

Definition at line 54 of file FrameBuf16.h.

Referenced by SplatSlicer::createSlices(), vu1512112::drawSlices(), and vu1512112::setImageSize().

template<int N>
bool FrameBuffer< N >::subColourWithMask FrameBuffer< 1 > &  fb,
vuColour< N > &  colour,
int  x,
int  y
[inline]
 

subtract intensities from current frame buffer

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 166 of file FrameBuffer.h.

template<int N>
bool FrameBuffer< N >::subColourWithMask FrameBuffer< 1 > &  fb,
Colour< N > &  colour,
int  x,
int  y
[inline]
 

subtract intensities from current frame buffer

Parameters:
fb frame buffer to take data from
x,y position in current buffer to operate on

Definition at line 164 of file FrameBuf16.h.


Friends And Related Function Documentation

template<int N>
friend class Colour<N> [friend]
 

Definition at line 23 of file FrameBuf16.h.

template<int N>
friend class vuColour<N> [friend]
 

Definition at line 24 of file FrameBuffer.h.


Member Data Documentation

template<int N>
float* FrameBuffer< N >::m_Buffer [protected]
 

ptr to the array of data that holds the buffer's data

Definition at line 420 of file FrameBuffer.h.

template<int N>
word* FrameBuffer< N >::m_Buffer [protected]
 

this is the ptr to the array that stores the buffer's data.

Definition at line 432 of file FrameBuf16.h.

Referenced by FrameBuffer< 4 >::add(), and FrameBuffer< 4 >::copy().

template<int N>
int FrameBuffer< N >::m_Height [protected]
 

the height and width of the buffer

Definition at line 419 of file FrameBuffer.h.

Referenced by FrameBuffer< 4 >::add(), and FrameBuffer< 4 >::copy().

template<int N>
int FrameBuffer< N >::m_Width [protected]
 

Definition at line 419 of file FrameBuffer.h.

Referenced by FrameBuffer< 4 >::add(), and FrameBuffer< 4 >::copy().


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