Langmuir
Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LangmuirView::MarchingCubes::Isosurface Class Reference

A class to compute a contour iso-surface. More...

#include <isosurface.h>

Signals

void done ()
 signal that the calculation is done More...
 
void progress (int)
 signal progress More...
 

Public Member Functions

 Isosurface (QObject *parent=0)
 Create isosurface. More...
 
 ~Isosurface ()
 Destroy isosurface. More...
 
scalar_fieldcreateScalarField (int xsize, int ysize, int zsize, float spacing=1.0)
 set up scalar field More...
 
scalar_fieldgetScalarField ()
 get reference to scalar field More...
 
void setIsoValue (float value)
 set contour isovalue More...
 
void generate ()
 perform calculation More...
 
void clear ()
 clear data More...
 
const QVector< float > & vertices () const
 get list of vertices More...
 
const QVector< float > & normals () const
 get list of normals More...
 
const QVector< unsigned int > & indices () const
 get list of indices More...
 

Private Member Functions

float getOffset (const float &v1, const float &v2, const float &v)
 find the approximate point of intersection of the surface between two points with the values v1 and v2 More...
 
void marchingCubes (int xi, int yi, int zi)
 perform marching cubes algorithm at array point More...
 
void simplify ()
 simplify vertex, normal, and index arrays More...
 

Private Attributes

QList< Triangle * > m_triangles
 list of triangles More...
 
QVector< float > m_vertices
 list of vertices More...
 
QVector< float > m_normals
 list of normals More...
 
QVector< unsigned int > m_indices
 list of indices More...
 
scalar_fieldm_scalar
 3D array of field More...
 
float m_spacing
 grid spacing More...
 
float m_value
 contour iso-value More...
 
int m_xsize
 grid points (x) More...
 
int m_ysize
 grid points (y) More...
 
int m_zsize
 grid points (z) More...
 

Detailed Description

A class to compute a contour iso-surface.

Constructor & Destructor Documentation

LangmuirView::MarchingCubes::Isosurface::Isosurface ( QObject *  parent = 0)
explicit

Create isosurface.

LangmuirView::MarchingCubes::Isosurface::~Isosurface ( )

Destroy isosurface.

Member Function Documentation

void LangmuirView::MarchingCubes::Isosurface::clear ( )

clear data

scalar_field& LangmuirView::MarchingCubes::Isosurface::createScalarField ( int  xsize,
int  ysize,
int  zsize,
float  spacing = 1.0 
)

set up scalar field

Parameters
xsizenumber of x points
ysizenumber of y points
zsizenumber of z points
spacinggrid spacing
void LangmuirView::MarchingCubes::Isosurface::done ( )
signal

signal that the calculation is done

void LangmuirView::MarchingCubes::Isosurface::generate ( )

perform calculation

float LangmuirView::MarchingCubes::Isosurface::getOffset ( const float &  v1,
const float &  v2,
const float &  v 
)
private

find the approximate point of intersection of the surface between two points with the values v1 and v2

scalar_field* LangmuirView::MarchingCubes::Isosurface::getScalarField ( )

get reference to scalar field

const QVector<unsigned int>& LangmuirView::MarchingCubes::Isosurface::indices ( ) const

get list of indices

void LangmuirView::MarchingCubes::Isosurface::marchingCubes ( int  xi,
int  yi,
int  zi 
)
private

perform marching cubes algorithm at array point

const QVector<float>& LangmuirView::MarchingCubes::Isosurface::normals ( ) const

get list of normals

void LangmuirView::MarchingCubes::Isosurface::progress ( int  )
signal

signal progress

void LangmuirView::MarchingCubes::Isosurface::setIsoValue ( float  value)

set contour isovalue

Parameters
valuevalue to set
void LangmuirView::MarchingCubes::Isosurface::simplify ( )
private

simplify vertex, normal, and index arrays

const QVector<float>& LangmuirView::MarchingCubes::Isosurface::vertices ( ) const

get list of vertices

Member Data Documentation

QVector<unsigned int> LangmuirView::MarchingCubes::Isosurface::m_indices
private

list of indices

QVector<float> LangmuirView::MarchingCubes::Isosurface::m_normals
private

list of normals

scalar_field* LangmuirView::MarchingCubes::Isosurface::m_scalar
private

3D array of field

float LangmuirView::MarchingCubes::Isosurface::m_spacing
private

grid spacing

QList<Triangle*> LangmuirView::MarchingCubes::Isosurface::m_triangles
private

list of triangles

float LangmuirView::MarchingCubes::Isosurface::m_value
private

contour iso-value

QVector<float> LangmuirView::MarchingCubes::Isosurface::m_vertices
private

list of vertices

int LangmuirView::MarchingCubes::Isosurface::m_xsize
private

grid points (x)

int LangmuirView::MarchingCubes::Isosurface::m_ysize
private

grid points (y)

int LangmuirView::MarchingCubes::Isosurface::m_zsize
private

grid points (z)


The documentation for this class was generated from the following file: