src/softbody2/Objects/DRGObject.cpp
HRESULT	CDRGObject::Update(float	fTimeStep, bool bUpdateChildren)
{
	//update the object's current rotation angle scale and position
	m_fRotationAngle += m_fRotationalVelocity * fTimeStep;
	m_vScale += m_vScalingVelocity * fTimeStep;
	m_vPosition += m_vVelocity * fTimeStep;	

	//update the local to world matrix (start with the base matrix)
	m_MxLocalToParent = m_MxLocalBase;
		
	m_MxLocalToParent.Translate(m_vPosition.x, m_vPosition.y, m_vPosition.z );
	m_MxLocalToParent.Scale(m_vScale.x, m_vScale.y, m_vScale.z);
	m_MxLocalToParent.Rotate(m_vRotationAxis, m_fRotationAngle);

	if (bUpdateChildren)
	{
		CDRGObject	*pTempObject = m_pFirstChild;
		while (pTempObject != NULL)
		{
			pTempObject->Update(fTimeStep, true);
			pTempObject = pTempObject->m_pNext;
		}
	}
		
	return S_OK;
}
// -----------------------------------------------------------------------
// HRESULT DRGObject::Update( float fTimeStep, bool bUpdateChildren = true)
//	
//  This updates all the vectors, and the local to world matrix according 
//	to a timestep, where 1.0 is the number of seconds elapsed since the 
//	last frame.  For example, if a velocity of '6' means that the object
//	should move 6 world units in one second,  when the app is running at 
//	50fps, the timestep value will be 1/50 or 0.02. This is then taken into
//	account when updating the matrices.	
// -----------------------------------------------------------------------
HRESULT DRGObject::Update( float fTimeStep, bool bUpdateChildren = true)
This updates all the vectors, and the local to world matrix according
to a timestep, where 1.0 is the number of seconds elapsed since the
last frame.  For example, if a velocity of '6' means that the object
should move 6 world units in one second,  when the app is running at
50fps, the timestep value will be 1/50 or 0.02. This is then taken into
account when updating the matrices.
HRESULT DRGObject :: Update ( float fTimeStep bool bUpdateChildren = true ) This updates all the vectors and the local to world matrix according to a timestep where 1 . 0 is the number of seconds elapsed since the last frame . For example if a velocity of ' 6 ' means that the object should move 6 world units in one second when the app is running at 50fps the timestep value will be 1 / 50 or 0 . 02 . This is then taken into account when updating the matrices .
HRESULT	CDRGObject::Update(float	fTimeStep, bool bUpdateChildren)
{
	m_fRotationAngle += m_fRotationalVelocity * fTimeStep;
	m_vScale += m_vScalingVelocity * fTimeStep;
	m_vPosition += m_vVelocity * fTimeStep;	
	m_MxLocalToParent = m_MxLocalBase;
	m_MxLocalToParent.Translate(m_vPosition.x, m_vPosition.y, m_vPosition.z );
	m_MxLocalToParent.Scale(m_vScale.x, m_vScale.y, m_vScale.z);
	m_MxLocalToParent.Rotate(m_vRotationAxis, m_fRotationAngle);
	if (bUpdateChildren)
	{
		CDRGObject	*pTempObject = m_pFirstChild;
		while (pTempObject != NULL)
		{
			pTempObject->Update(fTimeStep, true);
			pTempObject = pTempObject->m_pNext;
		}
	}
	return S_OK;
}
HRESULT CDRGObject :: Update ( float fTimeStep , bool bUpdateChildren ) { m_fRotationAngle += m_fRotationalVelocity * fTimeStep ; m_vScale += m_vScalingVelocity * fTimeStep ; m_vPosition += m_vVelocity * fTimeStep ; m_MxLocalToParent = m_MxLocalBase ; m_MxLocalToParent . Translate ( m_vPosition . x , m_vPosition . y , m_vPosition . z ) ; m_MxLocalToParent . Scale ( m_vScale . x , m_vScale . y , m_vScale . z ) ; m_MxLocalToParent . Rotate ( m_vRotationAxis , m_fRotationAngle ) ; if ( bUpdateChildren ) { CDRGObject * pTempObject = m_pFirstChild ; while ( pTempObject != NULL ) { pTempObject -> Update ( fTimeStep , true ) ; pTempObject = pTempObject -> m_pNext ; } } return S_OK ; }
HRESULT DRGObject::Update( float fTimeStep, bool bUpdateChildren = true)
This updates all the vectors, and the local to world matrix according
to a timestep, where 1.0 is the number of seconds elapsed since the
last frame.
HRESULT DRGObject :: Update ( float fTimeStep bool bUpdateChildren = true ) This updates all the vectors and the local to world matrix according to a timestep where 1 . 0 is the number of seconds elapsed since the last frame .
//update the object's current rotation angle scale and position //update the local to world matrix (start with the base matrix)