27 #include "WMarchingCubesAlgorithm.h"
35 double tVal1,
double tVal2 )
40 mu =
static_cast<double>( (
m_tIsoLevel - tVal1 ) ) / ( tVal2 - tVal1 );
41 interpolation.
x = fX1 + mu * ( fX2 - fX1 );
42 interpolation.
y = fY1 + mu * ( fY2 - fY1 );
43 interpolation.
z = fZ1 + mu * ( fZ2 - fZ1 );
44 interpolation.
newID = 0;
WPointXYZId interpolate(double fX1, double fY1, double fZ1, double fX2, double fY2, double fZ2, double tVal1, double tVal2)
Interpolates between two grid points to produce the point at which the isosurface intersects an edge...
unsigned int m_nCellsY
No. of cells in y direction.
WMarchingCubesAlgorithm()
Constructor needed for matrix initalization.
double m_tIsoLevel
The isovalue.
int getEdgeID(unsigned int nX, unsigned int nY, unsigned int nZ, unsigned int nEdgeNo)
Returns the edge ID.
unsigned int getVertexID(unsigned int nX, unsigned int nY, unsigned int nZ)
Returns the ID of the vertex given by by the IDs along the axis.
unsigned int m_nCellsX
No. of cells in x direction.
double z
z coordinates of the point.
double y
y coordinates of the point.
A point consisting of its coordinates and ID.
unsigned int newID
ID of the point.
double x
x coordinates of the point.