| 1835 | } |
| 1836 | |
| 1837 | void 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 |
no test coverage detected