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;
53 virtual osg::BoundingBox computeBound()
const;
57 virtual void drawImplementation(osg::RenderInfo& renderInfo)
const;
59 void setEnable(
bool enable);
61 bool getEnable()
const;
63 void updateDrawable();
65 bool hasParticleSystem()
const;
69 void setRenderPointRadius(
agx::Real radius);
71 void setRenderParticleGeometryImpacts(
bool enable);
73 bool getRenderParticleGeometryImpacts()
const;
75 void setRenderParticleParticleImpacts(
bool enable);
77 bool getRenderParticleParticleImpacts()
const;
79 void setImpactRenderingEnergyColoringRange(
const agx::RangeReal& range);
83 void setImpactRenderingCutoffEnergy(
agx::Real cutoffEnergy);
85 agx::Real getImpactRenderingCutoffEnergy()
const;
87 void setUseParticleColorForImpactColoring(
bool enable);
89 void setImpactRenderingStartTime(
agx::Real cutoffTime);
91 agx::Real getImpactRenderingStartTime()
const;
agx::Real m_contactRadius
agxData::BufferRef m_verticesBuffer
virtual const char * className() const
bool m_useParticleColorForImpactColoring
virtual bool isSameKindAs(const osg::Object *obj) const
bool hasParticleSystem() const
agx::Real getImpactRenderingStartTime() const
Contains classes/utility functions for connecting AGX to QT with OSG.
#define AGX_DECLARE_POINTER_TYPES(type)
virtual osg::Object * clone(const osg::CopyOp &) const
agxData::BufferRef m_radiusBuffer
agx::TaskGroupRef m_renderTask
agxData::BufferRef m_colorBuffer
void setImpactRenderingStartTime(agx::Real cutoffTime)
osg::ref_ptr< osgSim::ColorRange > m_colorRange
virtual const char * libraryName() const
A basic particle system that contains all the storages and buffers required for basic operation and a...
virtual osg::Object * cloneType() const
bool m_renderParticleParticle
agx::Real getRenderPointRadius() const
agx::ParticleSystemObserver m_particleSystem
bool m_renderParticleGeometry
agx::Real m_renderingStartTime
agxSDK::SimulationObserver m_simulation
bool m_hasGranularLicense
void setRenderPointRadius(agx::Real radius)
void setEnable(bool enable)