MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / quadricFromPoint

Function quadricFromPoint

Source/ThirdParty/meshoptimizer/simplifier.cpp:821–830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819}
820
821static void quadricFromPoint(Quadric& Q, float x, float y, float z, float w)
822{
823 Q.a00 = Q.a11 = Q.a22 = w;
824 Q.a10 = Q.a20 = Q.a21 = 0;
825 Q.b0 = -x * w;
826 Q.b1 = -y * w;
827 Q.b2 = -z * w;
828 Q.c = (x * x + y * y + z * z) * w;
829 Q.w = w;
830}
831
832static void quadricFromTriangle(Quadric& Q, const Vector3& p0, const Vector3& p1, const Vector3& p2, float weight)
833{

Callers 2

fillVertexQuadricsFunction · 0.85
solvePositionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected