Class AbstractStaticGeometry#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

class AbstractStaticGeometry : public Karana::Core::BaseWithVars#

Interface for static geometry types.

See Scene layer for more discussion on the scene layer.

Subclassed by Karana::Scene::BoxGeometry, Karana::Scene::CapsuleGeometry, Karana::Scene::ConeGeometry, Karana::Scene::CylinderGeometry, Karana::Scene::HeightFieldGeometry, Karana::Scene::RoundFrustumGeometry, Karana::Scene::SphereGeometry, Karana::Scene::StaticMeshGeometry

Public Functions

AbstractStaticGeometry(std::string_view name, bool is_convex)#

Constructor.

Parameters:
  • name – the geometry’s name

  • is_convex – Set to true if AbstractStaticGeometry is convex, false otherwise.

virtual ~AbstractStaticGeometry()#
virtual Karana::Core::ks_ptr<StaticMeshGeometry> computeMesh() const = 0#

Convert to a triangular mesh.

Returns:

The converted mesh

virtual Karana::Math::AABB aabb() const = 0#

Compute the axis-aligned bounding box (AABB).

Returns:

The AABB

inline bool getConvexity() const#

Get whether the object is convex or not; used for some client scenes.

Returns:

Whether the item is convex. For some geometries this can be manually-marked.

Protected Attributes

bool _is_convex#

true if AbstractStaticGeometry is convex, false otherwise