mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
declare methods const
This commit is contained in:
parent
c0c9347983
commit
98c7d82385
@ -123,7 +123,7 @@ set_scale(const LVecBase2d &value) {
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE double PerlinNoise2::
|
||||
noise(double x, double y) {
|
||||
noise(double x, double y) const {
|
||||
return noise(LVecBase2d(x, y));
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ noise(double x, double y) {
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float PerlinNoise2::
|
||||
noise(const LVecBase2f &value) {
|
||||
noise(const LVecBase2f &value) const {
|
||||
return (float)noise(value[0], value[1]);
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ noise(const LVecBase2f &value) {
|
||||
// Description: Returns the noise function of the two inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE double PerlinNoise2::
|
||||
operator ()(double x, double y) {
|
||||
operator ()(double x, double y) const {
|
||||
return noise(x, y);
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ operator ()(double x, double y) {
|
||||
// Description: Returns the noise function of the two inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float PerlinNoise2::
|
||||
operator ()(const LVecBase2f &value) {
|
||||
operator ()(const LVecBase2f &value) const {
|
||||
return noise(value);
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ operator ()(const LVecBase2f &value) {
|
||||
// Description: Returns the noise function of the two inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE double PerlinNoise2::
|
||||
operator ()(const LVecBase2d &value) {
|
||||
operator ()(const LVecBase2d &value) const {
|
||||
return noise(value);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
double PerlinNoise2::
|
||||
noise(const LVecBase2d &value) {
|
||||
noise(const LVecBase2d &value) const {
|
||||
// Convert the vector to our local coordinate space.
|
||||
LVecBase2d vec = _input_xform.xform_point(value);
|
||||
|
||||
|
@ -43,13 +43,13 @@ PUBLISHED:
|
||||
INLINE void set_scale(const LVecBase2f &scale);
|
||||
void set_scale(const LVecBase2d &scale);
|
||||
|
||||
INLINE double noise(double x, double y);
|
||||
INLINE float noise(const LVecBase2f &value);
|
||||
double noise(const LVecBase2d &value);
|
||||
INLINE double noise(double x, double y) const;
|
||||
INLINE float noise(const LVecBase2f &value) const;
|
||||
double noise(const LVecBase2d &value) const;
|
||||
|
||||
INLINE double operator ()(double x, double y);
|
||||
INLINE float operator ()(const LVecBase2f &value);
|
||||
INLINE double operator ()(const LVecBase2d &value);
|
||||
INLINE double operator ()(double x, double y) const;
|
||||
INLINE float operator ()(const LVecBase2f &value) const;
|
||||
INLINE double operator ()(const LVecBase2d &value) const;
|
||||
|
||||
private:
|
||||
void init_unscaled_xform();
|
||||
|
@ -123,7 +123,7 @@ set_scale(const LVecBase3d &value) {
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE double PerlinNoise3::
|
||||
noise(double x, double y, double z) {
|
||||
noise(double x, double y, double z) const {
|
||||
return noise(LVecBase3d(x, y, z));
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ noise(double x, double y, double z) {
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float PerlinNoise3::
|
||||
noise(const LVecBase3f &value) {
|
||||
noise(const LVecBase3f &value) const {
|
||||
return (float)noise(value[0], value[1], value[2]);
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ noise(const LVecBase3f &value) {
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE double PerlinNoise3::
|
||||
operator ()(double x, double y, double z) {
|
||||
operator ()(double x, double y, double z) const {
|
||||
return noise(x, y, z);
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ operator ()(double x, double y, double z) {
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float PerlinNoise3::
|
||||
operator ()(const LVecBase3f &value) {
|
||||
operator ()(const LVecBase3f &value) const {
|
||||
return noise(value);
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ operator ()(const LVecBase3f &value) {
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE double PerlinNoise3::
|
||||
operator ()(const LVecBase3d &value) {
|
||||
operator ()(const LVecBase3d &value) const {
|
||||
return noise(value);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
// Description: Returns the noise function of the three inputs.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
double PerlinNoise3::
|
||||
noise(const LVecBase3d &value) {
|
||||
noise(const LVecBase3d &value) const {
|
||||
// Convert the vector to our local coordinate space.
|
||||
LVecBase3d vec = _input_xform.xform_point(value);
|
||||
|
||||
|
@ -42,13 +42,13 @@ PUBLISHED:
|
||||
INLINE void set_scale(const LVecBase3f &scale);
|
||||
INLINE void set_scale(const LVecBase3d &scale);
|
||||
|
||||
INLINE double noise(double x, double y, double z);
|
||||
INLINE float noise(const LVecBase3f &value);
|
||||
double noise(const LVecBase3d &value);
|
||||
INLINE double noise(double x, double y, double z) const;
|
||||
INLINE float noise(const LVecBase3f &value) const;
|
||||
double noise(const LVecBase3d &value) const;
|
||||
|
||||
INLINE double operator ()(double x, double y, double z);
|
||||
INLINE float operator ()(const LVecBase3f &value);
|
||||
INLINE double operator ()(const LVecBase3d &value);
|
||||
INLINE double operator ()(double x, double y, double z) const;
|
||||
INLINE float operator ()(const LVecBase3f &value) const;
|
||||
INLINE double operator ()(const LVecBase3d &value) const;
|
||||
|
||||
private:
|
||||
void init_unscaled_xform();
|
||||
|
Loading…
x
Reference in New Issue
Block a user