- /**
- * Helper to get minimum size
- * @return minimum size
- */
- inline const Vector3& GetMinimumSize()
- {
- if( mMinMaxSize.Count() > MIN_SIZE_INDEX )
- {
- return mMinMaxSize[ MIN_SIZE_INDEX ];
- }
- else
- {
- // its not been allocated so its ZERO
- return Vector3::ZERO;
- }
- }
- /**
- * Helper to Set minimum size
- * @param size to set
- */
- inline void SetMinimumSize( const Vector3& size )
- {
- if( mMinMaxSize.Count() > MIN_SIZE_INDEX )
- {
- mMinMaxSize[ MIN_SIZE_INDEX ] = size;
- }
- else
- {
- // its not been allocated so push the new value there
- mMinMaxSize.PushBack( size );
- }
- }
-
- /**
- * Helper to get maximum size
- * @return maximum size
- */
- inline const Vector3& GetMaximumSize()
- {
- if( mMinMaxSize.Count() > MAX_SIZE_INDEX )
- {
- return mMinMaxSize[ MAX_SIZE_INDEX ];
- }
- else
- {
- // its not been allocated so its MAX_SIZE
- return MAX_SIZE;
- }
- }
-
- /**
- * Helper to Set minimum size
- * @param size to set
- */
- inline void SetMaximumSize( const Vector3& size )
- {
- if( mMinMaxSize.Count() > MAX_SIZE_INDEX )
- {
- mMinMaxSize[ MAX_SIZE_INDEX ] = size;
- }
- else if( mMinMaxSize.Count() > MIN_SIZE_INDEX )
- {
- // max has not been allocated, but min has
- mMinMaxSize.PushBack( size );
- }
- else
- {
- // min and max both unallocated so allocate both
- mMinMaxSize.Resize( 2u ); // this will reserve and default construct two Vector3s
- mMinMaxSize[ MAX_SIZE_INDEX ] = size;
- }
- }
-