HighMap library (C++)
Loading...
Searching...
No Matches
hmap::RiftFunction Class Reference

Rift (x, y) function class. More...

#include <functions.hpp>

Public Member Functions

float operator() (float x, float y, float ctrl_param=0.f) const
 RiftFunction (float angle, float slope, float width, bool sharp_bottom, glm::vec2 center)
 Construct a new Rift Function object.
void set_angle (float new_angle)
 Set the angle.

Protected Attributes

float angle
 Overall rotation angle (in degrees).
float slope
 Rift slope.
float width
 Rift width.
bool sharp_bottom
 Rift bottom sharpness.
glm::vec2 center
 Primitive reference center.

Detailed Description

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.

Constructor & Destructor Documentation

◆ RiftFunction()

hmap::RiftFunction::RiftFunction ( float angle,
float slope,
float width,
bool sharp_bottom,
glm::vec2 center )

Construct a new Rift Function object.

Parameters
angleOverall rotation angle (in degrees).
slopeRift slope.
widthRift width.
sharp_bottomDecide whether the rift bottom is sharp or not.
centerPrimitive reference center.

Member Function Documentation

◆ operator()()

float hmap::RiftFunction::operator() ( float x,
float y,
float ctrl_param = 0.f ) const

◆ set_angle()

void hmap::RiftFunction::set_angle ( float new_angle)
inline

Set the angle.

Parameters
new_angleNew angle in degrees.

Member Data Documentation

◆ angle

float hmap::RiftFunction::angle
protected

Overall rotation angle (in degrees).

◆ slope

float hmap::RiftFunction::slope
protected

Rift slope.

◆ width

float hmap::RiftFunction::width
protected

Rift width.

◆ sharp_bottom

bool hmap::RiftFunction::sharp_bottom
protected

Rift bottom sharpness.

◆ center

glm::vec2 hmap::RiftFunction::center
protected

Primitive reference center.


The documentation for this class was generated from the following files: