Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   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 (VolumetricData *, float isovalue, int step)
 calculate isosurface for a given isovalue and step size. More...

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

int vertexfusion (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...

int DoGridPosNorms (float isovalue, int step)
int DoCellGeneral (int x, int y, int z, float isovalue, int 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...

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::QuickSurf.

int IsoSurface::compute VolumetricData  ,
float    isovalue,
int    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, isovalue, vol, xad, xax, VolumetricData::xsize, yad, yax, VolumetricData::ysize, z, zad, zax, and VolumetricData::zsize.

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

Definition at line 224 of file Isosurface.C.

References VolumetricData::access_volume_gradient, ResizeArray< float >::append3, ResizeArray< int >::append3, GRIDCELL::cubeindex, VolumetricData::data, f, GRIDCELL::g, isovalue, 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, z, zad, and zax.

Referenced by compute.

int IsoSurface::DoGridPosNorms float    isovalue,
int    step
 

Definition at line 92 of file Isosurface.C.

References VolumetricData::access_volume_gradient, ResizeArray< float >::append3, ResizeArray< int >::append3, GRIDCELL::cubeindex, VolumetricData::data, f, GRIDCELL::g, isovalue, 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, z, zax, and VolumetricData::zsize.

Referenced by compute.

void IsoSurface::normalize void   
 

renormalize surface normals.

Definition at line 381 of file Isosurface.C.

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

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

Definition at line 465 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 582 of file Isosurface.C.

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

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 602 of file Isosurface.C.

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

int IsoSurface::vertexfusion int    offset,
int    len
 

eliminate redundant vertices after the fact.

Definition at line 391 of file Isosurface.C.

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

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

Definition at line 519 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 clear, set_color_rgb3fv, and set_color_voltex_rgb3fv.

ResizeArray<int> IsoSurface::f
 

facets.

Definition at line 43 of file Isosurface.h.

Referenced by clear, DoCellGeneral, DoGridPosNorms, and vertexfusion.

ResizeArray<float> IsoSurface::n
 

normals.

Definition at line 41 of file Isosurface.h.

Referenced by 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 clear, DoCellGeneral, and DoGridPosNorms.

ResizeArray<float> IsoSurface::v
 

vertices.

Definition at line 40 of file Isosurface.h.

Referenced by clear, DoCellGeneral, DoGridPosNorms, set_color_rgb3fv, set_color_voltex_rgb3fv, and vertexfusion.

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 Tue Apr 23 04:25:40 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002