added comparison
This commit is contained in:
parent
2daa51680a
commit
05fbd3685b
5 changed files with 255 additions and 82 deletions
|
|
@ -4,5 +4,22 @@ import std;
|
|||
using namespace Crafter;
|
||||
|
||||
int main() {
|
||||
std::cout << IntersectionTestRaySphere<float>({0,0,0}, 10, {0,0,-100}, {0,1,0}) << std::endl;
|
||||
// // 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue