Panda3D
lightRampAttrib.I
1 // Filename: lightRampAttrib.I
2 // Created by: drose (04Mar02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: LightRampAttrib::Constructor
18 // Access: Private
19 // Description: Use LightRampAttrib::make() to construct a new
20 // LightRampAttrib object.
21 ////////////////////////////////////////////////////////////////////
22 INLINE LightRampAttrib::
23 LightRampAttrib() {
24  _mode = LRT_default;
25  _level[0] = 0.0;
26  _level[1] = 0.0;
27  _threshold[0] = 0.0;
28  _threshold[1] = 0.0;
29 }
30 
31 ////////////////////////////////////////////////////////////////////
32 // Function: LightRampAttrib::get_mode
33 // Access: Published
34 // Description: Returns the LightRampAttrib mode.
35 ////////////////////////////////////////////////////////////////////
36 INLINE LightRampAttrib::LightRampMode LightRampAttrib::
37 get_mode() const {
38  return _mode;
39 }
40 
41 ////////////////////////////////////////////////////////////////////
42 // Function: LightRampAttrib::get_level
43 // Access: Published
44 // Description: Returns the nth lighting level.
45 ////////////////////////////////////////////////////////////////////
46 INLINE PN_stdfloat LightRampAttrib::
47 get_level(int n) const {
48  if ((n<0)||(n>1)) return 0.0;
49  return _level[n];
50 }
51 
52 ////////////////////////////////////////////////////////////////////
53 // Function: LightRampAttrib::get_threshold
54 // Access: Published
55 // Description: Returns the nth threshold level.
56 ////////////////////////////////////////////////////////////////////
57 INLINE PN_stdfloat LightRampAttrib::
58 get_threshold(int n) const {
59  if ((n<0)||(n>1)) return 0.0;
60  return _threshold[n];
61 }
LightRampMode get_mode() const
Returns the LightRampAttrib mode.
PN_stdfloat get_threshold(int n) const
Returns the nth threshold level.
PN_stdfloat get_level(int n) const
Returns the nth lighting level.