mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
fixed trace line, improved collision
This commit is contained in:
@@ -1 +1,4 @@
|
||||
target_sources(omath PRIVATE LineTracer.cpp)
|
||||
target_sources(omath PRIVATE
|
||||
LineTracer.cpp
|
||||
Cube.cpp
|
||||
)
|
||||
|
||||
13
source/collision/Cube.cpp
Normal file
13
source/collision/Cube.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// Created by vlad on 11/15/2024.
|
||||
//
|
||||
#include "omath/collision/Cube.h"
|
||||
|
||||
|
||||
namespace omath::collision
|
||||
{
|
||||
bool Cube::IsCollideWith(const std::shared_ptr<ICollidable>& other)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace omath::collision
|
||||
return DirectionVector().Normalized();
|
||||
}
|
||||
|
||||
std::optional<Vector3> LineTracer::GetRayHitPoint(const Ray &ray, const Triangle3d &triangle)
|
||||
Vector3 LineTracer::GetRayHitPoint(const Ray &ray, const Triangle3d &triangle)
|
||||
{
|
||||
constexpr float kEpsilon = std::numeric_limits<float>::epsilon();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user