HighMap library (C++)
Loading...
Searching...
No Matches
primitives.cpp File Reference

Namespaces

namespace  hmap

Functions

Array hmap::biquad_pulse (glm::ivec2 shape, float gain=1.f, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Return a 'biquadratic pulse'.
Array hmap::biquad_pulse_x (glm::ivec2 shape, const UvRect &uv_rect=UvRect::unit())
Array hmap::biquad_pulse_y (glm::ivec2 shape, const UvRect &uv_rect=UvRect::unit())
Array hmap::bump (glm::ivec2 shape, float gain=1.f, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Return a bump.
Array hmap::bump_lorentzian (glm::ivec2 shape, float shape_factor=0.5f, float radius=0.5f, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Generates a 2D Lorentzian bump pattern.
Array hmap::constant (glm::ivec2 shape, float value=0.f)
 Return a constant value array.
Array hmap::cubic_pulse (glm::ivec2 shape, const Array *p_noise_x, const Array *p_noise_y, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Generates a cubic pulse array.
Array hmap::disk (glm::ivec2 shape, float radius, float slope=1.f, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Generates a disk-shaped heightmap with optional modifications.
Array hmap::gaussian_pulse (glm::ivec2 shape, float sigma, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Return a gaussian_decay pulse kernel.
Array hmap::paraboloid (glm::ivec2 shape, float angle, float a, float b, float v0=0.f, bool reverse_x=false, bool reverse_y=false, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Return a paraboloid.
Array hmap::quad_surface (glm::ivec2 shape, float c00=0.f, float c10=0.f, float c01=0.f, float c11=0.f, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit())
 Generates a surface defined by the four corner values of the domain.
Array hmap::rectangle (glm::ivec2 shape, float rx, float ry, float angle, float slope=1.f, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Generates a rectangle-shaped heightmap with optional modifications.
Array hmap::slope (glm::ivec2 shape, float angle, float slope, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Return an array corresponding to a slope with a given overall.
Array hmap::smooth_cosine (glm::ivec2 shape, const Array *p_noise_x, const Array *p_noise_y, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Generates a smooth cosine array.
Array hmap::step (glm::ivec2 shape, float angle, float slope, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Return a step function (Heaviside with an optional talus slope at the transition).
Array hmap::get_primitive_base (const PrimitiveType &primitive_type, const glm::ivec2 &shape, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec2 center={0.5f, 0.5f}, const UvRect &uv_rect=UvRect::unit())
 Generates a primitive shape as a 2D array.