A class that polygonizes a scalar field using the marching cubes and dividing cubes algorithms.
More...
#include <VolumeMesher.h>
List of all members.
Public Types |
enum | MeshingMethod { MARCHING_CUBES,
DIVIDING_CUBES
} |
Public Member Functions |
| VolumeMesher (int _resX, int _resY, int _resZ, ImageUnitStack *_imageUnitStack) |
| Constructor.
|
| ~VolumeMesher () |
| Destructor.
|
void | init () |
| Initialization function.
|
int | getResX () const |
| Accessor for the X dimension of the marching grid.
|
int | getResY () const |
| Accessor for the Y dimension of the marching grid.
|
int | getResZ () const |
| Accessor for the Z dimension of the marching grid.
|
void | setResolution (int _resX, int _resY, int _resZ) |
| Sets the marching grid's resolution.
|
float | getSamplingStepX () const |
| Accessor for the sampling step in the X direction.
|
float | getSamplingStepY () const |
| Accessor for the sampling step in the Y direction.
|
float | getSamplingStepZ () const |
| Accessor for the sampling step in the Z direction.
|
void | drawMesh (Texture3D *_texture3D, float _isoLevel, int _samplingChannel, ngl::Colour *_colour, ngl::Matrix _modelMatrix, bool _inverseNormals=false) |
| Draws the generated mesh.
|
void | resetResolution (int _resX, int _resY, int _resZ) |
| Resets the marching grid resolution.
|
void | setMeshingMethod (MeshingMethod _meshingMethod) |
| Changes the meshing method.
|
void | passViewProjectionMatrix (ngl::Matrix _modelViewMatrix, ngl::Matrix _projectionMatrix) |
| Passes the view and projection matrices to the class.
|
Detailed Description
A class that polygonizes a scalar field using the marching cubes and dividing cubes algorithms.
- Author:
- Nikolaos Verigakis
- Version:
- 1.0
- Date:
- 14/06/11 Revision History : Initial Version 14/06/11
Constructor & Destructor Documentation
VolumeMesher::VolumeMesher |
( |
int |
_resX, |
|
|
int |
_resY, |
|
|
int |
_resZ, |
|
|
ImageUnitStack * |
_imageUnitStack |
|
) |
| |
Constructor.
end of citation
- Parameters:
-
[in] | _resX | the resolution in X |
[in] | _resX | the resolution in Y |
[in] | _resX | the resolution in Z |
Member Function Documentation
void VolumeMesher::drawMesh |
( |
Texture3D * |
_texture3D, |
|
|
float |
_isoLevel, |
|
|
int |
_samplingChannel, |
|
|
ngl::Colour * |
_colour, |
|
|
ngl::Matrix |
_modelMatrix, |
|
|
bool |
_inverseNormals = false |
|
) |
| |
Draws the generated mesh.
- Parameters:
-
[in] | _texture3D | the 3D texture to draw |
[in] | _isoLevel | the iso-surface's iso threshold |
[in] | _samplingChannel | the texture channel to sample the iso-surface from |
[in] | _colour | the iso-surface colour |
[in] | _modelMatrix | the active model matrix |
[in] | _inverseNormals | a flag for inversing the surface normals |
void VolumeMesher::passViewProjectionMatrix |
( |
ngl::Matrix |
_modelViewMatrix, |
|
|
ngl::Matrix |
_projectionMatrix |
|
) |
| |
Passes the view and projection matrices to the class.
- Parameters:
-
[in] | _modelViewMatrix | the model view matrix |
[in] | _projectionMatrix | the projection matrix |
void VolumeMesher::resetResolution |
( |
int |
_resX, |
|
|
int |
_resY, |
|
|
int |
_resZ |
|
) |
| |
Resets the marching grid resolution.
- Parameters:
-
[in] | _resX | the new resolution in X |
[in] | _resY | the new resolution in Y |
[in] | _resZ | the new resolution in Z |
void VolumeMesher::setMeshingMethod |
( |
MeshingMethod |
_meshingMethod | ) |
|
Changes the meshing method.
- Parameters:
-
[in] | _meshingMethod | the new meshing method |
void VolumeMesher::setResolution |
( |
int |
_resX, |
|
|
int |
_resY, |
|
|
int |
_resZ |
|
) |
| [inline] |
Sets the marching grid's resolution.
- Parameters:
-
[in] | _resX | the resolution in the X direction |
[in] | _resY | the resolution in the Y direction |
[in] | _resZ | the resolution in the Z direction |
The documentation for this class was generated from the following files: