Go to the documentation of this file.
28 #ifndef __Ogre_Volume_IsoSurfaceMC_H__
29 #define __Ogre_Volume_IsoSurfaceMC_H__
61 if (fabs(val0.
w - ISO_LEVEL) <= FLT_EPSILON)
68 if (fabs(val1.
w - ISO_LEVEL) <= FLT_EPSILON)
75 if (fabs(val1.
w - val0.
w) <= FLT_EPSILON)
82 Real mu = (ISO_LEVEL - val0.
w) / (val1.
w - val0.
w);
83 Vector4 normal4 = val0 + mu * (val1 - val0);
88 return v0 + mu * (v1 - v0);
Vector3 interpolate(const Vector3 &v0, const Vector3 &v1, const Vector4 &val0, const Vector4 &val1, Vector3 &normal) const
Linear interpolation between two vectors based on some values associated to them.
Real normalise()
Normalises the vector.
Class to build up a mesh with vertices and indices.
virtual void addMarchingCubesTriangles(const Vector3 *corners, const Vector4 *volumeValues, MeshBuilder *mb) const
Overridden from IsoSurface.
IsoSurfaceMC(const Source *src)
Constructor.
virtual void addMarchingSquaresTriangles(const Vector3 *corners, const Vector4 *volumeValues, const size_t *indices, const Real maxDistance, MeshBuilder *mb) const
Overridden from IsoSurface.
#define _OgreVolumeExport
4-dimensional homogeneous vector.
float Real
Software floating point type.
Marching Cubes implementation like at http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/.
Standard 3-dimensional vector.
Abstract class defining the density function.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.