00001 // Filename: lightRampAttrib.I 00002 // Created by: drose (04Mar02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: LightRampAttrib::Constructor 00018 // Access: Private 00019 // Description: Use LightRampAttrib::make() to construct a new 00020 // LightRampAttrib object. 00021 //////////////////////////////////////////////////////////////////// 00022 INLINE LightRampAttrib:: 00023 LightRampAttrib() { 00024 _mode = LRT_default; 00025 _level[0] = 0.0; 00026 _level[1] = 0.0; 00027 _threshold[0] = 0.0; 00028 _threshold[1] = 0.0; 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: LightRampAttrib::get_mode 00033 // Access: Published 00034 // Description: Returns the LightRampAttrib mode. 00035 //////////////////////////////////////////////////////////////////// 00036 INLINE LightRampAttrib::LightRampMode LightRampAttrib:: 00037 get_mode() const { 00038 return _mode; 00039 } 00040 00041 //////////////////////////////////////////////////////////////////// 00042 // Function: LightRampAttrib::get_level 00043 // Access: Published 00044 // Description: Returns the nth lighting level. 00045 //////////////////////////////////////////////////////////////////// 00046 INLINE PN_stdfloat LightRampAttrib:: 00047 get_level(int n) const { 00048 if ((n<0)||(n>1)) return 0.0; 00049 return _level[n]; 00050 } 00051 00052 //////////////////////////////////////////////////////////////////// 00053 // Function: LightRampAttrib::get_threshold 00054 // Access: Published 00055 // Description: Returns the nth threshold level. 00056 //////////////////////////////////////////////////////////////////// 00057 INLINE PN_stdfloat LightRampAttrib:: 00058 get_threshold(int n) const { 00059 if ((n<0)||(n>1)) return 0.0; 00060 return _threshold[n]; 00061 }