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
Constructor.
Capsule(const VectorTypeFor<dimensions, Float>& a, const VectorTypeFor<dimensions, Float>& b, Float radius) constexpr
Constructor.

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
Radius.
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

Enumerators
Dimensions

Dimension count

Function documentation

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

Constructor.

Creates zero-sized capsule at origin.