Crafter.Math/interfaces/main.cpp

25 lines
848 B
C++
Raw Normal View History

2026-02-11 02:52:03 +01:00
import Crafter.Math;
import std;
using namespace Crafter;
int main() {
2026-02-19 02:36:36 +01:00
// // Test Ray-OrientedBox intersection
// Vector<float, 3, 0> boxPos(0.0f, 0.0f, 0.0f);
// Vector<float, 3, 0> boxSize(2.0f, 2.0f, 2.0f);
// Vector<float, 3, 0> boxRot(0.0f, 0.0f, 0.0f); // No rotation
// Vector<float, 3, 0> rayOrigin(0.0f, 0.0f, -5.0f);
// Vector<float, 3, 0> rayDir(0.0f, 0.0f, 1.0f);
// float hitDistance = IntersectionTestRayOrientedBox(boxPos, boxSize, boxRot, rayOrigin, rayDir);
// if (hitDistance < std::numeric_limits<float>::max()) {
// // Hit occurred
// std::cout << "Ray-OrientedBox intersection at distance: " << hitDistance << std::endl;
// } else {
// // No hit
// std::cout << "No intersection with Ray-OrientedBox" << std::endl;
// }
// return 0;
2026-02-11 02:52:03 +01:00
}