HighMap library (C++)
Loading...
Searching...
No Matches
hmap::ForestScaleSampler Struct Reference

Helper for sampling spatial scaling maps over a 2D bounding box with blending. More...

#include <forest_growth.hpp>

Collaboration diagram for hmap::ForestScaleSampler:

Public Member Functions

 ForestScaleSampler (const Array &array, float strength_factor, const BBox2D &bounds)
float sample (float x, float y) const

Public Attributes

const Array * scale_array = nullptr
const BBox2D & bbox = BBox2D{}
float strength = 1.0f
float bbox_dx = 1.0f
float bbox_dy = 1.0f
bool active = false

Detailed Description

Helper for sampling spatial scaling maps over a 2D bounding box with blending.

Constructor & Destructor Documentation

◆ ForestScaleSampler()

hmap::ForestScaleSampler::ForestScaleSampler ( const Array & array,
float strength_factor,
const BBox2D & bounds )

Member Function Documentation

◆ sample()

float hmap::ForestScaleSampler::sample ( float x,
float y ) const

Member Data Documentation

◆ scale_array

const Array* hmap::ForestScaleSampler::scale_array = nullptr

◆ bbox

const BBox2D& hmap::ForestScaleSampler::bbox = BBox2D{}

◆ strength

float hmap::ForestScaleSampler::strength = 1.0f

◆ bbox_dx

float hmap::ForestScaleSampler::bbox_dx = 1.0f

◆ bbox_dy

float hmap::ForestScaleSampler::bbox_dy = 1.0f

◆ active

bool hmap::ForestScaleSampler::active = false

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