14#include <lagrange/ui/api.h>
15#include <lagrange/ui/utils/math.h>
21enum FrustumPlanes :
unsigned int {
30enum FrustumVertices :
unsigned int {
31 FRUSTUM_NEAR_LEFT_BOTTOM = 0,
32 FRUSTUM_FAR_LEFT_BOTTOM,
33 FRUSTUM_NEAR_RIGHT_BOTTOM,
34 FRUSTUM_FAR_RIGHT_BOTTOM,
35 FRUSTUM_NEAR_LEFT_TOP,
37 FRUSTUM_NEAR_RIGHT_TOP,
45 using Plane = Eigen::Hyperplane<float, 3>;
47 std::array<Eigen::Vector3f, 8> vertices;
48 std::array<Plane, 6> planes;
50 Frustum transformed(
const Eigen::Affine3f& T)
const;
52 bool intersects(
const Eigen::AlignedBox3f& bb,
bool& fully_inside)
const;
53 bool intersects(
const Eigen::Vector3f& a,
const Eigen::Vector3f& b,
const Eigen::Vector3f& c)
56 bool is_backfacing(
const Eigen::Vector3f& a,
const Eigen::Vector3f& b,
const Eigen::Vector3f& c)
59 bool intersects(
const Eigen::Vector3f& a,
const Eigen::Vector3f& b)
const;
61 Eigen::Vector3f get_edge(FrustumVertices a, FrustumVertices b)
const;
62 Eigen::Vector3f get_normalized_edge(FrustumVertices a, FrustumVertices b)
const;
65 bool contains(
const Eigen::Vector3f& a)
const;
Frustum defined using 6 planes.
Definition: Frustum.h:43
Lagrange UI Viewer and mini 3D engine.
Definition: AcceleratedPicking.h:22
Main namespace for Lagrange.
Definition: AABBIGL.h:30