6 #ifndef diguyOsgGraphicsLink_h__
7 #define diguyOsgGraphicsLink_h__
12 #include <osg/MatrixTransform>
13 #include <osgViewer/Viewer>
44 m_lod_drawables[lod].push_back(diguyOsgGraphicsShapeGeodeMap(shape, geode));
48 m_switch_nodes.push_back(diguyOsgGraphicsShapeSwitchMap(shape, switch_node));
71 std::vector<std::vector<diguyOsgGraphicsShapeGeodeMap> >
m_lod_drawables;
106 virtual void build()
override;
109 virtual void unbuild()
override;
110 virtual void update()
override;
144 osg::ref_ptr<osg::MatrixTransform>
m_dof_node;
168 #endif // diguyOsgGraphicsLink_h__
Definition: diguyOsgGraphicsShaderProgram.h:34
A class that represents the unique per-character shader object.
Definition: diguyGraphicsShaderInstance.h:54
void add_geode_for_fast_draw(diguyOsgGraphicsShape *shape, osg::Geode *geode, int lod)
Definition: diguyOsgGraphicsLink.h:38
Graphics state objects mostly serve as containers for other sub-objects, such as materials and textur...
Definition: diguyOsgGraphicsState.h:25
osg::ref_ptr< osg::Uniform > m_ufrm_inverse_transform_matrix
Definition: diguyOsgGraphicsLink.h:140
std::vector< diguyOsgGraphicsShapeSwitchMap > m_switch_nodes
Definition: diguyOsgGraphicsLink.h:69
osg::Geode * make_bounding_sphere_visual(osg::Vec3 ¢er, float radius)
diguyOsgRootNode(diguyOsgGraphicsLink *link)
static osgViewer::Viewer * s_viewer
Definition: diguyOsgGraphicsLink.h:152
Definition: diguyOsgGraphicsShaderInstance.h:21
osg::Geode * m_geode
Definition: diguyOsgGraphicsLink.h:58
Definition: diguyOsgGraphicsLink.h:31
virtual void set_shader_instance(diguyGraphicsShaderInstance *shader_instance) override
This function will be called by DI-Guy when it a shader should be bound to this link.
osg::Switch * m_switch
Definition: diguyOsgGraphicsLink.h:66
osg::Geode * get_bounding_sphere_visual()
static int s_transformation_mode;
Definition: diguyOsgGraphicsLink.h:125
A class that represents a shared material/textures combination.
Definition: diguyGraphicsState.h:44
osg::ref_ptr< osg::Uniform > m_ufrm_link_matrix
Definition: diguyOsgGraphicsLink.h:136
osg::ref_ptr< osg::Uniform > m_ufrm_emission_color
Definition: diguyOsgGraphicsLink.h:143
diguyOsgGraphicsShaderInstance * m_diguy_osg_shader_instance
Definition: diguyOsgGraphicsLink.h:147
Definition: diguyOsgGraphicsLink.h:60
static osgViewer::Viewer * get_viewer()
Definition: diguyOsgGraphicsLink.h:121
osg::MatrixTransform * get_dof_node()
Definition: diguyOsgGraphicsLink.h:114
void traverse(osg::NodeVisitor &nv)
diguyOsgGraphicsShaderProgram * m_diguy_osg_shader_program
Definition: diguyOsgGraphicsLink.h:148
diguyGraphicsLink * diguyOsgGraphicsLink_create_func(void *internal_data)
Create function declaration.
diguyOsgGraphicsShape * m_shape
Definition: diguyOsgGraphicsLink.h:65
int m_instanced
Definition: diguyOsgGraphicsLink.h:153
Definition: diguyOsgGraphicsLink.h:52
Shapes are the high-level containers of visible geometry.
Definition: diguyOsgGraphicsShape.h:38
osg::StateSet * get_top_level_state_set()
Represents the scenario currently being portrayed.
Definition: diguyScenario.h:99
DI-Guy 'links' are essentially the same as 'bones' in other APIs.
Definition: diguyOsgGraphicsLink.h:96
std::vector< std::vector< diguyOsgGraphicsShapeGeodeMap > > m_lod_drawables
Definition: diguyOsgGraphicsLink.h:70
virtual void attach_to_scene()
This function will be called by DI-Guy when it is time for renderer-specific link objects created dur...
diguyOsgGraphicsShapeSwitchMap(diguyOsgGraphicsShape *shape, osg::Switch *switch_node)
Definition: diguyOsgGraphicsLink.h:62
osg::ref_ptr< osg::Uniform > m_ufrm_light_dir_os
Definition: diguyOsgGraphicsLink.h:142
virtual void update() override
This function will be called by DI-Guy when it is time for renderer-specific link objects created dur...
diguyOsgGraphicsLink(void *internal_data)
osg::ref_ptr< osg::Uniform > m_ufrm_eye_point_os
Definition: diguyOsgGraphicsLink.h:141
virtual void detach_from_scene()
This function will be called by DI-Guy when it is time for renderer-specific link objects created dur...
osg::ref_ptr< osg::Geode > m_bounding_sphere_visual
Definition: diguyOsgGraphicsLink.h:145
A class that represents the unique per-character non-shared joint of a character. A diguyCharacter is...
Definition: diguyGraphicsLink.h:45
diguyOsgGraphicsShape * m_shape
Definition: diguyOsgGraphicsLink.h:57
static osg::Group * s_diguy_instancing_attach_pt
Definition: diguyOsgGraphicsLink.h:151
static osg::Group * get_instancing_attach_node()
Definition: diguyOsgGraphicsLink.h:117
static void set_viewer(osgViewer::Viewer *viewer)
Definition: diguyOsgGraphicsLink.h:122
virtual void unbuild() override
This function will be called by DI-Guy when it is time for the renderer-specific link objects created...
virtual void post_build()
This function will be called by DI-Guy when all links and shapes of a DI-Guy character have been buil...
virtual void instancing_state_changed(int is_instanced) override
osg::ref_ptr< osg::MatrixTransform > m_dof_node
Definition: diguyOsgGraphicsLink.h:139
void remove_shape(diguyOsgGraphicsShape *shape)
void add_switch_for_fast_draw(diguyOsgGraphicsShape *shape, osg::Switch *switch_node)
Definition: diguyOsgGraphicsLink.h:45
diguyOsgGraphicsLink * m_link
Definition: diguyOsgGraphicsLink.h:72
static osg::Group * s_diguy_attach_pt
Definition: diguyOsgGraphicsLink.h:150
virtual void build() override
This function will be called by DI-Guy when it is time for renderer-specific link objects to be creat...
diguyOsgGraphicsShapeGeodeMap(diguyOsgGraphicsShape *shape, osg::Geode *geode)
Definition: diguyOsgGraphicsLink.h:54
static void set_diguy_attach_ptr(diguyScenario *scenario, osg::Group *diguy_attach_pt)