| 1831 | } |
| 1832 | |
| 1833 | void EveSpaceObject2::GetRenderables( std::vector<ITr2Renderable*>& renderables, Tr2ImpostorManager* impostors ) |
| 1834 | { |
| 1835 | m_impostorMode = m_impostorMode && impostors != nullptr; |
| 1836 | if( m_display && m_isVisible ) |
| 1837 | { |
| 1838 | if( m_allowLodSelection && m_isMeshVisible ) |
| 1839 | { |
| 1840 | if( m_mesh ) |
| 1841 | { |
| 1842 | m_mesh->GetBoundingBox( m_localAabbMin, m_localAabbMax ); |
| 1843 | } |
| 1844 | } |
| 1845 | |
| 1846 | if( m_impostorMode && impostors != nullptr ) |
| 1847 | { |
| 1848 | ImpostorHash hash; |
| 1849 | |
| 1850 | auto& view = Tr2Renderer::GetViewTransform(); |
| 1851 | Vector3 fwd( 0.f, 0.f, 1.f ); |
| 1852 | hash.viewDir = Normalize( TransformNormal( TransformNormal( fwd, m_worldTransform ), view ) ); |
| 1853 | Vector3 up( 0.f, 1.f, 0.f ); |
| 1854 | hash.upDir = Normalize( TransformNormal( TransformNormal( up, m_worldTransform ), view ) ); |
| 1855 | |
| 1856 | m_impostorMode = impostors->Add( this, hash ); |
| 1857 | } |
| 1858 | |
| 1859 | if( !m_impostorMode ) |
| 1860 | { |
| 1861 | PushRenderables( renderables ); |
| 1862 | } |
| 1863 | } |
| 1864 | } |
| 1865 | |
| 1866 | // -------------------------------------------------------------------------------- |
| 1867 | // Description: |
no test coverage detected