MCPcopy Create free account
hub / github.com/carbonengine/trinity / TriMatrixChangeBase

Function TriMatrixChangeBase

trinity/TriMath.cpp:647–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645}
646
647Matrix* TriMatrixChangeBase( Matrix* out, const Vector3* fwd, const Vector3* up )
648{
649 Vector3 cross = Cross( *up, *fwd );
650 out->_11 = cross.x;
651 out->_12 = cross.y;
652 out->_13 = cross.z;
653 out->_14 = 0.0f;
654
655 out->_21 = up->x;
656 out->_22 = up->y;
657 out->_23 = up->z;
658 out->_24 = 0.0f;
659
660 out->_31 = fwd->x;
661 out->_32 = fwd->y;
662 out->_33 = fwd->z;
663 out->_34 = 0.0f;
664
665
666 out->_41 = 0.0f;
667 out->_42 = 0.0f;
668 out->_43 = 0.0f;
669 out->_44 = 1.0f;
670 return out;
671}
672
673
674// --------------------------------------------------------------------------------

Callers 2

DistanceBaseFunction · 0.85

Calls 1

CrossFunction · 0.85

Tested by

no test coverage detected