MSVC Support fixes.
All checks were successful
Build Docs With Doxygen / Explore-Gitea-Actions (push) Successful in 1m20s

This commit is contained in:
2024-05-21 00:52:02 -07:00
parent ca2223aaee
commit 0c85b8408c
16 changed files with 62 additions and 23 deletions

View File

@@ -55,6 +55,6 @@ namespace J3ML::Algorithms
Vector3 offset = (Vector3::Min(ab.minPoint, bb.minPoint) + Vector3::Max(ab.maxPoint, bb.maxPoint)) * 0.5f;
const Vector3 floatingPtPrecisionOffset = -offset;
return GJLIntersect(a.Translated(floatingPtPrecisionOffset), b.Translated(floatingPtPrecisionOffset));
return GJKIntersect(a.Translated(floatingPtPrecisionOffset), b.Translated(floatingPtPrecisionOffset));
}
}

View File

@@ -183,9 +183,9 @@ namespace J3ML::Geometry
AABB Translated(const Vector3& offset) const;
void Scale(const Vector3& scale);
AABB Scaled(const Vector3& scale) const;
AABB TransformAABB(const Matrix3x3& transform);
AABB TransformAABB(const Matrix4x4& transform);
AABB TransformAABB(const Quaternion& transform);
void TransformAABB(const Matrix3x3& transform);
void TransformAABB(const Matrix4x4& transform);
void TransformAABB(const Quaternion& transform);
/// Applies a transformation to this AABB and returns the resulting OBB.
/** Transforming an AABB produces an oriented bounding box. This set of functions does not apply the transformation
to this object itself, but instead returns the OBB that results in the transformation.

View File

@@ -66,6 +66,7 @@ namespace J3ML::Geometry
@return The extreme point of this Capsule in the given direction. */
Vector3 ExtremePoint(const Vector3 &direction) const;
Vector3 ExtremePoint(const Vector3 &direction, float &projectionDistance) const;
/// Tests if this Capsule is degenerate.
/** @return True if this Capsule does not span a strictly positive volume. */
bool IsDegenerate() const;
@@ -196,5 +197,7 @@ namespace J3ML::Geometry
bool Intersects(const Polygon &polygon) const;
bool Intersects(const Frustum &frustum) const;
bool Intersects(const Polyhedron &polyhedron) const;
Capsule Translated(const Vector3&) const;
};
}

View File

@@ -1,5 +1,7 @@
#pragma once
#include <J3ML/Geometry.h>
#include <J3ML/LinearAlgebra/Matrix3x3.h>
#include <J3ML/LinearAlgebra/Matrix4x4.h>

View File

@@ -7,7 +7,6 @@
//
#include <cstdint>
#include <cmath>
#include <stdfloat>
#include <string>
#include <cassert>
@@ -17,13 +16,11 @@ namespace J3ML::SizedIntegralTypes
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using u128 = __uint128_t;
using s8 = int8_t;
using s16 = int16_t;
using s32 = int32_t;
using s64 = int64_t;
using s128 = __int128_t;
}
@@ -39,6 +36,11 @@ namespace J3ML::SizedFloatTypes
using namespace J3ML::SizedIntegralTypes;
using namespace J3ML::SizedFloatTypes;
//On windows there is no shorthand for pi???? - Redacted.
#ifdef _WIN32
#define M_PI 3.14159265358979323846
#endif
namespace J3ML::Math
{

View File

@@ -1,5 +1,3 @@
#pragma clang diagnostic push
#pragma ide diagnostic ignored "modernize-use-nodiscard"
#pragma once
#include <J3ML/J3ML.h>
#include <cstddef>
@@ -191,5 +189,4 @@ namespace J3ML::LinearAlgebra {
{
return rhs * lhs;
}
}
#pragma clang diagnostic pop
}