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

Method GetUpDirection

trinity/Eve/VirtualCamera/EveVirtualCamera.cpp:155–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155Vector3 EveVirtualCamera::GetUpDirection() const
156{
157 Quaternion rot;
158 Vector3 viewDir = GetForwardDirection();
159 Vector3 right = Normalize( Cross( viewDir, UP ) );
160 Vector3 up = Normalize( Cross( right, viewDir ) );
161
162 Quaternion roll = RotationQuaternion( viewDir, XMConvertToRadians( -m_roll ) );
163 TriVectorRotateQuaternion( &up, &up, &roll );
164 return Normalize( up );
165}
166
167Vector3 EveVirtualCamera::GetRightDirection() const
168{

Callers 1

UpdateMethod · 0.80

Calls 2

CrossFunction · 0.85

Tested by

no test coverage detected