Replaced most STL std::vector with btAlignedObjectArray.
Same interface but less features (push_back, pop_back, clear, size, [] etc). To prepare for SIMD/SSE code: Added #define ATTRIBUTE_ALIGNED16(a) __declspec(align(16)) a
This commit is contained in:
@@ -29,13 +29,33 @@ float gCollisionMargin = 0.05f;
|
||||
#include "BasicDemo.h"
|
||||
#include "GL_ShapeDrawer.h"
|
||||
#include "GlutStuff.h"
|
||||
|
||||
#include <LinearMath/btAlignedObjectArray.h>
|
||||
|
||||
////////////////////////////////////
|
||||
|
||||
GLDebugDrawer debugDrawer;
|
||||
|
||||
class myTest
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
|
||||
{
|
||||
///btAlignedObjectArray works the same as std::vector but
|
||||
///allows 16-byte aligned objects like SIMD vectors etc.
|
||||
btAlignedObjectArray<btVector3> m_points;
|
||||
m_points.push_back(btVector3(1,2,3));
|
||||
const btVector3& ref = m_points[0];
|
||||
m_points[0] = btVector3(2,3,4);
|
||||
m_points.pop_back();
|
||||
}
|
||||
|
||||
BasicDemo ccdDemo;
|
||||
ccdDemo.initPhysics();
|
||||
ccdDemo.setCameraDistance(50.f);
|
||||
|
||||
Reference in New Issue
Block a user