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

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

#include <functions.hpp>

Public Member Functions

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

Protected Attributes

float angle
 Overall rotation angle (in degrees).
float slope
 Step slope.
glm::vec2 center
 Primitive reference center.

Detailed Description

Step (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

◆ StepFunction()

hmap::StepFunction::StepFunction ( float angle,
float slope,
glm::vec2 center )

Construct a new Step Function object.

Parameters
angleOverall rotation angle (in degrees).
slopeStep slope.
centerPrimitive reference center.

Member Function Documentation

◆ operator()()

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

◆ set_angle()

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

Set the angle.

Parameters
new_angleNew angle in degrees.

Member Data Documentation

◆ angle

float hmap::StepFunction::angle
protected

Overall rotation angle (in degrees).

◆ slope

float hmap::StepFunction::slope
protected

Step slope.

◆ center

glm::vec2 hmap::StepFunction::center
protected

Primitive reference center.


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