| 2447 | } |
| 2448 | |
| 2449 | bool EveSpaceObject2::GetLocatorPosition( Vector3* out, int index, bool inWorldSpace, BlueSharedString locatorSetName ) |
| 2450 | { |
| 2451 | if( index < 0 ) |
| 2452 | { |
| 2453 | *out = inWorldSpace ? m_worldTransform.GetTranslation() : Vector3( 0.f, 0.f, 0.f ); |
| 2454 | return false; |
| 2455 | } |
| 2456 | |
| 2457 | auto locators = GetLocatorsForSet( locatorSetName ); |
| 2458 | if( !locators || index >= int( locators->size() ) ) |
| 2459 | { |
| 2460 | *out = inWorldSpace ? m_worldTransform.GetTranslation() : Vector3( 0.f, 0.f, 0.f ); |
| 2461 | return false; |
| 2462 | } |
| 2463 | const Locator& locator = ( *locators )[index]; |
| 2464 | |
| 2465 | Vector3 position, direction; |
| 2466 | GetLocatorInObjectSpace( position, direction, locator ); |
| 2467 | |
| 2468 | if( inWorldSpace ) |
| 2469 | { |
| 2470 | *out = XMVector3TransformCoord( position, m_worldTransform ); |
| 2471 | } |
| 2472 | else |
| 2473 | { |
| 2474 | *out = position; |
| 2475 | } |
| 2476 | |
| 2477 | return true; |
| 2478 | } |
| 2479 | |
| 2480 | // -------------------------------------------------------------------------------- |
| 2481 | // Description: |
no test coverage detected