| 2573 | } |
| 2574 | |
| 2575 | bool EveSpaceObject2::GetLocatorDirection( Vector3* out, int index, bool inWorldSpace, BlueSharedString locatorSetName ) |
| 2576 | { |
| 2577 | if( index < 0 ) |
| 2578 | { |
| 2579 | *out = Vector3( 0.f, 1.f, 0.f ); |
| 2580 | return false; |
| 2581 | } |
| 2582 | |
| 2583 | auto locators = GetLocatorsForSet( locatorSetName ); |
| 2584 | if( !locators || index >= int( locators->size() ) ) |
| 2585 | { |
| 2586 | *out = Vector3( 0.f, 1.f, 0.f ); |
| 2587 | return false; |
| 2588 | } |
| 2589 | |
| 2590 | const Locator& locator = ( *locators )[index]; |
| 2591 | |
| 2592 | Vector3 position, direction; |
| 2593 | GetLocatorInObjectSpace( position, direction, locator ); |
| 2594 | |
| 2595 | if( inWorldSpace ) |
| 2596 | { |
| 2597 | *out = XMVector3TransformNormal( direction, m_worldTransform ); |
| 2598 | } |
| 2599 | else |
| 2600 | { |
| 2601 | *out = direction; |
| 2602 | } |
| 2603 | |
| 2604 | return true; |
| 2605 | } |
| 2606 | |
| 2607 | void EveSpaceObject2::UpdateModelCenterWorldPosition( Vector3& position, Be::Time t ) |
| 2608 | { |
no test coverage detected