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

Function DistanceToPlane

engine/dlib/src/dlib/intersection.cpp:21–24  ·  view source on GitHub ↗

Keeping this private for now. Making sure that the W component is always 1

Source from the content-addressed store, hash-verified

19{
20// Keeping this private for now. Making sure that the W component is always 1
21static inline float DistanceToPlane(Plane plane, dmVMath::Vector4 pos)
22{
23 return dmVMath::Dot(plane, pos); // nx * px + ny * py + nz * pz + d*pw , pw - should be 1
24}
25
26float DistanceToPlane(Plane plane, dmVMath::Point3 pos)
27{

Callers 4

TestFrustumPointFunction · 0.85
TestFrustumSphereSqFunction · 0.85
TestFrustumOBBFunction · 0.85
TESTFunction · 0.85

Calls 2

DotFunction · 0.50
Vector4Class · 0.50

Tested by 4

TestFrustumPointFunction · 0.68
TestFrustumSphereSqFunction · 0.68
TestFrustumOBBFunction · 0.68
TESTFunction · 0.68