8 #include "ExternalMutex.h"
9 #include "FastQuadrics.h"
10 #include "MaterialLibrary.h"
11 #include "PhysicsData.h"
12 #include "PhysicsMaterials.h"
13 #include "PinkNoise.h"
14 #include "StampMesh.h"
15 #include "UnionFind.h"
17 #include "VoxelFarmConfig.h"
18 #include "VoxelLayer.h"
31 virtual void processCell(
CCellData* cellData) = 0;
34 virtual void notifyCellsDestroyed(TSet<CCellData*>* deadCells) = 0;
37 virtual void notifyCellsToProcess(TSet<CellId>* changedCells) = 0;
40 virtual void notifyFragmentsPending() = 0;
58 void discoverFragmentMeshes(
59 const TSet<CellId>* scene,
60 const TMap<CellId, CCellData*>* cellCache,
63 TVector<CFastQuadrics*>* fragments
67 void contourNoiseBuffer(
69 const CVoxelBuffer* nVoxBuffer,
70 TVector<CCellData*>* cells,
71 IPhysicsEvents* events
75 void processFragmentMesh(
83 IPhysicsEvents* events,
84 const bool useCOM =
false,
85 const CPhysicsMaterialLibrary* physicsML = NULL
89 void deleteFragmentVoxels(
91 const double worldPos[3],
94 const TVector<CFastQuadrics*>* fragments,
95 TVector<CMassInfo*>* massInfo,
96 TSet<CellId>* changedCells
100 void generateNoiseBrush(
101 CNoiseBrush* noiseBrush
106 bool fragmentSimplification(
Contains all classes and functions for the VoxelFarm engine.
Contains all materials available in the system.
int getFaceCount(int solid)
Returns the number of faces in a solid.
A default implementation of IBlockData that also acts as a VoxelLayer.
It allows to access to the faces and materials of a list of solids.
int faceCount
Number of faces in the mesh.
void getFace(int solid, int index, Algebra::Vector &v0, Algebra::Vector &v1, Algebra::Vector &v2)
Get the vertices of a face of a solid.
Stores the information for a Cell that has already been converted to a polygonal mesh.
StatTracker LODStats[LEVELS][STAT_NULL]
Used to track stats across all LOD.
MaterialId getSolidMaterial(int solid)
Returns the material of a solid.
int getSolidCount()
Returns the number of solids.
converts a physics fragment mesh into a MeshStampSource to be applied by the stampMesh algorithm duri...
An efficient mesh representation that features Quadratic Error function simplification using a Multip...
virtual CCellData * createCellData()=0
creates a CellData object with (unique) CellId id to hold a fragment mesh