Class StaticMeshGeometry#

Inheritance Relationships#

Base Type#

Class Documentation#

class StaticMeshGeometry : public Karana::Scene::AbstractStaticGeometry#

Concrete triangular mesh geometry class.

Public Types

using Float3Array = Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>#

type alias for real-valued 3-vector array

using Float2Array = Eigen::Matrix<float, Eigen::Dynamic, 2, Eigen::RowMajor>#

type alias for real-valued 2-vector array

using Int3Array = Eigen::Matrix<int, Eigen::Dynamic, 3, Eigen::RowMajor>#

type alias for integer-valued 3-vector array

Public Functions

StaticMeshGeometry(const Float3Array &positions, const Int3Array &faces, const Float3Array &normals, const Float2Array &surface_map_coords)#

Constructor from vertices and faces.

Parameters:
  • positions – matrix of vertex positions

  • faces – matrix of triangles as three vertex indices

  • normals – matrix of vertex normals

  • surface_map_coords – matrix of uv (texture) coords

StaticMeshGeometry(const StaticMeshGeometry&)#

copy constructor

StaticMeshGeometry &operator=(const StaticMeshGeometry&) = delete#
StaticMeshGeometry(StaticMeshGeometry&&) = delete#
StaticMeshGeometry &operator=(StaticMeshGeometry&&) = delete#
virtual operator StaticMeshGeometry() const override#

Convert to a triangular mesh.

virtual Karana::Math::AABB aabb() const override#

Compute the axis-aligned bounding box (AABB)

Returns:

The AABB

Public Members

const Float3Array positions#

vertex positions

const Int3Array faces#

triangles consisting of three vertex indices

const Float3Array normals#

vertex normals

const Float2Array surface_map_coords#

vertex uv (texture) coordinates

std::string filename = ""#

If this mesh comes from a file, this is the filename.