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

Function getVectorFromAngles

Engine/source/math/mathUtils.cpp:349–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347//-----------------------------------------------------------------------------
348
349void getVectorFromAngles( VectorF &vec, F32 yawAng, F32 pitchAng )
350{
351 VectorF pnt( 0.0f, 1.0f, 0.0f );
352
353 EulerF rot( -pitchAng, 0.0f, 0.0f );
354 MatrixF mat( rot );
355
356 rot.set( 0.0f, 0.0f, yawAng );
357 MatrixF mat2( rot );
358
359 mat.mulV( pnt );
360 mat2.mulV( pnt );
361
362 vec = pnt;
363}
364
365F32 getAngleBetweenVectors(VectorF vecA, VectorF vecB)
366{

Callers 5

ScatterSkyMethod · 0.85
_conformLightsMethod · 0.85
_getFogColorMethod · 0.85
_conformLightsMethod · 0.85
getDirectionMethod · 0.85

Calls 2

mulVMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected