fixed trace line, improved collision

This commit is contained in:
2024-11-15 11:28:13 +03:00
parent 0ba787f6e0
commit a0b9d35edd
7 changed files with 65 additions and 5 deletions

View File

@@ -1 +1,4 @@
target_sources(omath PRIVATE LineTracer.cpp)
target_sources(omath PRIVATE
LineTracer.cpp
Cube.cpp
)

13
source/collision/Cube.cpp Normal file
View 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)
{
}
}

View File

@@ -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();