-------------------------------------------------------------------------------- Description: Registers itself and its children with the scene registration container. This is so we don't have to traverse the tree every frame --------------------------------------------------------------------------------
| 3566 | // This is so we don't have to traverse the tree every frame |
| 3567 | // -------------------------------------------------------------------------------- |
| 3568 | void EveSpaceObject2::RegisterComponents() |
| 3569 | { |
| 3570 | auto registry = this->GetComponentRegistry(); |
| 3571 | if( registry ) |
| 3572 | { |
| 3573 | RegisterAudioGeometry(); |
| 3574 | } |
| 3575 | |
| 3576 | if( registry && m_display ) |
| 3577 | { |
| 3578 | if( !m_lights.empty() ) |
| 3579 | { |
| 3580 | registry->RegisterComponent<ITr2LightOwner>( this ); |
| 3581 | } |
| 3582 | |
| 3583 | if( EntityComponents::ShouldReflect( m_reflectionMode ) ) |
| 3584 | { |
| 3585 | registry->RegisterComponent<ITr2Renderable>( this ); |
| 3586 | } |
| 3587 | |
| 3588 | if( m_castShadow ) |
| 3589 | { |
| 3590 | registry->RegisterComponent<IEveShadowCaster>( this ); |
| 3591 | } |
| 3592 | |
| 3593 | for( auto it = begin( m_effectChildren ); it != end( m_effectChildren ); ++it ) |
| 3594 | { |
| 3595 | if( EveEntityPtr entity = BlueCastPtr( *it ) ) |
| 3596 | { |
| 3597 | entity->Register( registry ); |
| 3598 | } |
| 3599 | } |
| 3600 | |
| 3601 | for( auto it = begin( m_attachments ); it != end( m_attachments ); ++it ) |
| 3602 | { |
| 3603 | if( EveEntityPtr entity = BlueCastPtr( *it ) ) |
| 3604 | { |
| 3605 | entity->Register( registry ); |
| 3606 | } |
| 3607 | } |
| 3608 | } |
| 3609 | } |
| 3610 | |
| 3611 | // -------------------------------------------------------------------------------- |
| 3612 | // Description: |
nothing calls this directly
no test coverage detected