Skip to main content

Module vegetation

Module vegetation 

Source
Expand description

Vegetation system — tree/grass/rock placement, LOD, wind, seasonal changes.

Handles placement of trees, grass clusters, and rocks based on heightmap and biome data. Includes wind simulation, seasonal variation, procedural L-system tree skeletons, and frustum/distance culling.

Structs§

ForestGenerator
Specialized forest generator that creates realistic forest patterns.
GrassBlade
Per-blade grass animation state.
GrassCluster
A cluster of grass blades sharing placement and animation parameters.
GrassField
Collection of grass clusters over a terrain region.
GrassPatch
A patch of individually simulated grass blades.
ImpostorBillboard
Represents a billboard impostor for far-distance rendering.
LeafColorSystem
Computes leaf colors based on tree type, season, and variation.
LeafParticle
Represents a single falling leaf particle used for visual effects.
LeafParticleEmitter
Emitter that spawns leaf particles from tree canopies.
LeafParticleSystem
Manages a pool of leaf particles across an entire scene.
PlacementConstraint
Placement constraint: the cell at (x, z) in the heightmap must satisfy slope and altitude criteria for the given tree type.
RockCluster
A cluster of rocks using Poisson disk sampling.
RockPlacement
A placed rock or boulder.
SnowAccumulation
Computes snow accumulation on vegetation based on slope and temperature.
TerrainAwarePlacement
Filters a list of candidate positions against a heightmap using PlacementConstraint.
TreeParams
Parameters describing a single tree’s shape.
TreeSegment
A single segment in a procedural tree skeleton.
TreeSkeleton
Procedural tree skeleton generated by an L-system.
UndergrowthSystem
Generates undergrowth (ferns, mushrooms, flowers) beneath forest canopy.
VegetationAabb
Axis-aligned bounding box used for frustum / region culling.
VegetationAtlas
Manages texture atlas slots for vegetation impostor billboards.
VegetationCluster
A group of same-species instances sharing a spatial cluster for efficient culling.
VegetationCsvExporter
CSV exporter for spreadsheet analysis.
VegetationDensityMap
A 2D map of vegetation density values.
VegetationGrid
Spatial grid for O(1) region queries of vegetation instances.
VegetationHeatMap
2-D grid counting how many vegetation instances fall in each cell.
VegetationInstance
A single placed vegetation object (tree, grass cluster, rock).
VegetationLod
LOD configuration for a vegetation type.
VegetationObjExporter
Minimal OBJ-like text exporter for vegetation instances (positions only).
VegetationPainter
Manual vegetation painting API for terrain editors.
VegetationQuery
Query API for finding vegetation near a position.
VegetationSerializer
Serializes and deserializes vegetation data for saving/loading.
VegetationSystem
Top-level manager for all vegetation instances.
WindSystem
Models global wind for vegetation animation.

Enums§

TreeType
Tree species variants.
VegetationKind
What kind of vegetation this instance is.

Functions§

generate_impostors
Generate billboard impostors from a set of tree instances.