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

Method getTransform

Engine/source/Verve/VPath/VPathObject.cpp:375–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375MatrixF VPathObject::getTransform( void )
376{
377 MatrixF mat( true );
378 switch ( mOrientationMode.Type )
379 {
380 case k_OrientationInterpolate :
381 case k_OrientationToObject :
382 case k_OrientationToPoint :
383 case k_OrientationToPath :
384 {
385 // Y-Axis.
386 VectorF yVec = mOrientation;
387 yVec.normalize();
388
389 // X-Axis.
390 VectorF xVec = mCross( yVec, VPath::gBezierUp );
391 xVec.normalize();
392
393 // Z-Axis.
394 VectorF zVec = mCross( xVec, yVec );
395 zVec.normalize();
396
397 // Setup Object Transform.
398 mat.setColumn( 0, xVec );
399 mat.setColumn( 1, yVec );
400 mat.setColumn( 2, zVec );
401 mat.setColumn( 3, getWorldPosition() );
402
403 } break;
404
405 case k_OrientationFree :
406 {
407 // Fetch Current Transform.
408 mat = mObject->getTransform();
409 mat.setPosition( getWorldPosition() );
410
411 } break;
412 }
413
414 // Return.
415 return mat;
416}
417
418MatrixF VPathObject::getRenderTransform( const F32 &pDelta )
419{

Callers 11

on3DMouseDraggedMethod · 0.45
addNodeMethod · 0.45
pushPathEditMethod · 0.45
renderSceneMethod · 0.45
undoMethod · 0.45
updateWorldDataMethod · 0.45
getMountTransformMethod · 0.45
VPath.cppFile · 0.45
advanceObjectMethod · 0.45
setPathObjectInterpMethod · 0.45
playSoundMethod · 0.45

Calls 4

setColumnMethod · 0.80
mCrossFunction · 0.50
normalizeMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected