-------------------------------------------------------------------------------- Description: Return the bounding sphere info of this hull --------------------------------------------------------------------------------
| 1118 | // Return the bounding sphere info of this hull |
| 1119 | // -------------------------------------------------------------------------------- |
| 1120 | CcpMath::Sphere EveSOFDNA::GetHullBoundingSphere() const |
| 1121 | { |
| 1122 | CcpMath::Sphere boundingSphere = CcpMath::Sphere(); |
| 1123 | |
| 1124 | // cycle over all hulls in the multi-hull list |
| 1125 | Vector3 hullOffset( 0.f, 0.f, 0.f ); |
| 1126 | for( size_t hullIdx = 0; hullIdx < GetMultiHullCount(); ++hullIdx ) |
| 1127 | { |
| 1128 | CcpMath::Sphere s( m_hullDatas[hullIdx]->boundingSphere ); |
| 1129 | s.center += hullOffset; |
| 1130 | boundingSphere.IncludeSphere( s ); |
| 1131 | |
| 1132 | // next hull needs offset update from hull's locator |
| 1133 | const Vector3* nextSubsystemOffset = GetHullNextSubsystemOffset( hullIdx ); |
| 1134 | if( nextSubsystemOffset ) |
| 1135 | { |
| 1136 | hullOffset += *nextSubsystemOffset; |
| 1137 | } |
| 1138 | } |
| 1139 | |
| 1140 | return boundingSphere; |
| 1141 | } |
| 1142 | |
| 1143 | // -------------------------------------------------------------------------------- |
| 1144 | // Description: |
no outgoing calls
no test coverage detected