void Transform::recomputeTransform() { if( getGameObject() ) { if( getGameObject()->getParent() ) { Transform* trans = getGameObject()->getParent()->getComponent< Transform >(); if( trans ) trans->recomputeTransform(); } } sf::Transform t; onTransform( t, t ); }
//============================================================================== void Frustum::updateInternal() { ANKI_ASSERT(m_frustumDirty); m_frustumDirty = false; recalculate(); // Transform derived onTransform(); // Transform the planes for(U i = 0; i < m_planesL.getSize(); ++i) { m_planesW[i] = m_planesL[i].getTransformed(m_trf); } }
//============================================================================== void Frustum::resetTransform(const Transform& trf) { m_trf = trf; if(m_frustumDirty) { // Update everything updateInternal(); } else { // Inform the child about the change onTransform(); // Transform the planes for(U i = 0; i < m_planesL.getSize(); ++i) { m_planesW[i] = m_planesL[i].getTransformed(m_trf); } } }