VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDiGuyOsgGraphicsShape.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #include <vrvDiGuy/vrvDiGuy.h>
11 
12 #include <diguyGraphicsShape.h>
13 
14 #include <osg/Switch>
15 #include <osg/LOD>
16 #include <osg/Geode>
17 #include <osg/Texture2D>
18 
19 #include <osgEarth/ShaderUtils>
20 
21 namespace makVrv
22 {
26 {
27 public:
29  DtDiGuyOsgGraphicsShape(void* internal_data);
30 
32  virtual ~DtDiGuyOsgGraphicsShape();
33 
37  virtual void build();
38 
42  virtual void unbuild();
43 
47  virtual void show();
48 
52  virtual void hide();
53 
55  virtual void set_graphics_lod_ranges(float* lodRanges);
56 
58  void update_variation_texture(int num_pixels, unsigned char * pixel_data);
59 
63  virtual void update();
64 
67 
68  std::vector<osg::Geode*> m_geodes;
69 
70  static osg::ref_ptr<osg::Texture2D> sm_variation_texture;
71 
72  virtual osg::Node *rootNode();
73 
74  virtual void setAdditionalTboData(const std::vector<float> & tboData);
75  virtual const std::vector<float> & getAdditionalTboData();
76 
77 protected:
78  void create_shared_variation_texture();
79  void create_variation_texture( unsigned char * variation_texture_data);
80  osg::ref_ptr<osg::Switch> mySwitchNode;
81  osg::ref_ptr<osg::LOD> myLodNode;
82 
84  static bool UsePixelLods;
85 
86  //osg::ref_ptr<osg::Uniform> myUniformLinkMatrices;
87  osg::ref_ptr<osg::Uniform> myUniformLinkColor;
88  osg::ref_ptr<osg::StateSet> myStateSet;
89  osg::ref_ptr<osg::Uniform> myUniformLinkMatrices;
90  osg::ref_ptr<osg::Uniform> myUniformLinkMatricesAlt;
91  osg::ref_ptr<osg::Uniform> myUniformComponentMapRow;
92  osg::ref_ptr<osg::Uniform> myUniformPBRReady;
93  std::vector<float> myAdditionalTboData;
94 
95 
96 };
97 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)