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

Quadratic surface function defined by four corner values. More...

#include <functions.hpp>

Collaboration diagram for hmap::QuadSurfaceFunction:

Public Member Functions

float operator() (float x, float y, float ctrl_param=0.f) const
 QuadSurfaceFunction (float c00, float c10, float c01, float c11)
 Construct a new QuadSurface Function object.

Protected Attributes

float c00
 Bottom-left value.
float c10
 Bottom-right value.
float c01
 Top-left value.
float c11
 Top-right value.
BBox2D bbox
 Domain bounding box.

Detailed Description

Quadratic surface function defined by four corner values.

This class interpolates a surface across the bounding box domain using bilinear/quadratic interpolation from four corner elevations: c00 (bottom-left), c10 (bottom-right), c01 (top-left), and c11 (top-right).

Constructor & Destructor Documentation

◆ QuadSurfaceFunction()

hmap::QuadSurfaceFunction::QuadSurfaceFunction ( float c00,
float c10,
float c01,
float c11 )

Construct a new QuadSurface Function object.

Parameters
c00Value at bottom-left corner (x=xmin, y=ymin).
c10Value at bottom-right corner (x=xmax, y=ymin).
c01Value at top-left corner (x=xmin, y=ymax).
c11Value at top-right corner (x=xmax, y=ymax).

Member Function Documentation

◆ operator()()

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

Member Data Documentation

◆ c00

float hmap::QuadSurfaceFunction::c00
protected

Bottom-left value.

◆ c10

float hmap::QuadSurfaceFunction::c10
protected

Bottom-right value.

◆ c01

float hmap::QuadSurfaceFunction::c01
protected

Top-left value.

◆ c11

float hmap::QuadSurfaceFunction::c11
protected

Top-right value.

◆ bbox

BBox2D hmap::QuadSurfaceFunction::bbox
protected

Domain bounding box.


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