Class HeightFieldGeometry#
Defined in File StaticGeometry.h
Inheritance Relationships#
Base Type#
public Karana::Scene::AbstractStaticGeometry(Class AbstractStaticGeometry)
Class Documentation#
-
class HeightFieldGeometry : public Karana::Scene::AbstractStaticGeometry#
Center-origin 2D heightfield with fixed X/Y extents and sampled Z values.
The local origin is at the center of the X/Y extent. Grid sample
(0, 0)is located at(size_x / 2, size_y / 2). Increasing the column index advances toward-X; increasing the row index advances toward-Y. Consequently, the heightfield occupies[-size_x / 2, size_x / 2] x [-size_y / 2, size_y / 2]in its local frame. This convention matches the centered local bounds ofcoal::HeightField.See Scene layer for more discussion on the scene layer.
Public Types
-
using Float2Grid = Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic>#
2-D grid with the same layout type as Coal.
Public Functions
-
HeightFieldGeometry(float size_x, float size_y, const Float2Grid &heights)#
Construct a center-origin heightfield.
- Parameters:
-
HeightFieldGeometry(const HeightFieldGeometry&)#
Copy constructor.
-
HeightFieldGeometry &operator=(const HeightFieldGeometry&) = delete#
-
HeightFieldGeometry(HeightFieldGeometry&&) = delete#
-
HeightFieldGeometry &operator=(HeightFieldGeometry&&) = delete#
-
virtual Karana::Core::ks_ptr<StaticMeshGeometry> computeMesh() const override#
- Returns:
A triangle mesh using the same centered local frame.
Public Members
-
const float size_x#
Side length in the X direction.
-
const float size_y#
Side length in the Y direction.
-
const Float2Grid heights#
Height samples over the centered X/Y extent.
Public Static Functions
-
static Karana::Core::ks_ptr<HeightFieldGeometry> create(float size_x, float size_y, const Float2Grid &heights)#
Create a center-origin heightfield.
- Parameters:
- Returns:
A pointer to the new heightfield geometry.
-
using Float2Grid = Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic>#