DI-Guy SDK Documentation  13.7
diguyOsgGraphicsMesh.h
Go to the documentation of this file.
1 #ifndef diguyOsgGraphicsMesh_h__
2 #define diguyOsgGraphicsMesh_h__
3 
4 
5 
6 #include <diguyGraphicsMesh.h>
7 
8 #include <osg/Drawable>
9 
10 class diguyGraphicsVertexData;
11 
12 
25 {
26 
27 public:
28 
29  diguyOsgGraphicsMesh(void* internal_data);
30 
31  virtual void build() override;
32  virtual void unbuild() override;
33 
34  osg::PrimitiveSet* get_primitiveSet() { return m_primitiveSet; }
35  int get_num_drawables();
36  osg::Drawable* get_drawable(int drawable_index);
37 
38 protected:
39 
40  osg::ref_ptr<osg::PrimitiveSet> m_primitiveSet;
41  std::vector<osg::ref_ptr<osg::Drawable> > m_drawables;
42  std::vector<bool> m_has_graphics_state_set;
43 
44  void attach_state_set_to_drawable(int drawable_index);
45 };
46 
47 
55 
56 #endif // diguyOsgGraphicsMesh_h__
Meshes contain the visual geometry of a DI-Guy character.
Definition: diguyOsgGraphicsMesh.h:21
virtual void build() override
This function will be called by DI-Guy when it is time for a renderer-specific mesh object to be crea...
Definition: diguyOsgGraphicsMesh.cpp:126
void attach_state_set_to_drawable(int drawable_index)
Definition: diguyOsgGraphicsMesh.cpp:476
std::vector< bool > m_has_graphics_state_set
Definition: diguyOsgGraphicsMesh.h:39
int get_num_drawables()
Definition: diguyOsgGraphicsMesh.cpp:425
A class that represents a shared mesh object.
Definition: diguyGraphicsMesh.h:87
osg::Drawable * get_drawable(int drawable_index)
Definition: diguyOsgGraphicsMesh.cpp:441
diguyGraphicsMesh * diguyOsgGraphicsMesh_create_func(void *internal_data)
Create function declaration.
Definition: diguyOsgGraphicsMesh.cpp:533
osg::PrimitiveSet * get_primitiveSet()
Definition: diguyOsgGraphicsMesh.h:31
virtual void unbuild() override
This function will be called by DI-Guy when it is time for a renderer-specific mesh object to be dest...
Definition: diguyOsgGraphicsMesh.cpp:400
std::vector< osg::ref_ptr< osg::Drawable > > m_drawables
Definition: diguyOsgGraphicsMesh.h:38
diguyOsgGraphicsMesh(void *internal_data)
Definition: diguyOsgGraphicsMesh.cpp:97
osg::ref_ptr< osg::PrimitiveSet > m_primitiveSet
Definition: diguyOsgGraphicsMesh.h:37