#pragma once #include "LineSegment.h" #include namespace J3ML::Geometry { using namespace LinearAlgebra; class Capsule { // Specifies the two inner points of this capsule LineSegment l; // Specifies the radius of this capsule float r; Capsule(); Capsule(const LineSegment& endPoints, float radius); Capsule(const Vector3& bottomPt, const Vector3& topPt, float radius); bool IsDegenerate() const; float Height() const; float Diameter() const; Vector3 Bottom() const; Vector3 Center() const; Vector3 Centroid() const; Vector3 ExtremePoint(const Vector3& direction); }; }