Class AbstractStaticGeometry#
Defined in File StaticGeometry.h
Inheritance Relationships#
Base Type#
public Karana::Core::BaseWithVars(Class BaseWithVars)
Derived Types#
public Karana::Scene::BoxGeometry(Class BoxGeometry)public Karana::Scene::CapsuleGeometry(Class CapsuleGeometry)public Karana::Scene::ConeGeometry(Class ConeGeometry)public Karana::Scene::CylinderGeometry(Class CylinderGeometry)public Karana::Scene::HeightFieldGeometry(Class HeightFieldGeometry)public Karana::Scene::RoundFrustumGeometry(Class RoundFrustumGeometry)public Karana::Scene::SphereGeometry(Class SphereGeometry)public Karana::Scene::StaticMeshGeometry(Class StaticMeshGeometry)
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
-
AbstractStaticGeometry(std::string_view name, bool is_convex)#