MCPcopy Create free account
hub / github.com/defold/defold / TestFrustumPoint

Function TestFrustumPoint

engine/dlib/src/dlib/intersection.cpp:65–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64
65bool TestFrustumPoint(const Frustum& frustum, const dmVMath::Point3& pos)
66{
67 dmVMath::Vector4 vpos(pos);
68
69 int num_planes = frustum.m_NumPlanes;
70 for (int i = 0; i < num_planes; ++i)
71 {
72 float d = DistanceToPlane(frustum.m_Planes[i], vpos);
73 if (d < 0.0f)
74 {
75 return false;
76 }
77 }
78 return true;
79}
80
81bool TestFrustumSphereSq(const Frustum& frustum, const dmVMath::Point3& pos, float radius_sq)
82{

Callers 1

TestDrawVisibilityFunction · 0.85

Calls 1

DistanceToPlaneFunction · 0.85

Tested by

no test coverage detected