40 glm::vec3
min { -1.0F };
41 glm::vec3
max { 1.0F };
43 [[nodiscard]] glm::vec3
center() const noexcept {
return (
min +
max) * 0.5F; }
44 [[nodiscard]] glm::vec3
extent() const noexcept {
return max -
min; }
45 [[nodiscard]]
float max_radius() const noexcept {
return glm::length(
extent()) * 0.5F; }
62 glm::vec3
normal { 0.0F, 0.0F, 1.0F };
80 const SamplerBounds& bounds,
98 const SamplerBounds& bounds,
115 glm::vec2 size_range = { 8.0F, 12.0F })
noexcept
120 .size = glm::mix(size_range.x, size_range.y, s.
scalar),
121 .uv = glm::vec2(0.0F),
135 glm::vec2 thickness_range = { 1.0F, 2.0F })
noexcept
140 .thickness = glm::mix(thickness_range.x, thickness_range.y, s.
scalar),
141 .uv = glm::vec2(0.0F),
157 glm::vec2 weight_range = { 0.0F, 1.0F })
noexcept
162 .weight = glm::mix(weight_range.x, weight_range.y, s.
scalar),
163 .uv = glm::vec2(0.0F),
176 std::span<const SampleResult> samples,
177 glm::vec2 size_range = { 8.0F, 12.0F });
186 std::span<const SampleResult> samples,
187 glm::vec2 thickness_range = { 1.0F, 2.0F });
196 std::span<const SampleResult> samples,
197 glm::vec2 weight_range = { 0.0F, 1.0F });
Unified generative infrastructure for stochastic and procedural algorithms.
SampleResult generate_sample_at(SpatialDistribution dist, size_t index, size_t total, const SamplerBounds &bounds, Stochastic::Stochastic &rng)
Generate a single sample at a specific index (for indexed/sequential modes).
Nodes::PointVertex to_point_vertex(const SampleResult &s, glm::vec2 size_range={ 8.0F, 12.0F }) noexcept
Project SampleResult to PointVertex.
std::vector< Nodes::PointVertex > to_point_vertices(std::span< const SampleResult > samples, glm::vec2 size_range)
Batch-project SampleResult vector to PointVertex.
Nodes::MeshVertex to_mesh_vertex(const SampleResult &s, glm::vec2 weight_range={ 0.0F, 1.0F }) noexcept
Project SampleResult to MeshVertex.
std::vector< Nodes::MeshVertex > to_mesh_vertices(std::span< const SampleResult > samples, glm::vec2 weight_range)
Batch-project SampleResult vector to MeshVertex.
std::vector< Nodes::LineVertex > to_line_vertices(std::span< const SampleResult > samples, glm::vec2 thickness_range)
Batch-project SampleResult vector to LineVertex.
SpatialDistribution
Spatial distribution mode for point cloud and particle generation.
Nodes::LineVertex to_line_vertex(const SampleResult &s, glm::vec2 thickness_range={ 1.0F, 2.0F }) noexcept
Project SampleResult to LineVertex.
std::vector< SampleResult > generate_samples(SpatialDistribution dist, size_t count, const SamplerBounds &bounds, Stochastic::Stochastic &rng)
Generate a batch of spatially distributed samples.
float scalar
Normalised scalar; maps to size (PointVertex) or thickness (LineVertex)
Position, color, orientation, and scalar derived from spatial sampling.
float max_radius() const noexcept
glm::vec3 center() const noexcept
glm::vec3 extent() const noexcept
Spatial domain for vertex generation.
Vertex type for line primitives (LINE_LIST / LINE_STRIP topology)
Vertex type for indexed triangle mesh primitives (TRIANGLE_LIST topology)
Vertex type for point primitives (POINT_LIST topology)