14class OrientedBoundingBox;
31 static std::optional<glm::dvec3>
47 static std::optional<glm::dvec2>
63 const glm::dvec2& point,
64 const glm::dvec2& triangleVertA,
65 const glm::dvec2& triangleVertB,
66 const glm::dvec2& triangleVertC)
noexcept;
81 const glm::dvec3& point,
82 const glm::dvec3& triangleVertA,
83 const glm::dvec3& triangleVertB,
84 const glm::dvec3& triangleVertC)
noexcept;
102 const glm::dvec3& point,
103 const glm::dvec3& triangleVertA,
104 const glm::dvec3& triangleVertB,
105 const glm::dvec3& triangleVertC,
106 glm::dvec3& barycentricCoordinates)
noexcept;
122 const glm::dvec3& p0,
123 const glm::dvec3& p1,
124 const glm::dvec3& p2,
125 bool cullBackFaces =
false);
145 const glm::dvec3& p0,
146 const glm::dvec3& p1,
147 const glm::dvec3& p2,
148 bool cullBackFaces =
false);
158 static std::optional<glm::dvec3>
173 static std::optional<double>
184 static std::optional<glm::dvec3>
199 static std::optional<double>
210 static std::optional<glm::dvec3>
225 static std::optional<double>
A bounding sphere with a center and a radius.
Functions for computing the intersection between geometries such as rays, planes, triangles,...
static bool pointInTriangle(const glm::dvec3 &point, const glm::dvec3 &triangleVertA, const glm::dvec3 &triangleVertB, const glm::dvec3 &triangleVertC) noexcept
Determines whether a given point is completely inside a triangle defined by three 3D points.
static std::optional< double > raySphereParametric(const Ray &ray, const BoundingSphere &sphere)
Computes the intersection of an infinite ray and a bounding sphere and returns the parametric hit pos...
static std::optional< double > rayOBBParametric(const Ray &ray, const OrientedBoundingBox &obb)
Computes the intersection of an infinite ray and an oriented bounding box and returns the parametric ...
static std::optional< glm::dvec3 > rayOBB(const Ray &ray, const OrientedBoundingBox &obb)
Computes the intersection of a ray and an oriented bounding box.
static std::optional< glm::dvec3 > rayTriangle(const Ray &ray, const glm::dvec3 &p0, const glm::dvec3 &p1, const glm::dvec3 &p2, bool cullBackFaces=false)
Tests if a ray hits a triangle and returns the hit point.
static std::optional< glm::dvec2 > rayEllipsoid(const Ray &ray, const glm::dvec3 &radii) noexcept
Computes the intersection of a ray and an ellipsoid with the given radii, centered at the origin.
static std::optional< glm::dvec3 > rayAABB(const Ray &ray, const AxisAlignedBox &aabb)
Computes the intersection of a ray and an axis aligned bounding box.
static bool pointInTriangle(const glm::dvec3 &point, const glm::dvec3 &triangleVertA, const glm::dvec3 &triangleVertB, const glm::dvec3 &triangleVertC, glm::dvec3 &barycentricCoordinates) noexcept
Determines whether the point is completely inside a triangle defined by three 3D points....
static std::optional< double > rayTriangleParametric(const Ray &ray, const glm::dvec3 &p0, const glm::dvec3 &p1, const glm::dvec3 &p2, bool cullBackFaces=false)
Tests if an infinite ray hits a triangle and returns the parametric hit position.
static bool pointInTriangle(const glm::dvec2 &point, const glm::dvec2 &triangleVertA, const glm::dvec2 &triangleVertB, const glm::dvec2 &triangleVertC) noexcept
Determines whether a given point is completely inside a triangle defined by three 2D points.
static std::optional< double > rayAABBParametric(const Ray &ray, const AxisAlignedBox &aabb)
Computes the intersection of an infinite ray and an axis aligned bounding box and returns the paramet...
static std::optional< glm::dvec3 > raySphere(const Ray &ray, const BoundingSphere &sphere)
Computes the intersection of a ray and a bounding sphere.
static std::optional< glm::dvec3 > rayPlane(const Ray &ray, const Plane &plane) noexcept
Computes the intersection of a ray and a plane.
A bounding volume defined as a closed and convex cuboid with any orientation.
A plane in Hessian Normal Format.
A ray that extends infinitely from the provided origin in the provided direction.
Basic geometry classes for Cesium.
An Axis-Aligned Bounding Box (AABB), where the axes of the box are aligned with the axes of the coord...