MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetLocalBoundingBox

Method GetLocalBoundingBox

trinity/Eve/SpaceObject/EveSpaceObject2.cpp:2750–2774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2748}
2749
2750bool EveSpaceObject2::GetLocalBoundingBox( Vector3& min, Vector3& max )
2751{
2752 if( m_dynamicBoundingSphereEnabled && m_animationUpdater && m_animationUpdater->IsInitialized() )
2753 {
2754 Vector4 bs;
2755 m_animationUpdater->GetDynamicBounds( bs, min, max );
2756 m_localAabbMin = min;
2757 m_localAabbMax = max;
2758 return true;
2759 }
2760 else if( m_mesh )
2761 {
2762 if( m_mesh->GetBoundingBox( min, max ) )
2763 {
2764 m_localAabbMin = min;
2765 m_localAabbMax = max;
2766 return true;
2767 }
2768 }
2769 // this may get called before SelectMeshLevelOfDetail was called, in which case we have a null m_mesh.
2770 // To fix that, store the AABB and return it here; at worst, it lags one frame.
2771 min = m_localAabbMin;
2772 max = m_localAabbMax;
2773 return true;
2774}
2775
2776void EveSpaceObject2::GetLocalToWorldTransform( Matrix& transform ) const
2777{

Callers

nothing calls this directly

Calls 3

IsInitializedMethod · 0.45
GetDynamicBoundsMethod · 0.45
GetBoundingBoxMethod · 0.45

Tested by

no test coverage detected