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

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

#include <functions.hpp>

Public Member Functions

float operator() (float x, float y, float ctrl_param=0.f) const
 CraterFunction (float radius, float depth, float lip_decay, float lip_height_ratio, glm::vec2 center)
 Construct a new Crater Function object.

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.
glm::vec2 center
 Primitive reference center.

Detailed Description

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.

Constructor & Destructor Documentation

◆ CraterFunction()

hmap::CraterFunction::CraterFunction ( float radius,
float depth,
float lip_decay,
float lip_height_ratio,
glm::vec2 center )

Construct a new Crater Function object.

Parameters
radiusRadius of the crater (with respect to a unit domain).
depthDepth of the crater (with respect to a unit domain).
lip_decayDecay rate of the crater's lip (with respect to a unit domain).
lip_height_ratioHeight ratio of the crater's lip.
centerPrimitive reference center.

Member Function Documentation

◆ operator()()

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

Member Data Documentation

◆ radius

float hmap::CraterFunction::radius
protected

Radius of the crater.

◆ depth

float hmap::CraterFunction::depth
protected

Depth of the crater.

◆ lip_decay

float hmap::CraterFunction::lip_decay
protected

Decay rate of the crater's lip.

◆ lip_height_ratio

float hmap::CraterFunction::lip_height_ratio
protected

Height ratio of the crater's lip.

◆ center

glm::vec2 hmap::CraterFunction::center
protected

Primitive reference center.


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