MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / calcDev

Function calcDev

Engine/source/terrain/terrFile.cpp:64–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64static U16 calcDev( const PlaneF &pl, const Point3F &pt )
65{
66 F32 z = (pl.d + pl.x * pt.x + pl.y * pt.y) / -pl.z;
67 F32 diff = z - pt.z;
68 if(diff < 0.0f)
69 diff = -diff;
70
71 if(diff > 0xFFFF)
72 return 0xFFFF;
73 else
74 return U16(diff);
75}
76
77static U16 Umax( U16 u1, U16 u2 )
78{

Callers 1

_buildGridMapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected