Adding more Mat4x4 functionality

This commit is contained in:
2024-01-30 13:13:09 -05:00
parent 32577f79b8
commit 21ceca62dc
7 changed files with 100 additions and 36 deletions

View File

@@ -1,9 +1,8 @@
#pragma once
#include <J3ML/Geometry/AABB.h>
#include "Polyhedron.h"
#include <J3ML/Geometry/LineSegment.h>
#include <J3ML/Geometry/Polyhedron.h>
namespace Geometry {
class OBB
@@ -18,14 +17,14 @@ namespace Geometry {
OBB() {}
OBB(const Vector3& pos, const Vector3& radii, const Vector3& axis0, const Vector3& axis1, const Vector3& axis2);
OBB(const AABB& aabb);
OBB(const Geometry::AABB& aabb);
inline static int NumFaces() { return 6; }
inline static int NumEdges() { return 12; }
inline static int NumVertices() { return 8; }
Polyhedron ToPolyhedron() const;
AABB MinimalEnclosingAABB() const;
Geometry::AABB MinimalEnclosingAABB() const;
Sphere MinimalEnclosingSphere() const;
Sphere MaximalContainedSphere() const;
@@ -42,7 +41,7 @@ namespace Geometry {
float Volume();
float SurfaceArea();
LineSegment Edge(int edgeIndex) const;
Geometry::LineSegment Edge(int edgeIndex) const;
Vector3 CornerPoint(int cornerIndex) const;
};
}