-------------------------------------------------------------------------------- Description: Override from EveSpaceObject2 --------------------------------------------------------------------------------
| 1095 | // Override from EveSpaceObject2 |
| 1096 | // -------------------------------------------------------------------------------- |
| 1097 | bool EveSwarm::GetDamageLocatorPosition( Vector3* out, int index, bool inWorldSpace ) |
| 1098 | { |
| 1099 | if( !m_count ) |
| 1100 | { |
| 1101 | return EveShip2::GetDamageLocatorPosition( out, index, inWorldSpace ); |
| 1102 | } |
| 1103 | |
| 1104 | if( index >= 0 ) |
| 1105 | { |
| 1106 | auto damageLocators = GetLocatorsForSet( BlueSharedString( "damage" ) ); |
| 1107 | if( damageLocators && index < int( damageLocators->size() ) ) |
| 1108 | { |
| 1109 | const Locator& damageLocator = ( *damageLocators )[index]; |
| 1110 | |
| 1111 | Vector3 position, direction; |
| 1112 | GetLocatorInObjectSpace( position, direction, damageLocator ); |
| 1113 | |
| 1114 | if( inWorldSpace ) |
| 1115 | { |
| 1116 | *out = XMVector3TransformCoord( direction, m_worldTransform ); |
| 1117 | } |
| 1118 | else |
| 1119 | { |
| 1120 | *out = position; |
| 1121 | } |
| 1122 | return true; |
| 1123 | } |
| 1124 | } |
| 1125 | |
| 1126 | if( inWorldSpace ) |
| 1127 | { |
| 1128 | *out = m_renderables[m_targetIndex]->GetWorldTransform()->GetTranslation(); |
| 1129 | } |
| 1130 | else |
| 1131 | { |
| 1132 | Matrix localTransform = *m_renderables[m_targetIndex]->GetWorldTransform() * m_invWorldTransform; |
| 1133 | *out = localTransform.GetTranslation(); |
| 1134 | } |
| 1135 | return false; |
| 1136 | } |
| 1137 | |
| 1138 | // -------------------------------------------------------------------------------- |
| 1139 | // Description: |
no test coverage detected