17 #ifndef AGX_MARCHINGCUBES_H 18 #define AGX_MARCHINGCUBES_H 22 #include <agx/config/AGX_USE_OPENGL.h> 35 void clearParticles();
36 void addParticles(
Vec3Vector& particlePositions);
39 void drawSurfaceVertices();
53 SamplingCellHash m_cellHash;
57 Real m_surfaceThreshold;
58 int m_sampleDimensions;
75 McVertex *vertices[8];
77 void calculateType(
Real surfaceThreshold);
78 void addSurfaceVertices(
Vec3Vector& resultBuffer,
Real invThreshold);
79 Vec3 interpolateEdgeVertex(
int edge,
Real invThreshold);
90 inline void clearParticles();
91 inline void addParticle(
const Vec3& particlePosition);
92 inline const Vec3i& getId()
const;
95 void removeNeighborConnections();
96 void calculateSurface(
Real surfaceThreshold,
Vec3Vector& vertexBuffer);
98 inline McVertex *operator() (
unsigned int x,
unsigned int y,
unsigned int z);
100 SamplingCell **getNeighbors();
102 void draw(
Real surfaceThreshold);
104 friend class MarchingCubes;
105 void updateSamplePoints(
Real surfaceThreshold);
110 SamplingCell *m_neighbors[26];
114 unsigned int m_emptyCounter;
115 Vec3 m_innerBoundsMin;
116 Vec3 m_innerBoundsMax;
117 unsigned int m_sampleDimensions;
Vec2i calculateCellId(Real x, Real y, Real invCellSize)
#define AGXPHYSICS_EXPORT
Base class providing referencing counted objects.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Smart pointer for handling referenced counted objects.
McVertex(const Vec3 &pos)
Inheritance with partial specialization due to bug with ref_ptr containers.
ref_ptr< MarchingCubes > MarchingCubesRef