Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2011, 7:43:24 AM (14 years ago)
Author:
rgrieder
Message:

Updated Bullet Physics Engine from v2.74 to v2.77

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/external/bullet/LinearMath/btAlignedObjectArray.h

    r5781 r7983  
    139139                }
    140140               
     141                SIMD_FORCE_INLINE const T& at(int n) const
     142                {
     143                        return m_data[n];
     144                }
     145
     146                SIMD_FORCE_INLINE T& at(int n)
     147                {
     148                        return m_data[n];
     149                }
     150
    141151                SIMD_FORCE_INLINE const T& operator[](int n) const
    142152                {
     
    172182                        int curSize = size();
    173183
    174                         if (newsize < size())
    175                         {
    176                                 for(int i = curSize; i < newsize; i++)
     184                        if (newsize < curSize)
     185                        {
     186                                for(int i = newsize; i < curSize; i++)
    177187                                {
    178188                                        m_data[i].~T();
     
    196206                }
    197207       
     208                SIMD_FORCE_INLINE       T&  expandNonInitializing( )
     209                {       
     210                        int sz = size();
     211                        if( sz == capacity() )
     212                        {
     213                                reserve( allocSize(size()) );
     214                        }
     215                        m_size++;
     216
     217                        return m_data[sz];             
     218                }
     219
    198220
    199221                SIMD_FORCE_INLINE       T&  expand( const T& fillValue=T())
     
    438460        }
    439461
     462        void copyFromArray(const btAlignedObjectArray& otherArray)
     463        {
     464                int otherSize = otherArray.size();
     465                resize (otherSize);
     466                otherArray.copy(0, otherSize, m_data);
     467        }
     468
    440469};
    441470
Note: See TracChangeset for help on using the changeset viewer.