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

ns_vu1112112::DatGrid Class Reference

This is an indexed collection of DatPnt instances. More...

#include <DatGrid.h>

Collaboration diagram for ns_vu1112112::DatGrid:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void calculate_gradients ()
 Calulates the gradients using central differencing.
void shade (vu1112112 &r)
 perform shading for each grid point.
void classify (vu1112112 &r)
 perform pre-classification for each grid point.
bool load_vol (byte *data, vu1112112 &r)
 loads a volume into the grid structure.
void createSphere ()
 Creates a sphere into a given bounding volume.
int init (int maxx, int maxy, int maxz)
 prepares the memory for a data set of given size
 DatGrid ()
 constructor
 ~DatGrid ()
 destructor

Protected Member Functions

int get_vol_mem ()
 get the memory for the set up size
int free_vol_mem ()
 free the memory
void distributeIllum (ColourType &il)

Protected Attributes

int maxX
int maxY
int maxZ
 extents along each axis
int layXY
 size of x-y slice
int size
 total number of points in grid
DatPntvol

Private Member Functions

float clipRay (vuSampleRay &r, bool bidirectional, int &m_Side) const

Private Attributes

vuVector m_C0
vuVector m_C1

Friends

class vuSampleRay

Detailed Description

This is an indexed collection of DatPnt instances.

Provides functions related to the volume data including indexing, normal calculation, classification, clipping a vuRay (as vuSampleRay) to the bounding box, and aquiring interpolated sampling points advancing this ray.

Definition at line 23 of file Spectral/DatGrid.h.


Constructor & Destructor Documentation

ns_vu1112112::DatGrid::DatGrid  ) 
 

constructor

Definition at line 26 of file Spectral/DatGrid.cpp.

References layXY, maxX, maxY, maxZ, and vol.

ns_vu1112112::DatGrid::~DatGrid  ) 
 

destructor

Definition at line 32 of file Spectral/DatGrid.cpp.

References free_vol_mem().

Here is the call graph for this function:


Member Function Documentation

void ns_vu1112112::DatGrid::calculate_gradients  ) 
 

Calulates the gradients using central differencing.

Definition at line 292 of file Spectral/DatGrid.cpp.

References ns_vu1112112::DatPnt::data, ns_vu1112112::DatPnt::grad, ns_vu1112112::DatPnt::length, and vol.

Referenced by ns_vu1112112::vu1112112::preprocess().

void ns_vu1112112::DatGrid::classify vu1112112 r  ) 
 

perform pre-classification for each grid point.

calls DatPnt::classify(), plus checks visibility of cells.

Definition at line 261 of file Spectral/DatGrid.cpp.

References ns_vu1112112::DatPnt::classify(), ns_vu1112112::DatPnt::getFlag(), layXY, maxX, ns_vu1112112::DatPnt::setFlag(), size, and vol.

Referenced by ns_vu1112112::vu1112112::preprocess(), and ns_vu1112112::vu1112112::render().

Here is the call graph for this function:

float ns_vu1112112::DatGrid::clipRay vuSampleRay r,
bool  bidirectional,
int &  m_Side
const [private]
 

Definition at line 76 of file Spectral/DatGrid.cpp.

References m_C0, m_C1, vuRay::m_Direction, vuRay::m_Position, and ns_vu1112112::SnapToZero().

Referenced by ns_vu1112112::vuSampleRay::attachToGrid().

Here is the call graph for this function:

void ns_vu1112112::DatGrid::createSphere  ) 
 

Creates a sphere into a given bounding volume.

Definition at line 198 of file Spectral/DatGrid.cpp.

References ns_vu1112112::DatPnt::data, ns_vu1112112::DatPnt::illum, maxX, and vol.

void ns_vu1112112::DatGrid::distributeIllum ColourType il  )  [protected]
 

Definition at line 69 of file Spectral/DatGrid.cpp.

References ColourType.

int ns_vu1112112::DatGrid::free_vol_mem  )  [protected]
 

free the memory

Definition at line 37 of file Spectral/DatGrid.cpp.

References vol.

Referenced by get_vol_mem(), and ~DatGrid().

int ns_vu1112112::DatGrid::get_vol_mem  )  [protected]
 

get the memory for the set up size

Definition at line 49 of file Spectral/DatGrid.cpp.

References free_vol_mem(), maxX, maxY, and vol.

Referenced by init().

Here is the call graph for this function:

int ns_vu1112112::DatGrid::init int  maxx,
int  maxy,
int  maxz
 

prepares the memory for a data set of given size

Definition at line 59 of file Spectral/DatGrid.cpp.

References get_vol_mem(), layXY, m_C0, m_C1, maxX, maxY, maxZ, and size.

Referenced by load_vol().

Here is the call graph for this function:

bool ns_vu1112112::DatGrid::load_vol byte data,
vu1112112 r
 

loads a volume into the grid structure.

Does not do any further preprocessing steps.

Definition at line 235 of file Spectral/DatGrid.cpp.

References data, ns_vu1112112::DatPnt::data, init(), vu1112::m_Dim1Size, vu1112::m_Dim2Size, vu1112::m_Dim3Size, maxX, maxY, maxZ, size, and vol.

Referenced by ns_vu1112112::vu1112112::read(), and ns_vu1112112::vu1112112::readRaw().

Here is the call graph for this function:

void ns_vu1112112::DatGrid::shade vu1112112 r  ) 
 

perform shading for each grid point.

calls DatPnt::shade()

Definition at line 252 of file Spectral/DatGrid.cpp.

References ns_vu1112112::DatPnt::shade(), size, and vol.

Referenced by ns_vu1112112::vu1112112::preprocess().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class vuSampleRay [friend]
 

Definition at line 25 of file Spectral/DatGrid.h.


Member Data Documentation

int ns_vu1112112::DatGrid::layXY [protected]
 

size of x-y slice

Definition at line 56 of file Spectral/DatGrid.h.

Referenced by ns_vu1112112::vuSampleRay::advanceRay(), classify(), DatGrid(), and init().

vuVector ns_vu1112112::DatGrid::m_C0 [private]
 

Definition at line 66 of file Spectral/DatGrid.h.

Referenced by clipRay(), and init().

vuVector ns_vu1112112::DatGrid::m_C1 [private]
 

Definition at line 67 of file Spectral/DatGrid.h.

Referenced by clipRay(), and init().

int ns_vu1112112::DatGrid::maxX [protected]
 

Definition at line 55 of file Spectral/DatGrid.h.

Referenced by ns_vu1112112::vuSampleRay::advanceRay(), classify(), createSphere(), DatGrid(), get_vol_mem(), init(), and load_vol().

int ns_vu1112112::DatGrid::maxY [protected]
 

Definition at line 55 of file Spectral/DatGrid.h.

Referenced by ns_vu1112112::vuSampleRay::advanceRay(), DatGrid(), get_vol_mem(), init(), and load_vol().

int ns_vu1112112::DatGrid::maxZ [protected]
 

extents along each axis

Definition at line 55 of file Spectral/DatGrid.h.

Referenced by ns_vu1112112::vuSampleRay::advanceRay(), DatGrid(), init(), and load_vol().

int ns_vu1112112::DatGrid::size [protected]
 

total number of points in grid

Definition at line 57 of file Spectral/DatGrid.h.

DatPnt* ns_vu1112112::DatGrid::vol [protected]
 

Definition at line 61 of file Spectral/DatGrid.h.

Referenced by ns_vu1112112::vuSampleRay::advanceRay(), calculate_gradients(), classify(), createSphere(), DatGrid(), free_vol_mem(), get_vol_mem(), load_vol(), and shade().


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