DI-Guy C++ SDK Reference
13.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
diguyOsgGraphicsLink.h
Go to the documentation of this file.
1
#ifndef diguyOsgGraphicsLink_h__
2
#define diguyOsgGraphicsLink_h__
3
4
5
/*********************************************************************
6
**
7
*2 diguyOsgGraphicsLink
8
**
9
*/
10
11
#include <
diguyGraphicsLink.h
>
12
13
#include <osg/Group>
14
#include <osg/MatrixTransform>
15
#include <osgViewer/Viewer>
16
17
class
diguyGraphicsState
;
18
class
diguyOsgGraphicsShaderProgram
;
19
class
diguyOsgGraphicsShaderInstance
;
20
class
diguyOsgGraphicsState
;
21
22
23
/**********************************************************************
24
**
25
** Class declaration. diguyOsgGraphicsLink publicly inherits
26
** diguyGraphicsLink. Virtual functions are declared for some of the
27
** virtual functions in the base class.
28
*/
29
class
diguyOsgGraphicsLink
:
public
diguyGraphicsLink
30
{
31
32
public
:
33
34
diguyOsgGraphicsLink
(
void
* internal_data);
35
36
virtual
void
build
();
37
virtual
void
unbuild
();
38
virtual
void
update
();
39
virtual
void
attach_to_scene
();
40
virtual
void
detach_from_scene
();
41
virtual
void
instancing_state_changed
(
int
is_instanced);
42
virtual
void
set_shader_instance
(
diguyGraphicsShaderInstance
* shader_instance);
43
44
virtual
void
post_build
();
45
46
osg::MatrixTransform*
get_dof_node
() {
return
m_dof_node
.get();}
47
osg::StateSet*
get_top_level_state_set
();
48
49
static
osg::Group*
get_instancing_attach_node
() {
return
s_diguy_instancing_attach_pt
; }
50
51
static
void
set_diguy_attach_ptr
(osg::Group* diguy_attach_pt);
52
53
static
osgViewer::Viewer*
get_viewer
() {
return
s_viewer
; }
54
static
void
set_viewer
(osgViewer::Viewer*
viewer
) {
s_viewer
=
viewer
;}
55
57
58
protected
:
59
60
osg::Geode*
make_bounding_sphere_visual
(osg::Vec3& center,
float
radius);
61
62
osg::ref_ptr<osg::Texture2D>
get_default_variation_texture
();
63
64
// diguyGraphicsState* get_top_level_graphics_state();
65
// void recursive_post_build(diguyGraphicsState* first_state);
66
67
osg::ref_ptr<osg::MatrixTransform>
m_offset_node
;
68
osg::ref_ptr<osg::MatrixTransform>
m_dof_node
;
69
70
osg::ref_ptr<osg::Uniform>
m_ufrm_link_matrix
;
71
osg::ref_ptr<osg::Uniform>
m_ufrm_inverse_transform_matrix
;
72
osg::ref_ptr<osg::Uniform>
m_ufrm_eye_point_os
;
73
osg::ref_ptr<osg::Uniform>
m_ufrm_light_dir_os
;
74
75
osg::ref_ptr<osg::Geode>
m_bounding_sphere_visual
;
76
77
static
osg::Group*
s_diguy_attach_pt
;
78
static
osg::Group*
s_diguy_instancing_attach_pt
;
79
static
osgViewer::Viewer*
s_viewer
;
80
81
82
diguyOsgGraphicsShaderInstance
*
m_diguy_osg_shader_instance
;
83
diguyOsgGraphicsShaderProgram
*
m_diguy_osg_shader_program
;
84
85
static
osg::ref_ptr<osg::Texture2D>
sm_degenerate_texture
;
86
};
87
88
93
diguyGraphicsLink
*
diguyOsgGraphicsLink_create_func
(
void
* internal_data);
94
#endif // diguyOsgGraphicsLink_h__
95
96
diguy
programming_examples
diguy_graphics_api
osg_2_examples
common
diguyOsgGraphicsLink.h
Generated on Wed Jul 9 2014 21:35:57 for DI-Guy C++ SDK Reference by
1.8.3.1