VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtFxOsgParticleDrawable.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <osg/Drawable>
13 #include <osg/Geode>
14 #include <osg/State>
15 #include <osg/StateSet>
16 #include <osg/MatrixTransform>
17 #include <osg/Program>
18 class diguyScenario;
19 
20 namespace makVrv
21 {
22  class DtDe;
23  class DtFxParticleSystemManager;
24  class DtFxOglParticleSystemRenderer;
25 
29  class DtFxOsgParticleDrawable : public osg::Drawable
30  {
31  public:
33  DtFxOsgParticleDrawable(makVrv::DtDe& de, DtFxParticleSystemManager* pm, osg::MatrixTransform* transform);
34 
37 
39  virtual void releaseGLObjects(osg::State* state) const;
40 
41  // the draw immediate mode method is where the OSG wraps up the drawing of
42  // of OpenGL primitives.
43  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
44 
46  virtual void loadShaders();
47 
49  virtual osg::BoundingBox computeBoundingBox() const;
50 
51  // needed by manager
52  virtual osg::MatrixTransform* baseTransform();
53 
55  virtual void setWireframeMode(bool mode);
56 
57  protected:
58 
73 
74  private:
76  DtFxOsgParticleDrawable(const DtFxOsgParticleDrawable& rhs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) :
77  osg::Drawable(rhs, copyop),
78  myDe(rhs.myDe)
79  {}
80 
83  };
84 
85 }
osg::ref_ptr< osg::Uniform > myMutableIsReflectionUniform
Definition: DtFxOsgParticleDrawable.h:72
class that executes low level OpenGL draw calls from the particle system data.
Definition: DtFxOglParticleSystemRenderer.h:30
The OSG wrapper for the opengl rendering code.
Definition: DtFxOsgParticleDrawable.h:29
osg::ref_ptr< osg::Uniform > myMutableInvPersMatrixUniform
needed for smoothness
Definition: DtFxOsgParticleDrawable.h:69
DtFxParticleSystemManager is the manager for all the particle systems and descriptions diguy sdk comm...
Definition: DtFxParticleSystemManager.h:74
virtual void setWireframeMode(bool mode)
sets the wireframe mode
virtual osg::BoundingBox computeBoundingBox() const
noops currently culls systems individually
osg::ref_ptr< osg::StateSet > m_debug_state_set
Definition: DtFxOsgParticleDrawable.h:64
DtFxOglParticleSystemRenderer * m_particle_renderer
Definition: DtFxOsgParticleDrawable.h:61
osg::ref_ptr< osg::StateSet > m_state_set
Definition: DtFxOsgParticleDrawable.h:63
virtual void loadShaders()
loads the particle shaders
osg::ref_ptr< osg::Program > m_default_program
Definition: DtFxOsgParticleDrawable.h:67
DtFxOsgParticleDrawable(makVrv::DtDe &de, DtFxParticleSystemManager *pm, osg::MatrixTransform *transform)
CTOR.
osg::ref_ptr< osg::Uniform > myMutablePersMatrixUniform
Definition: DtFxOsgParticleDrawable.h:70
virtual void drawImplementation(osg::RenderInfo &renderInfo) const
DtFxParticleSystemManager * m_particle_manager
Definition: DtFxOsgParticleDrawable.h:60
osg::ref_ptr< osg::Shader > m_vertex_shader
Definition: DtFxOsgParticleDrawable.h:65
osg::ref_ptr< osg::MatrixTransform > m_base_transform
Definition: DtFxOsgParticleDrawable.h:62
DtFxOsgParticleDrawable & operator=(const DtFxOsgParticleDrawable &other)
Not implemented.
osg::ref_ptr< osg::Shader > m_fragment_shader
Definition: DtFxOsgParticleDrawable.h:66
virtual ~DtFxOsgParticleDrawable()
DTOR ref pointers will clear all the memory out automatically.
Definition: DtFxOsgParticleDrawable.h:36
const char int mode
Definition: ioapi.h:38
makVrv::DtDe & myDe
Definition: DtFxOsgParticleDrawable.h:59
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
virtual void releaseGLObjects(osg::State *state) const
release all gl objects used by this system
DtFxOsgParticleDrawable(const DtFxOsgParticleDrawable &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Not implemented, Copy constructor using CopyOp to manage deep vs shallow copy.
Definition: DtFxOsgParticleDrawable.h:76
osg::ref_ptr< osg::Uniform > myMutableViewportUniform
Definition: DtFxOsgParticleDrawable.h:71
virtual osg::MatrixTransform * baseTransform()

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)