Panda3D
lightRampAttrib.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 lightRampAttrib.I
10  * @author drose
11  * @date 2002-03-04
12  */
13 
14 /**
15  * Use LightRampAttrib::make() to construct a new LightRampAttrib object.
16  */
17 INLINE LightRampAttrib::
18 LightRampAttrib() {
19  _mode = LRT_default;
20  _level[0] = 0.0;
21  _level[1] = 0.0;
22  _threshold[0] = 0.0;
23  _threshold[1] = 0.0;
24 }
25 
26 /**
27  * Returns the LightRampAttrib mode.
28  */
29 INLINE LightRampAttrib::LightRampMode LightRampAttrib::
30 get_mode() const {
31  return _mode;
32 }
33 
34 /**
35  * Returns the nth lighting level.
36  */
37 INLINE PN_stdfloat LightRampAttrib::
38 get_level(int n) const {
39  if ((n<0)||(n>1)) return 0.0;
40  return _level[n];
41 }
42 
43 /**
44  * Returns the nth threshold level.
45  */
46 INLINE PN_stdfloat LightRampAttrib::
47 get_threshold(int n) const {
48  if ((n<0)||(n>1)) return 0.0;
49  return _threshold[n];
50 }
PN_stdfloat get_threshold(int n) const
Returns the nth threshold level.
PN_stdfloat get_level(int n) const
Returns the nth lighting level.