VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
8 class diguyScenario;
9 
10 // Now the OSG wrapper for the above OpenGL code, the most complicated bit is computing
11 // the bounding box for the above example, normally you'll find this the easy bit.
12 class diguyOsgParticleRenderer : public osg::Drawable
13 {
14 public:
16  ;
17  }
18  diguyOsgParticleRenderer(diguyScenario * scenario);
19 
20  // the draw immediate mode method is where the OSG wraps up the drawing of
21  // of OpenGL primitives.
22  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
23 
24 
25  // we need to set up the bounding box of the data too, so that the scene graph knows where this
26  // objects is, for both positioning the camera at start up, and most importantly for culling.
27  virtual osg::BoundingBox computeBoundingBox() const;
28 
29  static osg::MatrixTransform* createParticleRenderer(diguyScenario * scenario);
30 
31 // FIXME I have no idea how this works:
33  diguyOsgParticleRenderer(const diguyOsgParticleRenderer& teapot,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
34  osg::Drawable(teapot,copyop) {}
35 
37 
38 
39 
40 protected:
41 
42  virtual ~diguyOsgParticleRenderer() {}
43 
44  diguyScenario * m_scenario;
45  osg::ref_ptr<osg::MatrixTransform> m_base_transform;
46  osg::ref_ptr<osg::State> m_state;
47  osg::ref_ptr<osg::StateSet> m_state_set;
48 
49 };
50 

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)