Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

IsoSurface Class Reference

Class implementing triangulated isosurface extraction routines. More...

#include <Isosurface.h>

List of all members.

Public Methods

 IsoSurface ()
 constructor. More...

int compute (const VolumetricData *, float isovalue, long step)
 calculate isosurface for a given isovalue and step size. More...

void normalize (void)
 renormalize surface normals. More...

int vertexfusion (const VolumetricData *, int offset, int len)
 eliminate redundant vertices after the fact. More...

int set_color_rgb3fv (const float *rgb)
 assign a single color for the entire mesh. More...

int set_color_voltex_rgb3fv (const float *voltex)
 assign per-vertex colors from a volumetric texture map with the same dimensions as the original volumetric data. More...

void clear ()
 free up memory. More...

long DoGridPosNorms (float isovalue, long step)
long DoCellGeneral (long x, long y, long z, float isovalue, long step)
int Polygonise (const GRIDCELL grid, const float isolevel, TRIANGLE *triangles)
void VertexInterp (float isolevel, const GRIDCELL grid, int ind1, int ind2, XYZ *vert, XYZ *norm)

Public Attributes

int numtriangles
 number of triangles in the facet list. More...

ResizeArray< float > v
 vertices. More...

ResizeArray< float > n
 normals. More...

ResizeArray< float > c
 colors. More...

ResizeArray< int > f
 facets. More...

const VolumetricDatavol
 volume data pointer. More...

float xax [3]
float yax [3]
float zax [3]
 per-voxel/cell axes. More...

float xad [3]
float yad [3]
float zad [3]
 volume basis direction vectors. More...


Detailed Description

Class implementing triangulated isosurface extraction routines.

Definition at line 37 of file Isosurface.h.


Constructor & Destructor Documentation

IsoSurface::IsoSurface  
 

constructor.

Definition at line 22 of file Isosurface.C.


Member Function Documentation

void IsoSurface::clear  
 

free up memory.

Definition at line 24 of file Isosurface.C.

References c, ResizeArray< int >::clear, ResizeArray< float >::clear, f, n, numtriangles, and v.

Referenced by QuickSurf::calc_surf, and QuickSurf::QuickSurf.

int IsoSurface::compute const VolumetricData  ,
float    isovalue,
long    step
 

calculate isosurface for a given isovalue and step size.

Definition at line 33 of file Isosurface.C.

References VolumetricData::cell_axes, VolumetricData::cell_dirs, cross_prod, data, DoCellGeneral, DoGridPosNorms, dot_prod, vol, xad, xax, VolumetricData::xsize, yad, yax, VolumetricData::ysize, zad, zax, and VolumetricData::zsize.

Referenced by QuickSurf::calc_surf.

long IsoSurface::DoCellGeneral long    x,
long    y,
long    z,
float    isovalue,
long    step
 

Definition at line 229 of file Isosurface.C.

References ResizeArray< float >::append, ResizeArray< int >::append, GRIDCELL::cubeindex, VolumetricData::data, f, GRIDCELL::g, n, TRIANGLE::n, numtriangles, VolumetricData::origin, TRIANGLE::p, GRIDCELL::p, Polygonise, v, GRIDCELL::val, vol, VOXEL_GRADIENT_FAST, XYZ::x, xad, xax, VolumetricData::xsize, XYZ::y, yad, yax, VolumetricData::ysize, XYZ::z, zad, and zax.

Referenced by compute.

long IsoSurface::DoGridPosNorms float    isovalue,
long    step
 

Definition at line 93 of file Isosurface.C.

References ResizeArray< float >::append, ResizeArray< int >::append, GRIDCELL::cubeindex, VolumetricData::data, f, GRIDCELL::g, n, numtriangles, VolumetricData::origin, TRIANGLE::p, GRIDCELL::p, Polygonise, v, GRIDCELL::val, vol, VOXEL_GRADIENT_FAST, XYZ::x, xax, VolumetricData::xsize, XYZ::y, yax, VolumetricData::ysize, XYZ::z, zax, and VolumetricData::zsize.

Referenced by compute.

void IsoSurface::normalize void   
 

renormalize surface normals.

Definition at line 372 of file Isosurface.C.

References n, ResizeArray< float >::num, and vec_normalize.

Referenced by QuickSurf::calc_surf.

int IsoSurface::Polygonise const GRIDCELL    grid,
const float    isolevel,
TRIANGLE   triangles
 

Definition at line 454 of file Isosurface.C.

References GRIDCELL::cubeindex, TRIANGLE::n, TRIANGLE::p, and VertexInterp.

Referenced by DoCellGeneral, and DoGridPosNorms.

int IsoSurface::set_color_rgb3fv const float *    rgb
 

assign a single color for the entire mesh.

Definition at line 567 of file Isosurface.C.

References ResizeArray< float >::append, c, ResizeArray< float >::num, and v.

Referenced by QuickSurf::calc_surf.

int IsoSurface::set_color_voltex_rgb3fv const float *    voltex
 

assign per-vertex colors from a volumetric texture map with the same dimensions as the original volumetric data.

Definition at line 582 of file Isosurface.C.

References ResizeArray< float >::append, c, MAX, MIN, ResizeArray< float >::num, VolumetricData::origin, v, vec_copy, vec_normalize, vol, xax, VolumetricData::xsize, yax, VolumetricData::ysize, zax, and VolumetricData::zsize.

Referenced by QuickSurf::calc_surf.

int IsoSurface::vertexfusion const VolumetricData  ,
int    offset,
int    len
 

eliminate redundant vertices after the fact.

Definition at line 380 of file Isosurface.C.

References data, f, n, ResizeArray< float >::num, ResizeArray< int >::num, ResizeArray< float >::truncatelastn, and v.

Referenced by QuickSurf::calc_surf.

void IsoSurface::VertexInterp float    isolevel,
const GRIDCELL    grid,
int    ind1,
int    ind2,
XYZ   vert,
XYZ   norm
 

Definition at line 508 of file Isosurface.C.

References GRIDCELL::g, GRIDCELL::p, GRIDCELL::val, XYZ::x, XYZ::y, and XYZ::z.

Referenced by Polygonise.


Member Data Documentation

ResizeArray<float> IsoSurface::c
 

colors.

Definition at line 42 of file Isosurface.h.

Referenced by QuickSurf::calc_surf, clear, set_color_rgb3fv, and set_color_voltex_rgb3fv.

ResizeArray<int> IsoSurface::f
 

facets.

Definition at line 43 of file Isosurface.h.

Referenced by QuickSurf::calc_surf, clear, DoCellGeneral, DoGridPosNorms, and vertexfusion.

ResizeArray<float> IsoSurface::n
 

normals.

Definition at line 41 of file Isosurface.h.

Referenced by QuickSurf::calc_surf, clear, DoCellGeneral, DoGridPosNorms, normalize, and vertexfusion.

int IsoSurface::numtriangles
 

number of triangles in the facet list.

Definition at line 39 of file Isosurface.h.

Referenced by QuickSurf::calc_surf, clear, DoCellGeneral, and DoGridPosNorms.

ResizeArray<float> IsoSurface::v
 

vertices.

Definition at line 40 of file Isosurface.h.

Referenced by QuickSurf::calc_surf, clear, DoCellGeneral, DoGridPosNorms, set_color_rgb3fv, set_color_voltex_rgb3fv, and vertexfusion.

const VolumetricData* IsoSurface::vol
 

volume data pointer.

Definition at line 44 of file Isosurface.h.

Referenced by compute, DoCellGeneral, DoGridPosNorms, and set_color_voltex_rgb3fv.

float IsoSurface::xad[3]
 

Definition at line 46 of file Isosurface.h.

Referenced by compute, and DoCellGeneral.

float IsoSurface::xax[3]
 

Definition at line 45 of file Isosurface.h.

Referenced by compute, DoCellGeneral, DoGridPosNorms, and set_color_voltex_rgb3fv.

float IsoSurface::yad[3]
 

Definition at line 46 of file Isosurface.h.

Referenced by compute, and DoCellGeneral.

float IsoSurface::yax[3]
 

Definition at line 45 of file Isosurface.h.

Referenced by compute, DoCellGeneral, DoGridPosNorms, and set_color_voltex_rgb3fv.

float IsoSurface::zad[3]
 

volume basis direction vectors.

Definition at line 46 of file Isosurface.h.

Referenced by compute, and DoCellGeneral.

float IsoSurface::zax[3]
 

per-voxel/cell axes.

Definition at line 45 of file Isosurface.h.

Referenced by compute, DoCellGeneral, DoGridPosNorms, and set_color_voltex_rgb3fv.


The documentation for this class was generated from the following files:
Generated on Thu May 23 01:48:52 2013 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002