VR-Forces 4.6.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvOsg
DtLightManagerStateAttribute.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2012 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#ifndef DtLightManagerStateAttribute_H_
11
#define DtLightManagerStateAttribute_H_
12
13
#include <
vrvCore/DtDe.h
>
14
#include <
vrvOsg/vrvOsg.h
>
15
#include <
vrvOsg/DtOsgLightManager.h
>
16
17
#include <osg/StateAttribute>
18
19
namespace
makVrv
20
{
25
class
DtLightManagerStateAttribute
:
public
osg::StateAttribute
26
{
27
public
:
28
30
DtLightManagerStateAttribute
(
DtDe
& de,
bool
enabled);
31
33
DtLightManagerStateAttribute
(
const
DtLightManagerStateAttribute
& att,
34
const
osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY)
35
: osg::
StateAttribute
(att, copyop)
36
,
myDe
(att.
myDe
)
37
,
myEnabled
(att.
myEnabled
)
38
{
39
}
40
42
virtual
~DtLightManagerStateAttribute
();
43
45
virtual
void
apply
(osg::State& state)
const
;
46
47
// OSG-required overrides:
48
virtual
osg::Object*
cloneType
()
const
49
{
50
return
new
DtLightManagerStateAttribute
(
myDe
,
false
);
51
}
52
53
virtual
osg::Object*
clone
(
const
osg::CopyOp& copyop)
const
54
{
55
return
new
DtLightManagerStateAttribute
(*
this
,copyop);
56
}
57
58
virtual
bool
isSameKindAs
(
const
osg::Object* obj)
const
{
59
return
dynamic_cast<
const
DtLightManagerStateAttribute
*
>
(obj) != 0;
60
}
61
62
virtual
const
char
*
libraryName
()
const
63
{
64
return
"vrvOsg"
;
65
}
66
67
virtual
const
char
*
className
()
const
68
{
69
return
"DtLightManagerStateAttribute"
;
70
}
71
72
virtual
Type
getType
()
const
73
{
74
return
(osg::StateAttribute::Type)1000;
75
}
76
77
virtual
bool
getModeUsage
(osg::StateAttribute::ModeUsage& usage)
const
78
{
79
/* for (int lightNum = 1; lightNum < 8; lightNum++)
80
{
81
usage.usesMode(GL_LIGHT0 + lightNum);
82
}*/
83
return
true
;
84
}
85
86
virtual
int
compare
(
const
StateAttribute
& sa)
const
87
{
88
COMPARE_StateAttribute_Types(
DtLightManagerStateAttribute
, sa)
89
rhs;
90
91
return
0;
92
}
93
94
protected
:
95
DtDe
&
myDe
;
96
bool
myEnabled
;
97
};
98
99
}
100
101
#endif
102
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)