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

Method clamp

Engine/source/T3D/gameBase/moveManager.cpp:214–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void Move::clamp()
215{
216 // If yaw/pitch/roll goes equal or greater than -PI/+PI it
217 // flips the direction of the rotation... we protect against
218 // that by clamping before the conversion.
219
220 yaw = clampAngleClamp( yaw );
221 pitch = clampAngleClamp( pitch );
222 roll = clampAngleClamp( roll );
223
224 // angles are all 16 bit.
225 pyaw = FANG2IANG(yaw);
226 ppitch = FANG2IANG(pitch);
227 proll = FANG2IANG(roll);
228
229 px = clampRangeClamp(x);
230 py = clampRangeClamp(y);
231 pz = clampRangeClamp(z);
232 unclamp();
233}
234
235void Move::pack(BitStream *stream, const Move * basemove)
236{

Callers 4

prepRenderMethod · 0.45
setAmbientLightColorMethod · 0.45
setLightColorMethod · 0.45
getNextMoveMethod · 0.45

Calls 2

clampAngleClampFunction · 0.85
clampRangeClampFunction · 0.85

Tested by

no test coverage detected