mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-24 18:48:01 +02:00
Additional 3d support
This commit is contained in:
parent
369bb0640c
commit
39c140f44a
27 changed files with 4063 additions and 126 deletions
21
BeefySysLib/util/MathUtils.h
Normal file
21
BeefySysLib/util/MathUtils.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include "Vector.h"
|
||||
#include "Matrix4.h"
|
||||
|
||||
NS_BF_BEGIN
|
||||
|
||||
class AABB
|
||||
{
|
||||
public:
|
||||
Vector3 mMin;
|
||||
Vector3 mMax;
|
||||
};
|
||||
|
||||
class Sphere;
|
||||
|
||||
bool RayIntersectsTriangle(const Vector3& rayOrigin, const Vector3& rayVector, const Vector3& vtx0, const Vector3& vtx1, const Vector3& vtx2, Vector3* outIntersectionPoint, float* distance);
|
||||
bool RayIntersectsCircle(const Vector3& rayOrigin, const Vector3& rayVector, const Sphere& sphere, Vector3* outIntersectionPoint, Vector3* outNormal, float* outDistance);
|
||||
bool RayIntersectsAABB(const Vector3& rayOrigin, const Vector3& rayVector, const AABB& aabb, Vector3* outIntersectionPoint, Vector3* outNormal, float* outDistance);
|
||||
|
||||
NS_BF_END
|
Loading…
Add table
Add a link
Reference in a new issue