cubos::core::geom::Capsule struct

Represents a capsule or sphere shape.

Public static functions

static auto sphere(float radius) -> Capsule
Constructs a sphere.

Public functions

auto height() const -> float
Gets the height of the capsule.
auto aabb() const -> AABB
Computes the local AABB of the capsule.

Public variables

float radius
Radius of the capsule.
float length
Length of the capsule.

Function documentation

static Capsule cubos::core::geom::Capsule::sphere(float radius)

Constructs a sphere.

Parameters
radius Sphere radius.
Returns Sphere shape.

float cubos::core::geom::Capsule::height() const

Gets the height of the capsule.

Returns Height of the capsule.

AABB cubos::core::geom::Capsule::aabb() const

Computes the local AABB of the capsule.

Returns Local AABB of the capsule.