Blender V2.61 - r43446
Public Member Functions | Protected Member Functions | Protected Attributes

IsoSurface Class Reference

class to triangulate a scalar field, e.g. for More...

#include <isosurface.h>

Inheritance diagram for IsoSurface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IsoSurface (double iso)
virtual ~IsoSurface ()
virtual void initializeIsosurface (int setx, int sety, int setz, ntlVec3Gfx extent)
void resetAll (gfxReal val)
void triangulate (void)
void setParticles (ParticleTracer *pnt, float psize)
void setSubdivs (int s)
int getSubdivs ()
void setUseFulledgeArrays (bool set)
void setStart (ntlVec3Gfx set)
 set geometry start (for renderer)
ntlVec3Gfx getStart ()
void setEnd (ntlVec3Gfx set)
 set geometry end (for renderer)
ntlVec3Gfx getEnd ()
void setIsolevel (double set)
 set iso level value for surface reconstruction
void setSmoothSurface (float set)
 set loop subdiv num
void setSmoothNormals (float set)
float getSmoothSurface ()
float getSmoothNormals ()
virtual void getTriangles (double t, vector< ntlTriangle > *triangles, vector< ntlVec3Gfx > *vertices, vector< ntlVec3Gfx > *normals, int objectId)
virtual ntlVec3GfxgetBBStart ()
 for easy GUI detection get start of axis aligned bounding box, return NULL of no BB
virtual ntlVec3GfxgetBBEnd ()
float * getData ()
 access data array
float * getData (int ii, int jj, int kk)
float * lbmGetData (int ii, int jj, int kk)
void setCutoff (int set)
 set cut off border
void setCutArray (int *set)
 set cut off border
unsigned int getIsoVertexCount ()
 OpenGL viz "interface".
unsigned int getIsoIndexCount ()
char * getIsoVertexArray ()
unsigned int * getIsoIndexArray ()
void setSmoothRad (float radi1, float radi2, ntlVec3Gfx mscc)
void smoothSurface (float val, bool smoothNorm)
void smoothNormals (float val)
void computeNormals ()

Protected Member Functions

ntlVec3Gfx getNormal (int i, int j, int k)
 compute normal
bool diffuseVertexField (ntlVec3Gfx *field, int pointerScale, int v, float invsigma2, ntlVec3Gfx &flt)
 smoothing helper function

Protected Attributes

int mSizex
 size
int mSizey
int mSizez
float * mpData
 data pointer
double mIsoValue
 Level of the iso surface.
vector< IsoLevelVertexmPoints
 Store all the triangles vertices.
bool mUseFullEdgeArrays
 use full arrays? (not for farfield)
int * mpEdgeVerticesX
 Store indices of calculated points along the cubie edges.
int * mpEdgeVerticesY
int * mpEdgeVerticesZ
int mEdgeArSize
vector< unsigned int > mIndices
 vector for all the triangles (stored as 3 indices)
ntlVec3Gfx mStart
 start and end vectors for the triangulation region to create triangles in
ntlVec3Gfx mEnd
ntlVec3Gfx mDomainExtent
 normalized domain extent from parametrizer/visualizer
bool mInitDone
 initialized?
float mSmoothSurface
 amount of surface smoothing
float mSmoothNormals
 amount of normal smoothing
vector< int > mAcrossEdge
 grid data
vector< vector< int > > mAdjacentFaces
int mCutoff
 cutoff border area
int * mCutArray
 cutoff heigh values
ParticleTracermpIsoParts
 particle pointer
float mPartSize
 particle size
int mSubdivs
 no of subdivisions
vector< int > flags
 trimesh vars
int mFlagCnt
vector< ntlVec3Gfxcornerareas
vector< float > pointareas
vector< vector< int > > neighbors
vector< int > mDboundary
float mSCrad1
float mSCrad2
ntlVec3Gfx mSCcenter

Detailed Description

class to triangulate a scalar field, e.g. for

Definition at line 41 of file isosurface.h.


Constructor & Destructor Documentation

IsoSurface::IsoSurface ( double  iso)

Constructor

Definition at line 31 of file isosurface.cpp.

IsoSurface::~IsoSurface ( void  ) [virtual]

Destructor

Definition at line 123 of file isosurface.cpp.

References mpData, mpEdgeVerticesX, mpEdgeVerticesY, and mpEdgeVerticesZ.


Member Function Documentation

void IsoSurface::computeNormals ( )

Definition at line 768 of file isosurface.cpp.

References cross(), i, mIndices, mPoints, norm(), normalize(), and normNoSqrt().

Referenced by triangulate().

bool IsoSurface::diffuseVertexField ( ntlVec3Gfx field,
int  pointerScale,
int  v,
float  invsigma2,
ntlVec3Gfx flt 
) [protected]

smoothing helper function

Definition at line 799 of file isosurface.cpp.

References dot(), flags, i, mDboundary, mFlagCnt, mPoints, mSCcenter, mSCrad1, mSCrad2, neighbors, normNoSqrt(), pointareas, size(), and sqrt().

Referenced by smoothNormals(), and smoothSurface().

virtual ntlVec3Gfx* IsoSurface::getBBEnd ( ) [inline, virtual]

Reimplemented from ntlGeometryClass.

Definition at line 162 of file isosurface.h.

References mEnd.

virtual ntlVec3Gfx* IsoSurface::getBBStart ( ) [inline, virtual]

for easy GUI detection get start of axis aligned bounding box, return NULL of no BB

Reimplemented from ntlGeometryClass.

Definition at line 161 of file isosurface.h.

References mStart.

float* IsoSurface::getData ( ) [inline]

access data array

Definition at line 165 of file isosurface.h.

References mpData.

Referenced by getNormal(), LbmFsgrSolver::initializeSolverMemory(), and triangulate().

float* IsoSurface::getData ( int  ii,
int  jj,
int  kk 
) [inline]

Definition at line 166 of file isosurface.h.

References errMsg, ISOLEVEL_INDEX, ISOSTRICT_EXIT, mpData, mSizex, mSizey, and mSizez.

ntlVec3Gfx IsoSurface::getEnd ( ) [inline]

Definition at line 146 of file isosurface.h.

References mEnd.

unsigned int* IsoSurface::getIsoIndexArray ( ) [inline]

Definition at line 208 of file isosurface.h.

References mIndices.

Referenced by LbmSolverInterface::getIsoIndexArray().

unsigned int IsoSurface::getIsoIndexCount ( ) [inline]

Definition at line 202 of file isosurface.h.

References mIndices.

Referenced by LbmSolverInterface::getIsoIndexCount().

char* IsoSurface::getIsoVertexArray ( ) [inline]

Definition at line 205 of file isosurface.h.

References mPoints.

Referenced by LbmSolverInterface::getIsoVertexArray().

unsigned int IsoSurface::getIsoVertexCount ( ) [inline]

OpenGL viz "interface".

Definition at line 199 of file isosurface.h.

References mPoints.

Referenced by LbmSolverInterface::getIsoVertexCount().

ntlVec3Gfx IsoSurface::getNormal ( int  i,
int  j,
int  k 
) [inline, protected]

compute normal

Definition at line 739 of file isosurface.cpp.

References getData().

Referenced by triangulate().

float IsoSurface::getSmoothNormals ( ) [inline]

Definition at line 153 of file isosurface.h.

References mSmoothNormals.

Referenced by LbmFsgrSolver::initializeSolverPostinit().

float IsoSurface::getSmoothSurface ( ) [inline]

Definition at line 152 of file isosurface.h.

References mSmoothSurface.

Referenced by LbmFsgrSolver::initializeSolverPostinit().

ntlVec3Gfx IsoSurface::getStart ( ) [inline]

Definition at line 143 of file isosurface.h.

References mStart.

int IsoSurface::getSubdivs ( ) [inline]

Definition at line 68 of file isosurface.h.

References mSubdivs.

Referenced by LbmFsgrSolver::initializeSolverPostinit().

void IsoSurface::getTriangles ( double  t,
vector< ntlTriangle > *  triangles,
vector< ntlVec3Gfx > *  vertices,
vector< ntlVec3Gfx > *  normals,
int  objectId 
) [virtual]
void IsoSurface::initializeIsosurface ( int  setx,
int  sety,
int  setz,
ntlVec3Gfx  extent 
) [virtual]
float* IsoSurface::lbmGetData ( int  ii,
int  jj,
int  kk 
) [inline]
void IsoSurface::resetAll ( gfxReal  val)

Reset all values

Definition at line 114 of file isosurface.cpp.

References i, mpData, mSizex, mSizey, mSizez, nodes, and simple_enum_gen::val.

Referenced by LbmFsgrSolver::prepareVisualization().

void IsoSurface::setCutArray ( int *  set) [inline]

set cut off border

Definition at line 196 of file isosurface.h.

References mCutArray.

void IsoSurface::setCutoff ( int  set) [inline]

set cut off border

Definition at line 194 of file isosurface.h.

References mCutoff.

void IsoSurface::setEnd ( ntlVec3Gfx  set) [inline]

set geometry end (for renderer)

Definition at line 145 of file isosurface.h.

References mEnd.

Referenced by LbmFsgrSolver::initializeSolverMemory().

void IsoSurface::setIsolevel ( double  set) [inline]

set iso level value for surface reconstruction

Definition at line 148 of file isosurface.h.

References mIsoValue.

Referenced by LbmFsgrSolver::initializeSolverMemory().

void IsoSurface::setParticles ( ParticleTracer pnt,
float  psize 
) [inline]

set particle pointer

Definition at line 62 of file isosurface.h.

References mPartSize, and mpIsoParts.

Referenced by LbmFsgrSolver::initializeSolverPostinit().

void IsoSurface::setSmoothNormals ( float  set) [inline]

Definition at line 151 of file isosurface.h.

References mSmoothNormals.

Referenced by LbmFsgrSolver::initializeSolverMemory().

void IsoSurface::setSmoothRad ( float  radi1,
float  radi2,
ntlVec3Gfx  mscc 
)

Definition at line 761 of file isosurface.cpp.

References mSCcenter, mSCrad1, and mSCrad2.

void IsoSurface::setSmoothSurface ( float  set) [inline]

set loop subdiv num

Definition at line 150 of file isosurface.h.

References mSmoothSurface.

Referenced by LbmFsgrSolver::initializeSolverMemory().

void IsoSurface::setStart ( ntlVec3Gfx  set) [inline]

set geometry start (for renderer)

Definition at line 142 of file isosurface.h.

References mStart.

Referenced by LbmFsgrSolver::initializeSolverMemory().

void IsoSurface::setSubdivs ( int  s) [inline]

set # of subdivisions, this has to be done before init!

Definition at line 64 of file isosurface.h.

References errFatal, mInitDone, mSubdivs, and SIMWORLD_INITERROR.

Referenced by LbmFsgrSolver::initializeSolverMemory().

void IsoSurface::setUseFulledgeArrays ( bool  set) [inline]

set full edge settings, this has to be done before init!

Definition at line 70 of file isosurface.h.

References errFatal, mInitDone, mUseFullEdgeArrays, and SIMWORLD_INITERROR.

Referenced by LbmFsgrSolver::initializeSolverMemory().

void IsoSurface::smoothNormals ( float  val)
void IsoSurface::smoothSurface ( float  val,
bool  smoothNorm 
)
void IsoSurface::triangulate ( void  )

Member Data Documentation

vector<ntlVec3Gfx> IsoSurface::cornerareas [protected]

Definition at line 134 of file isosurface.h.

Referenced by smoothNormals(), and smoothSurface().

vector<int> IsoSurface::flags [protected]

trimesh vars

Definition at line 132 of file isosurface.h.

Referenced by diffuseVertexField(), smoothNormals(), and smoothSurface().

vector<int> IsoSurface::mAcrossEdge [protected]

grid data

Definition at line 117 of file isosurface.h.

vector< vector<int> > IsoSurface::mAdjacentFaces [protected]

Definition at line 118 of file isosurface.h.

int* IsoSurface::mCutArray [protected]

cutoff heigh values

Definition at line 123 of file isosurface.h.

Referenced by setCutArray(), and triangulate().

int IsoSurface::mCutoff [protected]

cutoff border area

Definition at line 121 of file isosurface.h.

Referenced by setCutoff(), and triangulate().

vector<int> IsoSurface::mDboundary [protected]

Definition at line 224 of file isosurface.h.

Referenced by diffuseVertexField().

normalized domain extent from parametrizer/visualizer

Definition at line 106 of file isosurface.h.

Referenced by initializeIsosurface().

int IsoSurface::mEdgeArSize [protected]

Definition at line 96 of file isosurface.h.

Referenced by initializeIsosurface(), and triangulate().

Definition at line 103 of file isosurface.h.

Referenced by getBBEnd(), getEnd(), initializeIsosurface(), setEnd(), and triangulate().

int IsoSurface::mFlagCnt [protected]

Definition at line 133 of file isosurface.h.

Referenced by diffuseVertexField().

vector<unsigned int> IsoSurface::mIndices [protected]

vector for all the triangles (stored as 3 indices)

Definition at line 100 of file isosurface.h.

Referenced by computeNormals(), getIsoIndexArray(), getIsoIndexCount(), getTriangles(), initializeIsosurface(), smoothNormals(), smoothSurface(), and triangulate().

bool IsoSurface::mInitDone [protected]

initialized?

Definition at line 109 of file isosurface.h.

Referenced by getTriangles(), initializeIsosurface(), setSubdivs(), and setUseFulledgeArrays().

double IsoSurface::mIsoValue [protected]

Level of the iso surface.

Definition at line 85 of file isosurface.h.

Referenced by setIsolevel(), and triangulate().

float IsoSurface::mPartSize [protected]

particle size

Definition at line 127 of file isosurface.h.

Referenced by setParticles(), and triangulate().

float* IsoSurface::mpData [protected]

data pointer

Definition at line 82 of file isosurface.h.

Referenced by getData(), initializeIsosurface(), lbmGetData(), resetAll(), triangulate(), and ~IsoSurface().

int* IsoSurface::mpEdgeVerticesX [protected]

Store indices of calculated points along the cubie edges.

Definition at line 93 of file isosurface.h.

Referenced by initializeIsosurface(), triangulate(), and ~IsoSurface().

int* IsoSurface::mpEdgeVerticesY [protected]

Definition at line 94 of file isosurface.h.

Referenced by initializeIsosurface(), triangulate(), and ~IsoSurface().

int* IsoSurface::mpEdgeVerticesZ [protected]

Definition at line 95 of file isosurface.h.

Referenced by initializeIsosurface(), triangulate(), and ~IsoSurface().

particle pointer

Definition at line 125 of file isosurface.h.

Referenced by setParticles(), and triangulate().

vector<IsoLevelVertex> IsoSurface::mPoints [protected]

Definition at line 226 of file isosurface.h.

Referenced by diffuseVertexField(), and setSmoothRad().

float IsoSurface::mSCrad1 [protected]

Definition at line 225 of file isosurface.h.

Referenced by diffuseVertexField(), and setSmoothRad().

float IsoSurface::mSCrad2 [protected]

Definition at line 225 of file isosurface.h.

Referenced by diffuseVertexField(), and setSmoothRad().

int IsoSurface::mSizex [protected]

size

Definition at line 79 of file isosurface.h.

Referenced by getData(), initializeIsosurface(), lbmGetData(), resetAll(), and triangulate().

int IsoSurface::mSizey [protected]

Definition at line 79 of file isosurface.h.

Referenced by getData(), initializeIsosurface(), lbmGetData(), resetAll(), and triangulate().

int IsoSurface::mSizez [protected]

Definition at line 79 of file isosurface.h.

Referenced by getData(), initializeIsosurface(), lbmGetData(), resetAll(), and triangulate().

float IsoSurface::mSmoothNormals [protected]

amount of normal smoothing

Definition at line 114 of file isosurface.h.

Referenced by getSmoothNormals(), setSmoothNormals(), and triangulate().

float IsoSurface::mSmoothSurface [protected]

amount of surface smoothing

Definition at line 112 of file isosurface.h.

Referenced by getSmoothSurface(), setSmoothSurface(), and triangulate().

start and end vectors for the triangulation region to create triangles in

Definition at line 103 of file isosurface.h.

Referenced by getBBStart(), getStart(), initializeIsosurface(), setStart(), and triangulate().

int IsoSurface::mSubdivs [protected]

no of subdivisions

Definition at line 129 of file isosurface.h.

Referenced by getSubdivs(), initializeIsosurface(), setSubdivs(), and triangulate().

use full arrays? (not for farfield)

Definition at line 91 of file isosurface.h.

Referenced by initializeIsosurface(), setUseFulledgeArrays(), and triangulate().

vector< vector<int> > IsoSurface::neighbors [protected]

Definition at line 136 of file isosurface.h.

Referenced by diffuseVertexField(), smoothNormals(), and smoothSurface().

vector<float> IsoSurface::pointareas [protected]

Definition at line 135 of file isosurface.h.

Referenced by diffuseVertexField(), smoothNormals(), and smoothSurface().


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