HighMap library (C++)
Loading...
Searching...
No Matches
range.cpp File Reference

Namespaces

namespace  hmap
 

Functions

void hmap::chop (Array &array, float vmin)
 Set to zero any value lower than vmin.
 
void hmap::chop_max_smooth (Array &array, float vmax)
 Set to zero any value lower than vmax and apply a linear decrease slope between vmax / 2 and vmax.
 
void hmap::clamp (Array &array, float vmin=0, float vmax=1)
 Clamp array elements to a target range.
 
void hmap::clamp_max (Array &array, float vmax)
 Clamp array values larger than a given bound.
 
void hmap::clamp_max (Array &array, const Array &vmax)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::clamp_max_smooth (Array &array, float vmax, float k=0.2f)
 Clamp array values larger than a given bound with a smooth transition.
 
void hmap::clamp_max_smooth (Array &array, const Array &vmax, float k=0.2f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::clamp_min (Array &array, float vmin)
 Clamp array values lower than a given bound.
 
void hmap::clamp_min (Array &array, const Array &vmin)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::clamp_min_smooth (Array &array, float vmin, float k=0.2f)
 Clamp array values lower than a given bound with a smooth transition.
 
void hmap::clamp_min_smooth (Array &array, const Array &vmin, float k=0.2f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
float hmap::clamp_min_smooth (float x, float vmin, float k=0.2f)
 Clamp a single value lower than a given bound with a smooth transition.
 
void hmap::clamp_smooth (Array &array, float vmin, float vmax, float k=0.2f)
 Clamp array values within a given interval with a smooth transition.
 
Array hmap::maximum (const Array &array1, const Array &array2)
 Return the element-wise maximum of two arrays.
 
Array hmap::maximum (const Array &array1, const float value)
 Return the element-wise maximum of an array and a scalar value.
 
Array hmap::maximum_local (const Array &array, int ir)
 Return the local maxima based on a maximum filter with a square kernel.
 
Array hmap::maximum_local_disk (const Array &array, int ir)
 Return the local maxima based on a maximum filter using a disk kernel.
 
Array hmap::maximum_smooth (const Array &array1, const Array &array2, float k=0.2)
 Return the polynomial cubic smooth element-wise maximum of two arrays.
 
float hmap::maximum_smooth (const float a, const float b, float k=0.2)
 Return the polynomial cubic smooth maximum of two scalar values.
 
Array hmap::minimum (const Array &array1, const Array &array2)
 Return the element-wise minimum of two arrays.
 
Array hmap::minimum (const Array &array1, const float value)
 Return the element-wise minimum of an array and a scalar value.
 
Array hmap::minimum_local (const Array &array, int ir)
 Return the local minima based on a maximum filter with a square kernel.
 
Array hmap::minimum_local_disk (const Array &array, int ir)
 Return the local minima based on a maximum filter using a disk kernel.
 
Array hmap::minimum_smooth (const Array &array1, const Array &array2, float k=0.2)
 Return the polynomial cubic smooth element-wise minimum of two arrays.
 
float hmap::minimum_smooth (const float a, const float b, float k)
 Return the polynomial cubic smooth minimum of two scalar values.
 
void hmap::remap (Array &array, float vmin=0, float vmax=1)
 Remap array elements from a starting range to a target range (default range).
 
void hmap::remap (Array &array, float vmin, float vmax, float from_min, float from_max)
 Remap array elements from a starting range to a target range.
 
void hmap::rescale (Array &array, float scaling, float vref=0.f)
 Remap array elements from a starting range to a target range.