Example #1
0
 void Transform::recomputeTransform()
 {
     if( getGameObject() )
     {
         if( getGameObject()->getParent() )
         {
             Transform* trans = getGameObject()->getParent()->getComponent< Transform >();
             if( trans )
                 trans->recomputeTransform();
         }
     }
     sf::Transform t;
     onTransform( t, t );
 }
Example #2
0
//==============================================================================
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);
	}
}
Example #3
0
//==============================================================================
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);
		}
	}
}