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

Function getVectorFromAngles

Engine/source/math/mathUtils.cpp:348–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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