MCPcopy Create free account
hub / github.com/carbonengine/trinity / Cleanup

Method Cleanup

trinity/Tr2GrannyAnimation.cpp:1837–1893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1835}
1836
1837void Tr2GrannyAnimation::Cleanup()
1838{
1839 if( m_grannyRes || m_geometryRes )
1840 {
1841 for( auto& notify : m_notifyTargets )
1842 {
1843 notify->ReleaseCachedData( m_grannyRes ? static_cast<BlueAsyncRes*>( m_grannyRes ) : m_geometryRes );
1844 }
1845 }
1846
1847 m_baseLayer.Cleanup();
1848 for( auto it = m_animationLayers.begin(); it != m_animationLayers.end(); it++ )
1849 {
1850 it->second.Cleanup();
1851 }
1852
1853 m_pose.boneTransforms.clear();
1854 m_pose.skeleton = nullptr;
1855 m_skeletonBoneIndices.clear();
1856 m_worldTransforms.clear();
1857
1858#if WITH_GRANNY
1859 if( m_localPose )
1860 {
1861 GrannyFreeLocalPose( m_localPose );
1862 m_localPose = nullptr;
1863 }
1864
1865 if( m_compositePose )
1866 {
1867 GrannyFreeLocalPose( m_compositePose );
1868 m_compositePose = nullptr;
1869 }
1870
1871 if( m_worldPose )
1872 {
1873 GrannyFreeWorldPose( m_worldPose );
1874 m_worldPose = nullptr;
1875 }
1876
1877 if( m_meshBinding )
1878 {
1879 GrannyFreeMeshBinding( m_meshBinding );
1880 m_meshBinding = nullptr;
1881 }
1882
1883 m_skeleton = nullptr;
1884#endif
1885
1886 m_boneList.clear();
1887
1888 if( m_meshBoneMatrixList )
1889 {
1890 CCP_ALIGNED_FREE( m_meshBoneMatrixList );
1891 m_meshBoneMatrixList = nullptr;
1892 }
1893}
1894

Callers 2

RebuildCachedDataMethod · 0.45
ClearAnimationLayersMethod · 0.45

Calls 3

ReleaseCachedDataMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected