Implement Geometric Class Definitions
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
@@ -1,8 +1,10 @@
|
||||
//
|
||||
// Created by dawsh on 1/25/24.
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#ifndef J3ML_LINESEGMENT_H
|
||||
#define J3ML_LINESEGMENT_H
|
||||
|
||||
#endif //J3ML_LINESEGMENT_H
|
||||
namespace Geometry
|
||||
{
|
||||
class LineSegment
|
||||
{
|
||||
Vector3 A;
|
||||
Vector3 B;
|
||||
};
|
||||
}
|
@@ -1,8 +1,9 @@
|
||||
//
|
||||
// Created by dawsh on 1/25/24.
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#ifndef J3ML_QUADTREE_H
|
||||
#define J3ML_QUADTREE_H
|
||||
namespace Geometry
|
||||
{
|
||||
class QuadTree
|
||||
{
|
||||
|
||||
#endif //J3ML_QUADTREE_H
|
||||
};
|
||||
}
|
@@ -2,7 +2,15 @@
|
||||
// Created by dawsh on 1/25/24.
|
||||
//
|
||||
|
||||
#ifndef J3ML_RAY_H
|
||||
#define J3ML_RAY_H
|
||||
#pragma once
|
||||
|
||||
#endif //J3ML_RAY_H
|
||||
#include <J3ML/LinearAlgebra/Vector3.h>
|
||||
|
||||
namespace Geometry
|
||||
{
|
||||
class Ray
|
||||
{
|
||||
Vector3 Origin;
|
||||
Vector3 Direction;
|
||||
};
|
||||
}
|
@@ -1,8 +1,6 @@
|
||||
//
|
||||
// Created by dawsh on 1/25/24.
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#ifndef J3ML_TRIANGLE_H
|
||||
#define J3ML_TRIANGLE_H
|
||||
namespace Geometry
|
||||
{
|
||||
|
||||
#endif //J3ML_TRIANGLE_H
|
||||
}
|
@@ -1,8 +1,9 @@
|
||||
//
|
||||
// Created by dawsh on 1/25/24.
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#ifndef J3ML_TRIANGLEMESH_H
|
||||
#define J3ML_TRIANGLEMESH_H
|
||||
namespace Geometry
|
||||
{
|
||||
class TriangleMesh
|
||||
{
|
||||
|
||||
#endif //J3ML_TRIANGLEMESH_H
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user