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

vu1512121 Class Reference

Implements a general splatter for this leaf of the tree. More...

#include <marchingtetrahedra.h>

Inheritance diagram for vu1512121:

Inheritance graph
[legend]
Collaboration diagram for vu1512121:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vu1512121 ()
 Default constructor creating an empty instance.
 vu1512121 (const vu1512121 &inst)
 Copy constructor which does a deep copy.
virtual ~vu1512121 ()
 Destructor.
vu1512121operator= (const vu1512121 &rhs)
 Assignment operator which does a deep copy.
void setViewVectors (const vuVector &view, const vuVector &up, const vuVector &right)
 Sets the camera viewing position for the render method.
void initOpenGL (void)
 Initializes open gl for rendering the volume data.
void render ()
 Implements the abstract render() method of the vuVolume base class.
void DrawSurfaceInSimplex (int indices[4][3], float ht)
void drawTriangle (float v1[3], float v2[3], float v3[3], float n1[3], float n2[3], float n3[3], bool order)
byte height (unsigned int x, unsigned int y, unsigned int z)
void computeGradient (int i, int j, int k, float *g, int mode)
void ComputeNormal (float *p, float *q, float *r, float *n)
void InterpolatePoint (float x1, float y1, float z1, float h1, float x2, float y2, float z2, float h2, float ht, float *result)
long getNTriangles ()
void resetNTriangles ()
virtual bool read ()
 Reimplements the read() method to do some extra volume data processing.
virtual bool readRaw (void)
 This method reads volume data stored using the .raw data type.

Private Attributes

int shading
long nTriangles
int printN
vuVector m_View
vuVector m_Shift0
vuVector m_Shift1
vuVector m_Shift2

Static Private Attributes

const int WIRE = 0
const int FLAT = 1
const int SMOOTH = 2

Detailed Description

Implements a general splatter for this leaf of the tree.

This class renders the volume using a general splatting method. The point of this splatter is to provide a general viewer that can be used for all purposes. The most efficient splatters change the volume data to speed up rendering, and therefore cannot be used with multiple transfer functions. The function of this splatter is to leave the volume data as is, while rendering as fast as possible. This allows users to apply different transfer functions, and to write and look at the data after rendering it.

Todo:
Find some way to add the ios::nocreate flag or some equivalent to this code so that we have similar behaviour in IRIX as we do Linux or Windows.

Definition at line 37 of file marchingtetrahedra.h.


Constructor & Destructor Documentation

vu1512121::vu1512121  ) 
 

Default constructor creating an empty instance.

Definition at line 11 of file marchingtetrahedra.cpp.

References nTriangles, printN, and shading.

vu1512121::vu1512121 const vu1512121 inst  ) 
 

Copy constructor which does a deep copy.

Definition at line 22 of file marchingtetrahedra.cpp.

vu1512121::~vu1512121  )  [virtual]
 

Destructor.

Definition at line 30 of file marchingtetrahedra.cpp.


Member Function Documentation

void vu1512121::computeGradient int  i,
int  j,
int  k,
float g,
int  mode
 

Definition at line 391 of file marchingtetrahedra.cpp.

References vu15121::getDataValue().

Referenced by DrawSurfaceInSimplex().

Here is the call graph for this function:

void vu1512121::ComputeNormal float p,
float q,
float r,
float n
 

Definition at line 424 of file marchingtetrahedra.cpp.

Referenced by DrawSurfaceInSimplex(), and drawTriangle().

void vu1512121::DrawSurfaceInSimplex int  indices[4][3],
float  ht
 

Definition at line 168 of file marchingtetrahedra.cpp.

References computeGradient(), ComputeNormal(), dot(), drawTriangle(), FLAT, vu15121::getDataValue(), InterpolatePoint(), SMOOTH, and WIRE.

Referenced by render().

Here is the call graph for this function:

void vu1512121::drawTriangle float  v1[3],
float  v2[3],
float  v3[3],
float  n1[3],
float  n2[3],
float  n3[3],
bool  order
 

Definition at line 311 of file marchingtetrahedra.cpp.

References ComputeNormal(), FLAT, GL_LINES, GL_TRIANGLES, glBegin(), glEnd(), glNormal3fv(), glVertex3fv(), nTriangles, SMOOTH, and WIRE.

Referenced by DrawSurfaceInSimplex().

Here is the call graph for this function:

long vu1512121::getNTriangles  )  [inline]
 

Definition at line 68 of file marchingtetrahedra.h.

Referenced by vuBCCMarchingTetrahedra::glRender().

byte vu1512121::height unsigned int  x,
unsigned int  y,
unsigned int  z
 

void vu1512121::initOpenGL void   ) 
 

Initializes open gl for rendering the volume data.

Definition at line 477 of file marchingtetrahedra.cpp.

void vu1512121::InterpolatePoint float  x1,
float  y1,
float  z1,
float  h1,
float  x2,
float  y2,
float  z2,
float  h2,
float  ht,
float result
 

Definition at line 455 of file marchingtetrahedra.cpp.

Referenced by DrawSurfaceInSimplex().

vu1512121 & vu1512121::operator= const vu1512121 rhs  ) 
 

Assignment operator which does a deep copy.

Definition at line 38 of file marchingtetrahedra.cpp.

References vu1512::operator=().

Here is the call graph for this function:

bool vu1512121::read  )  [virtual]
 

Reimplements the read() method to do some extra volume data processing.

Reimplemented from vu15121.

Definition at line 64 of file marchingtetrahedra.cpp.

References vu15121::read().

Referenced by vuBCCMarchingTetrahedra::init().

Here is the call graph for this function:

bool vu1512121::readRaw void   )  [virtual]
 

This method reads volume data stored using the .raw data type.

Definition at line 76 of file marchingtetrahedra.cpp.

References byte, and dword.

void vu1512121::render  )  [virtual]
 

Implements the abstract render() method of the vuVolume base class.

Implements vu1.

Definition at line 111 of file marchingtetrahedra.cpp.

References DrawSurfaceInSimplex().

Referenced by vuBCCMarchingTetrahedra::glOnMouse(), and vuBCCMarchingTetrahedra::glRender().

Here is the call graph for this function:

void vu1512121::resetNTriangles  )  [inline]
 

Definition at line 69 of file marchingtetrahedra.h.

References nTriangles.

Referenced by vuBCCMarchingTetrahedra::glRender().

void vu1512121::setViewVectors const vuVector view,
const vuVector up,
const vuVector right
[virtual]
 

Sets the camera viewing position for the render method.

Implements vu1.

Definition at line 51 of file marchingtetrahedra.cpp.

References m_Shift0, m_Shift1, m_Shift2, and m_View.

Referenced by vuBCCMarchingTetrahedra::glRender().


Member Data Documentation

const int vu1512121::FLAT = 1 [static, private]
 

Definition at line 83 of file marchingtetrahedra.h.

Referenced by DrawSurfaceInSimplex(), and drawTriangle().

vuVector vu1512121::m_Shift0 [private]
 

Definition at line 87 of file marchingtetrahedra.h.

Referenced by setViewVectors().

vuVector vu1512121::m_Shift1 [private]
 

Definition at line 88 of file marchingtetrahedra.h.

Referenced by setViewVectors().

vuVector vu1512121::m_Shift2 [private]
 

Definition at line 89 of file marchingtetrahedra.h.

Referenced by setViewVectors().

vuVector vu1512121::m_View [private]
 

Definition at line 86 of file marchingtetrahedra.h.

Referenced by setViewVectors().

long vu1512121::nTriangles [private]
 

Definition at line 79 of file marchingtetrahedra.h.

Referenced by drawTriangle(), resetNTriangles(), and vu1512121().

int vu1512121::printN [private]
 

Definition at line 80 of file marchingtetrahedra.h.

Referenced by vu1512121().

int vu1512121::shading [private]
 

Definition at line 78 of file marchingtetrahedra.h.

Referenced by vu1512121().

const int vu1512121::SMOOTH = 2 [static, private]
 

Definition at line 84 of file marchingtetrahedra.h.

Referenced by DrawSurfaceInSimplex(), and drawTriangle().

const int vu1512121::WIRE = 0 [static, private]
 

Definition at line 82 of file marchingtetrahedra.h.

Referenced by DrawSurfaceInSimplex(), and drawTriangle().


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