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

Method Update

trinity/Tr2RotationTool.cpp:368–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368void Tr2RotationTool::Update()
369{
370 if( m_moved )
371 {
372 Matrix temp;
373 Matrix rotation = RotationMatrix( m_movement, m_angle );
374 temp = rotation * m_localTransform;
375
376 // Check the move callback for if we should be moving or not
377 if( OnMoveCallback( m_localTransform, temp ) )
378 {
379 m_localTransform = temp;
380 m_rotation = RotationQuaternion( temp );
381 m_movement.x = 0.0f;
382 m_movement.y = 0.0f;
383 m_movement.z = 0.0f;
384 }
385 m_moved = false;
386 }
387 Matrix translation = TranslationMatrix( m_pivot );
388 m_worldTransform = m_localTransform * translation;
389 for( PrimitiveIterator it = m_primitives.begin(); it != m_primitives.end(); ++it )
390 {
391 ( *it )->m_localTransform = m_localTransform;
392 ( *it )->UpdateTransform();
393 }
394}
395
396Vector3 Tr2RotationTool::Hemisphere( int mouseX, int mouseY, Tr2Viewport& viewport, Matrix& viewMatrix, Matrix& projectionMatrix ) const
397{

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
UpdateTransformMethod · 0.45

Tested by

no test coverage detected