DI-Guy SDK Documentation  13.2
diguyOsgParticleRenderer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <osg/Drawable>
4 #include <osg/Geode>
5 #include <osg/State>
6 #include <osg/StateSet>
7 #include <osg/MatrixTransform>
8 
9 class diguyScenario;
10 
16 class diguyOsgParticleRenderer : public osg::Drawable
17 {
18 public:
20  ;
21  }
23 
25  diguyOsgParticleRenderer(const diguyOsgParticleRenderer& teapot,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
26  osg::Drawable(teapot,copyop) {}
27 
28  META_Object(myTeapotApp,diguyOsgParticleRenderer)
29 
30 
31  // the draw immediate mode method is where the OSG wraps up the drawing of
32  // of OpenGL primitives.
33  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
34 
35 
36  // we need to set up the bounding box of the data too, so that the scene graph knows where this
37  // objects is, for both positioning the camera at start up, and most importantly for culling.
38  virtual osg::BoundingBox computeBound() const;
39 
40  static osg::MatrixTransform* createParticleRenderer(diguyScenario * scenario);
41 
42 protected:
43 
45 
47  osg::ref_ptr<osg::MatrixTransform> m_base_transform;
48  osg::ref_ptr<osg::State> m_state;
49  osg::ref_ptr<osg::StateSet> m_state_set;
50 };
51 
static osg::MatrixTransform * createParticleRenderer(diguyScenario *scenario)
Definition: diguyOsgParticleRenderer.cpp:109
diguyOsgParticleRenderer()
Definition: diguyOsgParticleRenderer.h:19
diguyOsgParticleRenderer(const diguyOsgParticleRenderer &teapot, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
Definition: diguyOsgParticleRenderer.h:25
Represents the scenario currently being portrayed.
Definition: diguyScenario.h:92
diguyScenario * m_scenario
Definition: diguyOsgParticleRenderer.h:44
osg::ref_ptr< osg::State > m_state
Definition: diguyOsgParticleRenderer.h:46
osg::ref_ptr< osg::MatrixTransform > m_base_transform
Definition: diguyOsgParticleRenderer.h:45
osg::ref_ptr< osg::StateSet > m_state_set
Definition: diguyOsgParticleRenderer.h:47
Now the OSG wrapper for the OpenGL renderer code, the most complicated bit is computing the bounding ...
Definition: diguyOsgParticleRenderer.h:16
static diguyScenario * scenario
Definition: simple_playback_ogl.cpp:56