Langmuir
Simulation
|
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_field & | createScalarField (int xsize, int ysize, int zsize, float spacing=1.0) |
set up scalar field More... | |
scalar_field * | getScalarField () |
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_field * | m_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... | |
A class to compute a contour iso-surface.
|
explicit |
Create isosurface.
LangmuirView::MarchingCubes::Isosurface::~Isosurface | ( | ) |
Destroy isosurface.
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
xsize | number of x points |
ysize | number of y points |
zsize | number of z points |
spacing | grid spacing |
|
signal |
signal that the calculation is done
void LangmuirView::MarchingCubes::Isosurface::generate | ( | ) |
perform calculation
|
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
|
private |
perform marching cubes algorithm at array point
const QVector<float>& LangmuirView::MarchingCubes::Isosurface::normals | ( | ) | const |
get list of normals
|
signal |
signal progress
void LangmuirView::MarchingCubes::Isosurface::setIsoValue | ( | float | value | ) |
set contour isovalue
value | value to set |
|
private |
simplify vertex, normal, and index arrays
const QVector<float>& LangmuirView::MarchingCubes::Isosurface::vertices | ( | ) | const |
get list of vertices
|
private |
list of indices
|
private |
list of normals
|
private |
3D array of field
|
private |
grid spacing
|
private |
list of triangles
|
private |
contour iso-value
|
private |
list of vertices
|
private |
grid points (x)
|
private |
grid points (y)
|
private |
grid points (z)