AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
SoilParticleSystemDrawable.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
20#if AGX_USE_AGXTERRAIN()
21
22
23#include <agxOSG/export.h>
24
25#include <agxTerrain/Terrain.h>
26
27#include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
28#include <osg/Drawable>
29#include <osg/Version>
30#include <agx/PopDisableWarnings.h> // End of disabled warnings.
31
32namespace agxOSG
33{
37 class AGXOSG_EXPORT SoilParticleSystemDrawable : public osg::Drawable
38 {
39 public:
41
42 void setEnable(bool enable);
43 bool getEnable() const;
44
48 bool isInitialized() const;
49
50 virtual osg::Object* cloneType() const { return new SoilParticleSystemDrawable(m_terrain); }
51 virtual osg::Object* clone(const osg::CopyOp&) const { return new SoilParticleSystemDrawable(*this); }
52 virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const SoilParticleSystemDrawable *>(obj) != nullptr; }
53 virtual const char* libraryName() const { return "agxOSG"; }
54 virtual const char* className() const { return "SoilParticleSystemDrawable"; }
55
57#if OSG_VERSION_GREATER_OR_EQUAL(3,4,0)
58 virtual osg::BoundingSphere computeBound() const;
59 virtual osg::BoundingBox computeBoundingBox() const;
60#else
61 virtual osg::BoundingBox computeBound() const;
62#endif
63
65 virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
66
68
69 public:
72
73 protected:
75
77 // Variables
79 protected:
81 osg::Group* m_group;
84 };
85}
86#endif
#define AGXOSG_EXPORT
Internal drawable class for drawing the Voxel grid structure.
virtual void drawImplementation(osg::RenderInfo &renderInfo) const
The actual draw method for the merged bodies.
virtual osg::BoundingBox computeBound() const
Compute the bounding box around Drawables's geometry.
void onAddNotification(agxSDK::Simulation *simulation)
virtual const char * libraryName() const
agx::ParticleSystem * getParticleSystem()
void onRemoveNotification(agxSDK::Simulation *simulation)
virtual bool isSameKindAs(const osg::Object *obj) const
SoilParticleSystemDrawable(agxTerrain::Terrain *terrain)
virtual osg::Object * clone(const osg::CopyOp &) const
virtual osg::Object * cloneType() const
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:131
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
Definition: Terrain.h:92
A basic particle system that contains all the storages and buffers required for basic operation and a...
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.