template<UnsignedInt dimensions>
Magnum::Shapes::Capsule class

Capsule defined by cylinder start and end point and radius.

Unlike other elements the capsule expects uniform scaling. See Collision detection for brief introduction.

Public types

enum (anonymous): UnsignedInt { Dimensions = dimensions }

Constructors, destructors, conversion operators

Capsule() constexpr
Capsule(const VectorTypeFor<dimensions, Float>& a, const VectorTypeFor<dimensions, Float>& b, Float radius) constexpr

Public functions

auto transformed(const MatrixTypeFor<dimensions, Float>& matrix) const -> Capsule<dimensions>
Transformed shape.
auto a() const -> VectorTypeFor<dimensions, Float> constexpr
Start point.
void setA(const VectorTypeFor<dimensions, Float>& a)
Set start point.
auto b() const -> VectorTypeFor<dimensions, Float> constexpr
End point.
void setB(const VectorTypeFor<dimensions, Float>& b)
Set end point.
auto radius() const -> Float constexpr
void setRadius(Float radius)
Set radius.
auto operator%(const Point<dimensions>& other) const -> bool
Collision occurence with point.
auto operator%(const Sphere<dimensions>& other) const -> bool
Collision occurence with sphere.

Enum documentation

template<UnsignedInt dimensions>
enum Magnum::Shapes::Capsule<dimensions>::(anonymous): UnsignedInt


Dimension count

Function documentation

template<UnsignedInt dimensions>
Magnum::Shapes::Capsule<dimensions>::Capsule() constexpr


Creates zero-sized capsule at origin.