file
utils.hppClass cubos::core::geom::Utils.
Namespaces
- namespace cubos
- Cubos libraries namespace.
- namespace cubos::core
- Core namespace.
- namespace cubos::core::geom
- Geometry module.
Functions
-
auto pointInPlane(const glm::vec3& point,
const cubos::
core:: geom:: Plane& plane) -> CUBOS_ CORE_ API bool - Computes if a point is in the area limited by the plane.
-
auto getMaxVertexInAxis(int numVertices,
const glm::vec3 vertices[],
const glm::vec3& localAxis) -> CUBOS_
CORE_ API int - Computes the vertex furthest along the axis.
-
auto getIncidentReferencePolygon(const cubos::
core:: geom:: Box& shape, const glm::vec3& normal, std::vector<glm::vec3>& outPoints, glm::vec3& outNormal, std::vector<cubos:: core:: geom:: Plane>& outAdjacentPlanes, const glm::mat4& localToWorld, float scale) -> CUBOS_ CORE_ API void - Computes the candidate face of the polygon to be reference, as well as it's normal and adjacent planes.
-
auto getClosestPointEdge(const glm::vec3& point,
glm::vec3 start,
glm::vec3 end) -> CUBOS_
CORE_ API glm::vec3 - Computes the closest point on the line (edge) to point.
-
auto getClosestPointPolygon(const glm::vec3& point,
const std::vector<glm::vec3>& polygon) -> CUBOS_
CORE_ API glm::vec3 - Iterates through all edges in polygon and computes closest position on the edges of the polygon to point.
-
auto getCameraFrustumCorners(const glm::mat4& view,
const glm::mat4& proj,
float zNear,
float zFar,
std::vector<glm::vec4>& corners) -> CUBOS_
CORE_ API void - Gets a camera's frustum corners in world space.