Panda3D
Main Page
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
c
g
h
i
m
r
s
Enumerations
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
+
Functions
a
c
d
e
f
g
h
i
l
n
o
p
r
s
t
u
w
Variables
Typedefs
Enumerations
Macros
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Macros
panda
src
pgraph
colorAttrib.I
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file colorAttrib.I
10
* @author drose
11
* @date 2002-02-22
12
*/
13
14
/**
15
* Use ColorAttrib::make() to construct a new ColorAttrib object.
16
*/
17
INLINE ColorAttrib::
18
ColorAttrib(ColorAttrib::Type type,
const
LColor &color) :
19
_type(type),
20
_color(color)
21
{
22
quantize_color();
23
}
24
25
/**
26
* Returns the type of color specified by this ColorAttrib. The options are:
27
*
28
* T_vertex - use the vertex color specified in the geometry itself.
29
*
30
* T_flat - use the color specified in this ColorAttrib for all geometry. You
31
* can get this color via get_color().
32
*
33
* T_off - use the color white.
34
*/
35
INLINE ColorAttrib::Type ColorAttrib::
36
get_color_type()
const
{
37
return
_type;
38
}
39
40
/**
41
* If the type is T_flat or T_off, this returns the color that will be applied
42
* to geometry. If the type is T_vertex, this is meaningless.
43
*/
44
INLINE
const
LColor &ColorAttrib::
45
get_color()
const
{
46
return
_color;
47
}
Generated on Wed Jan 23 2019 21:40:09 for Panda3D by
1.8.15