DI-Guy SDK Documentation  13.8
diguyOsgGraphicsMesh.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2024 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 #pragma once
7 
8 #include <diguyGraphicsMesh.h>
9 
10 #include <osg/Drawable>
11 
12 class diguyGraphicsVertexData;
13 
26 {
27 
28 public:
29 
30  diguyOsgGraphicsMesh(void* internal_data);
31 
32  virtual void build() override;
33  virtual void unbuild() override;
34 
35  osg::PrimitiveSet* get_primitiveSet() { return m_primitiveSet; }
36  int get_num_drawables();
37  osg::Drawable* get_drawable(int drawable_index);
38 
39 protected:
40 
43  void attach_state_set_to_drawable( int drawable_index );
44 
45 protected:
46 
47  osg::ref_ptr<osg::PrimitiveSet> m_primitiveSet;
48  std::vector<osg::ref_ptr<osg::Drawable> > m_drawables;
49  std::vector<bool> m_has_graphics_state_set;
50 
51 };
52 
53 
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...
Meshes contain the visual geometry of a DI-Guy character.
Definition: diguyOsgGraphicsMesh.h:25
void attach_state_set_to_drawable(int drawable_index)
Looks up the state set for the drawable and attaches the state set to the drawable if not already att...
std::vector< bool > m_has_graphics_state_set
Definition: diguyOsgGraphicsMesh.h:49
A class that represents a shared mesh object.
Definition: diguyGraphicsMesh.h:87
osg::PrimitiveSet * get_primitiveSet()
Definition: diguyOsgGraphicsMesh.h:35
std::vector< osg::ref_ptr< osg::Drawable > > m_drawables
Definition: diguyOsgGraphicsMesh.h:48
diguyOsgGraphicsMesh(void *internal_data)
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...
osg::Drawable * get_drawable(int drawable_index)
osg::ref_ptr< osg::PrimitiveSet > m_primitiveSet
Definition: diguyOsgGraphicsMesh.h:47
diguyGraphicsMesh * diguyOsgGraphicsMesh_create_func(void *internal_data)
Create function declaration.