17 #ifndef AGXOSG_GRANULARIMPACTDRAWABLE_H
18 #define AGXOSG_GRANULARIMPACTDRAWABLE_H
21 #include <osg/Drawable>
22 #include <osgViewer/Viewer>
23 #include <osg/Version>
24 #include <osgSim/ColorRange>
25 #include <osgSim/ScalarsToColors>
45 virtual const char*
className()
const {
return "GranularImpactsDrawable"; }
49 # if OSG_VERSION_GREATER_OR_EQUAL(3,4,0)
50 virtual osg::BoundingSphere computeBound()
const;
51 virtual osg::BoundingBox computeBoundingBox()
const;
59 void setEnable(
bool enable);
61 bool getEnable()
const;
65 bool hasParticleSystem()
const;
69 void setRenderPointRadius(
agx::Real radius);
89 void setImpactRenderingStartTime(
agx::Real cutoffTime);
91 agx::Real getImpactRenderingStartTime()
const;
#define AGX_DECLARE_POINTER_TYPES(type)
void setImpactRenderingCutoffEnergy(agx::Real cutoffEnergy)
agx::Real m_contactRadius
bool hasParticleSystem() const
void setImpactRenderingEnergyColoringRange(const agx::RangeReal &range)
agxData::BufferRef m_verticesBuffer
bool m_useParticleColorForImpactColoring
virtual bool isSameKindAs(const osg::Object *obj) const
virtual osg::Object * clone(const osg::CopyOp &) const
bool m_renderParticleParticle
agxData::BufferRef m_radiusBuffer
void setRenderParticleParticleImpacts(bool enable)
void setRenderPointRadius(agx::Real radius)
agxData::BufferRef m_colorBuffer
virtual const char * libraryName() const
virtual osg::BoundingBox computeBound() const
Compute the bounding box around Drawables's geometry.
void setUseParticleColorForImpactColoring(bool enable)
bool getRenderParticleGeometryImpacts() const
agx::TaskGroupRef m_renderTask
agx::Real getRenderPointRadius() const
agx::Real m_renderingStartTime
agx::ParticleSystemObserver m_particleSystem
virtual osg::Object * cloneType() const
virtual const char * className() const
virtual ~GranularImpactsDrawable()
virtual void drawImplementation(osg::RenderInfo &renderInfo) const
The actual draw method for the merged bodies.
void setImpactRenderingStartTime(agx::Real cutoffTime)
agx::RangeReal getImpactRenderingEnergyColoringRange() const
osg::ref_ptr< osgSim::ColorRange > m_colorRange
bool getRenderParticleParticleImpacts() const
GranularImpactsDrawable(agx::ParticleSystem *particleSystem)
bool m_renderParticleGeometry
bool m_hasGranularLicense
agx::Real getImpactRenderingStartTime() const
void setRenderParticleGeometryImpacts(bool enable)
agx::Real getImpactRenderingCutoffEnergy() const
void setEnable(bool enable)
agxSDK::SimulationObserver m_simulation
A basic particle system that contains all the storages and buffers required for basic operation and a...
Contains classes/utility functions for connecting AGX to QT with OSG.