Panda3D
|
00001 // Filename: stackedPerlinNoise2.I 00002 // Created by: drose (05Oct05) 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: StackedPerlinNoise2::Default Constructor 00018 // Access: Published 00019 // Description: Creates a StackedPerlinNoise2 object with no levels. 00020 // You should call add_level() to add each level by 00021 // hand. 00022 //////////////////////////////////////////////////////////////////// 00023 INLINE StackedPerlinNoise2:: 00024 StackedPerlinNoise2() { 00025 } 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: StackedPerlinNoise2::noise 00029 // Access: Published 00030 // Description: Returns the noise function of the three inputs. 00031 //////////////////////////////////////////////////////////////////// 00032 INLINE double StackedPerlinNoise2:: 00033 noise(double x, double y) { 00034 return noise(LVecBase2d(x, y)); 00035 } 00036 00037 //////////////////////////////////////////////////////////////////// 00038 // Function: StackedPerlinNoise2::noise 00039 // Access: Published 00040 // Description: Returns the noise function of the three inputs. 00041 //////////////////////////////////////////////////////////////////// 00042 INLINE float StackedPerlinNoise2:: 00043 noise(const LVecBase2f &value) { 00044 return (float)noise(value[0], value[1]); 00045 } 00046 00047 //////////////////////////////////////////////////////////////////// 00048 // Function: StackedPerlinNoise2::operator () 00049 // Access: Published 00050 // Description: Returns the noise function of the three inputs. 00051 //////////////////////////////////////////////////////////////////// 00052 INLINE double StackedPerlinNoise2:: 00053 operator ()(double x, double y) { 00054 return noise(x, y); 00055 } 00056 00057 //////////////////////////////////////////////////////////////////// 00058 // Function: StackedPerlinNoise2::noise 00059 // Access: Published 00060 // Description: Returns the noise function of the three inputs. 00061 //////////////////////////////////////////////////////////////////// 00062 INLINE float StackedPerlinNoise2:: 00063 operator ()(const LVecBase2f &value) { 00064 return noise(value); 00065 } 00066 00067 //////////////////////////////////////////////////////////////////// 00068 // Function: StackedPerlinNoise2::noise 00069 // Access: Published 00070 // Description: Returns the noise function of the three inputs. 00071 //////////////////////////////////////////////////////////////////// 00072 INLINE double StackedPerlinNoise2:: 00073 operator ()(const LVecBase2d &value) { 00074 return noise(value); 00075 }