Hymn to Beauty
C++ 3D Engine
RayIntersection.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <glm/glm.hpp>
5
8 public:
11
14
16
24 bool RayOBBIntersect(const glm::vec3& rayOrigin, const glm::vec3& rayDirection, const Video::AxisAlignedBoundingBox& meshData, const glm::mat4& modelMatrix, float& outputDistance) const;
25
27
36 bool TriangleIntersect(glm::vec3 rayOrigin, glm::vec3 rayDirection, glm::vec3 p0, glm::vec3 p1, glm::vec3 p2, float& distance);
37};
The class handling intersection checks.
Definition: RayIntersection.hpp:7
RayIntersection()
Constructor.
Definition: RayIntersection.cpp:3
~RayIntersection()
Destructor.
Definition: RayIntersection.cpp:5
bool RayOBBIntersect(const glm::vec3 &rayOrigin, const glm::vec3 &rayDirection, const Video::AxisAlignedBoundingBox &meshData, const glm::mat4 &modelMatrix, float &outputDistance) const
Checks whether a ray intersects with an OBB.
Definition: RayIntersection.cpp:7
bool TriangleIntersect(glm::vec3 rayOrigin, glm::vec3 rayDirection, glm::vec3 p0, glm::vec3 p1, glm::vec3 p2, float &distance)
Checks whether a ray intersects with a triangle.
Definition: RayIntersection.cpp:59
An axis-aligned bounding box.
Definition: AxisAlignedBoundingBox.hpp:12