VR-Forces 4.8 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) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 #pragma once
6 
10 
11 #include <vrvDiGuy/vrvDiGuy.h>
12 
13 #include <diguyGraphicsShape.h>
14 
15 #include <osg/Switch>
16 #include <osg/LOD>
17 #include <osg/Geode>
18 #include <osg/Texture2D>
19 
20 #include <osgEarth/ShaderUtils>
21 
22 namespace makVrv
23 {
27 {
28 public:
30  DtDiGuyOsgGraphicsShape(void* internal_data);
31 
33  virtual ~DtDiGuyOsgGraphicsShape();
34 
38  virtual void build();
39 
43  virtual void unbuild();
44 
48  virtual void show();
49 
53  virtual void hide();
54 
56  virtual void set_graphics_lod_ranges(float* lodRanges);
57 
59  void update_variation_texture(int num_pixels, unsigned char* pixel_data);
60 
64  virtual void update();
65 
68 
69  std::vector<osg::Geode*> m_geodes;
70 
72 
73  virtual osg::Node* rootNode();
74 
75  virtual void setAdditionalTboData(const std::vector<float>& tboData);
76  virtual const std::vector<float>& getAdditionalTboData();
77 
78 protected:
79  void create_shared_variation_texture();
80  void create_variation_texture( unsigned char* variation_texture_data);
83 
85  static bool UsePixelLods;
86 
87  //osg::ref_ptr<osg::Uniform> myUniformLinkMatrices;
94  std::vector<float> myAdditionalTboData;
95  diguyCharacter* myCharacter;
96 
97 };
98 }
osg::ref_ptr< osg::StateSet > myStateSet
Definition: DtDiGuyOsgGraphicsShape.h:89
osg::ref_ptr< osg::LOD > myLodNode
Definition: DtDiGuyOsgGraphicsShape.h:82
static osg::ref_ptr< osg::Texture2D > sm_variation_texture
Definition: DtDiGuyOsgGraphicsShape.h:71
std::vector< osg::Geode * > m_geodes
Definition: DtDiGuyOsgGraphicsShape.h:69
osg::ref_ptr< osg::Uniform > myUniformComponentMapRow
Definition: DtDiGuyOsgGraphicsShape.h:92
diguyGraphicsShape * diguyOsgGraphicsShape_create_func(void *internal_data)
Creator for VRV diguyGraphicsShape override.
Contains DLL export macros.
static char * UniformLinkMatricesString
Static name of the bone uniform.
Definition: DtDiGuyOsgGraphicsShape.h:67
diguyCharacter * myCharacter
Definition: DtDiGuyOsgGraphicsShape.h:95
Override of diguyGraphicsShape to create OSG geometry for DI-Guy shapes.
Definition: DtDiGuyOsgGraphicsShape.h:26
osg::ref_ptr< osg::Uniform > myUniformLinkColor
Definition: DtDiGuyOsgGraphicsShape.h:88
osg::ref_ptr< osg::Switch > mySwitchNode
Definition: DtDiGuyOsgGraphicsShape.h:81
static bool UsePixelLods
Whether LOD calculations are based on distance from camera or pixel size in frame.
Definition: DtDiGuyOsgGraphicsShape.h:85
osg::ref_ptr< osg::Uniform > myUniformPBRReady
Definition: DtDiGuyOsgGraphicsShape.h:93
osg::ref_ptr< osg::Uniform > myUniformLinkMatrices
Definition: DtDiGuyOsgGraphicsShape.h:90
#define DT_DLL_VRVDIGUY
Definition: vrvDiGuy.h:21
std::vector< float > myAdditionalTboData
Definition: DtDiGuyOsgGraphicsShape.h:94
osg::ref_ptr< osg::Uniform > myUniformLinkMatricesAlt
Definition: DtDiGuyOsgGraphicsShape.h:91

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)