Implement Geometric Class Definitions

This commit is contained in:
2024-01-25 19:09:48 -05:00
parent 56077b7c86
commit 4152b0d2aa
13 changed files with 87 additions and 85 deletions

View File

@@ -1,8 +1,27 @@
//
// Created by dawsh on 1/25/24.
//
#pragma once
#ifndef J3ML_CAPSULE_H
#define J3ML_CAPSULE_H
#include "LineSegment.h"
#include <J3ML/LinearAlgebra/Vector3.h>
#endif //J3ML_CAPSULE_H
namespace 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);
};
}