HighMap library (C++)
|
Crater (x, y) function class. More...
#include <functions.hpp>
Public Member Functions | |
CraterFunction (float radius, float depth, float lip_decay, float lip_height_ratio, Vec2< float > center) | |
Construct a new Crater Function object. | |
![]() | |
Function () | |
Default constructor. Initializes the delegate function to a default that returns 0. | |
virtual | ~Function ()=default |
Virtual destructor to ensure proper cleanup in derived classes. | |
Function (HMAP_FCT_XY_TYPE delegate) | |
Constructor to initialize with a specific delegate function. | |
HMAP_FCT_XY_TYPE | get_delegate () const |
Get the current delegate function. | |
float | get_value (float x, float y, float ctrl_param) const |
Call the delegate function with given arguments. | |
void | set_delegate (HMAP_FCT_XY_TYPE new_delegate) |
Set a new delegate function. | |
Protected Attributes | |
float | radius |
Radius of the crater. | |
float | depth |
Depth of the crater. | |
float | lip_decay |
Decay rate of the crater's lip. | |
float | lip_height_ratio |
Height ratio of the crater's lip. | |
Vec2< float > | center |
Primitive reference center. | |
Crater (x, y) function class.
This class models a crater function with specified radius, depth, lip decay, lip height ratio, and reference center. It extends the base Function class.
hmap::CraterFunction::CraterFunction | ( | float | radius, |
float | depth, | ||
float | lip_decay, | ||
float | lip_height_ratio, | ||
Vec2< float > | center | ||
) |
Construct a new Crater Function object.
radius | Radius of the crater (with respect to a unit domain). |
depth | Depth of the crater (with respect to a unit domain). |
lip_decay | Decay rate of the crater's lip (with respect to a unit domain). |
lip_height_ratio | Height ratio of the crater's lip. |
center | Primitive reference center. |
|
protected |
Radius of the crater.
|
protected |
Depth of the crater.
|
protected |
Decay rate of the crater's lip.
|
protected |
Height ratio of the crater's lip.
|
protected |
Primitive reference center.