| 352 | } |
| 353 | |
| 354 | bool EveTransform::GetBoundingSphere( Vector4& sphere, BoundingSphereQuery query ) const |
| 355 | { |
| 356 | bool valid = false; |
| 357 | Vector3 minBounds, maxBounds; |
| 358 | if( m_overrideBoundsMax.x != m_overrideBoundsMin.x || m_overrideBoundsMax.y != m_overrideBoundsMin.y || m_overrideBoundsMax.z != m_overrideBoundsMin.z ) |
| 359 | { |
| 360 | minBounds = m_overrideBoundsMin; |
| 361 | maxBounds = m_overrideBoundsMax; |
| 362 | BoundingSphereFromBox( sphere, minBounds, maxBounds, &m_worldTransform ); |
| 363 | valid = true; |
| 364 | } |
| 365 | else if( m_mesh && m_mesh->GetBoundingBox( minBounds, maxBounds ) ) |
| 366 | { |
| 367 | BoundingSphereFromBox( sphere, minBounds, maxBounds, &m_worldTransform ); |
| 368 | valid = true; |
| 369 | } |
| 370 | |
| 371 | if( query == EVE_BOUNDS_WITH_CHILDREN ) |
| 372 | { |
| 373 | Vector4 boundingSphere( 0, 0, 0, 100.f ); |
| 374 | for( auto it = m_children.cbegin(); it != m_children.cend(); it++ ) |
| 375 | { |
| 376 | if( ( *it )->GetBoundingSphere( boundingSphere, query ) ) |
| 377 | { |
| 378 | BoundingSphereSetOrUpdate( boundingSphere, sphere, valid ); |
| 379 | valid = true; |
| 380 | } |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | return valid; |
| 385 | } |
| 386 | |
| 387 | void EveTransform::UpdateModelCenterWorldPosition( Vector3& position, Be::Time t ) |
| 388 | { |
nothing calls this directly
no test coverage detected