19 #include <agx/config/AGX_USE_AGXTERRAIN.h> 20 #if defined(SWIG) || AGX_USE_AGXTERRAIN() 27 #include <osg/Drawable> 28 #include <osgViewer/Viewer> 29 #include <osgSim/ColorRange> 30 #include <osgSim/ScalarsToColors> 31 #include <osg/Version> 34 #include <agx/config/AGX_USE_AGXTERRAIN.h> 86 void setRenderVoxelSolidMass(
bool enable);
91 bool getRenderVoxelSolidMass()
const;
97 void setRenderVoxelFluidMass(
bool enable);
102 bool getRenderVoxelFluidMass()
const;
108 void setRenderNodes(
bool enable);
113 bool getRenderNodes()
const;
119 void setRenderVoxelBoundingBox(
bool enable);
124 bool getRenderVoxelBoundingBox()
const;
130 void setRenderHeightField(
bool enable);
135 bool getRenderHeightField()
const;
141 void setRenderVoxelCompaction(
bool enable);
146 bool getRenderVoxelCompaction()
const;
152 void setRenderVelocityField(
bool enable);
157 bool getRenderVelocityField()
const;
163 void setRenderSoilParticles(
bool enable);
168 bool getRenderSoilParticles()
const;
174 void setRenderSoilParticlesMesh(
bool enable);
179 bool getRenderSoilParticlesMesh()
const;
186 void setSoilParticleMeshData(
const agx::String& modelFilename,
const agx::String& textureFilename =
"" );
191 const agx::String& getSoilParticleMeshModelFilename()
const;
196 const agx::String& getSoilParticleMeshTextureFilename()
const;
211 bool getRenderHeights()
const;
223 bool getRenderCompaction()
const;
240 void setVelocityFieldLineColor(
const agx::Vec4& lineColor);
246 void setMaxVoxelValueColor(
const agx::Vec4f& maxVoxelColor);
257 osg::ref_ptr<agxOSG::GeometryNode> node;
258 osg::observer_ptr<osg::Group> parent;
259 osg::ref_ptr<osg::Geometry> geometry;
260 osg::ref_ptr<osg::Geode> geode;
261 osg::StateSet* stateSet;
263 osg::ref_ptr<osgSim::ColorRange> colorRange;
264 osg::ref_ptr<osg::Vec4Array> colorArray;
267 struct SoilParticleMeshData
269 osg::ref_ptr<osg::Node> node;
270 osg::ref_ptr<osg::Group> group;
276 virtual void addNotification()
override;
277 virtual void removeNotification()
override;
282 virtual ~TerrainVoxelRenderer();
286 ContextData m_surfaceContextData;
287 ContextData m_heightsContextData;
289 osg::ref_ptr<TerrainVoxelDrawable> m_voxelDrawable;
290 osg::ref_ptr<SoilParticleSystemDrawable> m_soilParticleDrawable;
291 SoilParticleMeshData m_soilParticleMeshData;
Derive from this class to implement a listener for simulation Step events.
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
A class holding 4 dimensional vectors and providing basic arithmetic.
#define AGX_DECLARE_POINTER_TYPES(type)
const Node * getNode(const IteratorCompatibleContainer &container, agx::Real distanceFromStart)
Finds the wire node given current distance from the start of the wire (wire defined to be iterator co...
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
A node that can be associated with a collision geometry so that the transformation of this node is up...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...