|
HighMap library (C++)
|
Rift (x, y) function class. More...
#include <functions.hpp>


Public Member Functions | |
| RiftFunction (float angle, float slope, float width, bool sharp_bottom, Vec2< float > center) | |
| Construct a new Rift Function object. | |
| void | set_angle (float new_angle) |
| Set the angle. | |
Public Member Functions inherited from hmap::Function | |
| 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 | angle |
| Overall rotation angle (in degrees). | |
| float | slope |
| Rift slope. | |
| float | width |
| Rift width. | |
| bool | sharp_bottom |
| Rift bottom sharpness. | |
| Vec2< float > | center |
| Primitive reference center. | |
Rift (x, y) function class.
This class models a step function with a specified angle, slope, and reference center. It extends the base Function class.
| hmap::RiftFunction::RiftFunction | ( | float | angle, |
| float | slope, | ||
| float | width, | ||
| bool | sharp_bottom, | ||
| Vec2< float > | center | ||
| ) |
Construct a new Rift Function object.
| angle | Overall rotation angle (in degrees). |
| slope | Rift slope. |
| width | Rift width. |
| sharp_bottom | Decide whether the rift bottom is sharp or not. |
| center | Primitive reference center. |
|
inline |
Set the angle.
| new_angle | New angle in degrees. |
|
protected |
Overall rotation angle (in degrees).
|
protected |
Rift slope.
|
protected |
Rift width.
|
protected |
Rift bottom sharpness.
|
protected |
Primitive reference center.