47 RockField(
const std::vector<Rock> &rocks);
53 RockField(std::vector<Rock> &&rocks)
noexcept;
75 uint32_t class_id = 0,
76 float default_radius = HMAP_DEFAULT_ROCK_RADIUS);
123 float sorting_strength = 1.0f,
135 const Array *p_friction_map =
nullptr,
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Array class, helper to manipulate 2D float array with "(i, j)" indexing.
Definition array.hpp:31
Represents a collection of unordered points in 2D space.
Definition cloud.hpp:61
RockField()=default
Default constructor initializing an empty rock field.
void apply_power_law_distribution(float alpha=2.0f, float r_min=1e-3f, float r_max=5e-2f, uint32_t seed=0)
Applies a heavy-tailed power-law (Pareto) radius distribution to all rocks.
Definition rock_field.cpp:71
std::string to_string() const override
Returns a multi-line formatted summary string of the rock field.
Definition rock_field.cpp:174
void apply_slope_sorting(const Array &slope, float sorting_strength=1.0f, const BBox2D &bbox=BBox2D{})
Simulates gravitational slope sorting (scree/talus dynamics).
Definition rock_field.cpp:119
void simulate_physics(const Array &elevation, const Array *p_friction_map=nullptr, const RockSimulationOptions &options={})
Simulates physical movement (sliding, rolling, bouncing, and inter-rock collision avoidance) for this...
Definition rock_field.cpp:167
ScatterField()=default
Default constructor initializing an empty field.
Array r_max(const Array &array1, const Array &array2, float alpha=0.f)
Generalized Rvachev R-function for smooth maximum / union (exact zero-set).
Definition math.cpp:436
Array 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.
Definition primitives.cpp:362
Array r_min(const Array &array1, const Array &array2, float alpha=0.f)
Generalized Rvachev R-function for smooth minimum / intersection (exact zero-set).
Definition math.cpp:422
Axis-aligned 2D bounding box in world coordinates.
Definition bbox2d.hpp:25
Parameters defining the size, power-law scaling, and embedding traits of rocks.
Definition rock_distribution.hpp:25
Configuration parameters for GPU-based rock and debris trajectory simulation.
Definition rock_simulation.hpp:30