| 81 | } |
| 82 | |
| 83 | void Tr2SkinnedObject::PostPhysicsUpdate( Be::Time time, Tr2ApexScene* apexScene ) |
| 84 | { |
| 85 | CCP_STATS_ZONE( __FUNCTION__ ); |
| 86 | |
| 87 | const Be::Time deltaTime = time - m_lastUpdateTime; |
| 88 | if( TimeAsFloat( deltaTime ) < m_updatePeriod ) |
| 89 | { |
| 90 | return; |
| 91 | } |
| 92 | |
| 93 | m_lastUpdateTime = time; |
| 94 | |
| 95 | for( TriCurveSetVector::const_iterator it = m_curveSets.begin(); it != m_curveSets.end(); ++it ) |
| 96 | { |
| 97 | ( *it )->Update( TimeAsDouble( time ) ); |
| 98 | } |
| 99 | |
| 100 | if( m_visualModel == NULL || m_visualModel->GetSkeleton() == NULL ) |
| 101 | { |
| 102 | return; |
| 103 | } |
| 104 | |
| 105 | if( m_animationUpdater != NULL ) |
| 106 | { |
| 107 | m_animationUpdater->PostPhysicsAnimation( time, m_transform ); |
| 108 | } |
| 109 | |
| 110 | UpdateBones( time, apexScene ); |
| 111 | |
| 112 | |
| 113 | // Update the translation if we have a worldtranslation updater |
| 114 | if( m_worldTransformUpdater != NULL ) |
| 115 | { |
| 116 | m_worldTransformUpdater->UpdateTransform( time, &m_transform ); |
| 117 | } |
| 118 | |
| 119 | // Check LOD |
| 120 | |
| 121 | |
| 122 | if( m_lod.UnloadLodIfNeeded( time, deltaTime ) ) |
| 123 | { |
| 124 | m_visualModel = NULL; |
| 125 | } |
| 126 | |
| 127 | return; |
| 128 | } |
| 129 | |
| 130 | void Tr2SkinnedObject::UpdateBones( Be::Time time, Tr2ApexScene* apexScene ) |
| 131 | { |
nothing calls this directly
no test coverage detected