VR-Forces 4.5 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 namespace makVrv
11 {
12  class DtDe;
13 }
14 
15 // Now the OSG wrapper for the above OpenGL code, the most complicated bit is computing
16 // the bounding box for the above example, normally you'll find this the easy bit.
17 class diguyOsgParticleRenderer : public osg::Drawable
18 {
19 public:
21  ;
22  }
23  diguyOsgParticleRenderer(makVrv::DtDe * de, diguyScenario * scenario);
24 
25  // the draw immediate mode method is where the OSG wraps up the drawing of
26  // of OpenGL primitives.
27  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
28 
29 
30  // we need to set up the bounding box of the data too, so that the scene graph knows where this
31  // objects is, for both positioning the camera at start up, and most importantly for culling.
32  virtual osg::BoundingBox computeBoundingBox() const;
33 
34  static osg::MatrixTransform* createParticleRenderer(makVrv::DtDe * dtde, diguyScenario * scenario);
35 
36 // FIXME I have no idea how this works:
38  diguyOsgParticleRenderer(const diguyOsgParticleRenderer& teapot,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
39  osg::Drawable(teapot,copyop),
40  myDtDe(teapot.myDtDe),
41  m_scenario(teapot.m_scenario)
42  {}
43 
45 
46 
47 
48 protected:
49 
50  virtual ~diguyOsgParticleRenderer() {}
51 
53  diguyScenario * m_scenario;
54  osg::ref_ptr<osg::MatrixTransform> m_base_transform;
55  osg::ref_ptr<osg::State> m_state;
56  osg::ref_ptr<osg::StateSet> m_state_set;
57 
58 };
59 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)