|
Infinity Engine v0.6.20
C++ API Documentation
|
Renderable terrain representation with heightmap and material distribution data. More...
#include <Landscape.hpp>
Public Member Functions | |
| virtual | ~Landscape () |
| Destructor. | |
| std::unique_ptr< Core::Base > | clone () const override |
| const Infinity::Types::TypeID & | typeId () const override |
| Gets the TypeID for Landscape. | |
Public Member Functions inherited from Infinity::Types::Rendering::RenderObject | |
| RenderObject () | |
| Default constructor. | |
| virtual | ~RenderObject () |
| Destructor. | |
| std::unique_ptr< Core::Base > | clone () const override |
| const Infinity::Types::TypeID & | typeId () const override |
| Gets the TypeID for RenderObject. | |
Public Member Functions inherited from Infinity::Types::Core::Data | |
| Data () | |
| Data (const Data &other) | |
| Data (Data &&other) | |
| Data & | operator= (const Data &other) |
| Data & | operator= (Data &&other) |
| virtual | ~Data () |
| Virtual destructor. | |
| bool | hasProperty (const std::string &key) const |
| template<typename T > | |
| void | setProperty (const std::string &key, T &&value) |
| Sets a typed property value. | |
| template<typename T > | |
| void | setProperty (const std::string &key, const T &value) |
| Sets a typed property value. | |
| void | setProperty (const std::string &key, PropertyValue &&value) |
| Sets a typed property value. | |
| const PropertyValue & | getProperty (const std::string &key) const |
| Gets a property value without type checking. | |
| template<typename T > | |
| const T & | getProperty (const std::string &key) const |
| Gets a typed property value. | |
| void | removeProperty (const std::string &key) |
Public Member Functions inherited from Infinity::Types::Core::Base | |
| virtual | ~Base () |
| Virtual destructor. | |
| virtual std::istream & | legibleDataRead (std::istream &in) override |
| Deserializes the object from a single-line text representation. | |
| virtual std::ostream & | legibleDataWrite (std::ostream &out) const override |
| Serializes the object to a single-line text representation. | |
Public Attributes | |
| Containers::Heightmap | heightmap |
| Heightmap defining terrain elevation. | |
| Containers::Array< Containers::Splatmap > | splatmaps |
| Material distribution splatmaps for texture blending. | |
| Containers::Array< Containers::Array2D< float > > | detailmaps |
| Detail density maps for surface feature distribution. | |
Public Attributes inherited from Infinity::Types::Rendering::RenderObject | |
| Spatial::Transform | transform |
| World-space transform for this object. | |
| Renderable | renderable |
| Renderable content (geometry, materials, instances). | |
Public Attributes inherited from Infinity::Types::Core::Data | |
| std::unordered_map< std::string, PropertyValue > | properties |
| Property storage for arbitrary metadata. | |
Renderable terrain representation with heightmap and material distribution data.
Landscape encapsulates a complete terrain surface with elevation data, material distribution (splatmaps), and optional detail maps for vegetation or surface features. It extends RenderObject to provide full integration with the Infinity Engine's rendering pipeline while maintaining the procedural generation data needed for runtime modifications and streaming.
The landscape structure consists of:
This unified representation enables:
The heightmap defines the base terrain geometry, while splatmaps control which materials/textures appear at each location. Multiple splatmaps allow complex multi-material blending. Detailmaps provide additional per-texel data for spawning grass, rocks, or other surface elements.
Example usage:
|
virtual |
Destructor.
|
overridevirtual |
Reimplemented from Infinity::Types::Core::Data.
|
overridevirtual |
Gets the TypeID for Landscape.
Reimplemented from Infinity::Types::Core::Data.
| Containers::Array<Containers::Array2D<float> > Infinity::Types::Procedural::Landscape::detailmaps |
Detail density maps for surface feature distribution.
Array of 2D float maps defining density/probability values for placing surface details like grass, rocks, flowers, or debris. Values typically range from 0.0 (no details) to 1.0 (maximum density).
Typical usage:
These maps are sampled during detail placement to control where and how densely surface features appear, enabling realistic and varied terrain surfaces.
| Containers::Heightmap Infinity::Types::Procedural::Landscape::heightmap |
Heightmap defining terrain elevation.
2D array of float values representing the terrain's vertical displacement at each point. Values are typically in world-space units (meters) and define the shape of the landscape surface.
Common resolutions:
| Containers::Array<Containers::Splatmap> Infinity::Types::Procedural::Landscape::splatmaps |
Material distribution splatmaps for texture blending.
Array of 2D uint8 maps where each map represents the weight/presence of a specific material at each terrain location. Values range from 0 (material absent) to 255 (material fully present).
Typical usage:
Multiple splatmaps are blended together during rendering to create smooth transitions between terrain materials.