17 #ifndef AGX_MARCHINGCUBES_H
18 #define AGX_MARCHINGCUBES_H
35 void clearParticles();
36 void addParticles(
Vec3Vector& particlePositions);
39 void drawSurfaceVertices();
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);
87 SamplingCell(
const Vec3i&
id,
Real size,
int sampleDimensions, SamplingCellHash& cellHash);
90 inline void clearParticles();
91 inline void addParticle(
const Vec3& particlePosition);
92 inline const Vec3i& getId()
const;
94 void addNeighborConnections(SamplingCellHash& cellHash);
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);
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.
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