// Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors. // All rights reserved. // Code licensed under the BSD License. // http://www.anki3d.org/LICENSE #include #include namespace anki { void MoveComponent::update(SceneComponentUpdateInfo& info, Bool& updated) { const Bool movedThisFrame = info.m_node->updateTransform(); const Bool movedLastFrame = m_movedLastFrame; m_movedLastFrame = movedThisFrame; updated = movedThisFrame || movedLastFrame != movedThisFrame; if(updated) [[unlikely]] { Array trfs; trfs[0] = Mat3x4(info.m_node->getWorldTransform()); trfs[1] = Mat3x4(info.m_node->getPreviousWorldTransform()); m_gpuSceneTransforms.uploadToGpuScene(trfs); } } } // end namespace anki