Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00017
00018 #ifndef BT_OPTIMIZED_BVH_H
00019 #define BT_OPTIMIZED_BVH_H
00020
00021 #include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h"
00022
00023 class btStridingMeshInterface;
00024
00025
00027 ATTRIBUTE_ALIGNED16(class) btOptimizedBvh : public btQuantizedBvh
00028 {
00029
00030 public:
00031 BT_DECLARE_ALIGNED_ALLOCATOR();
00032
00033 protected:
00034
00035 public:
00036
00037 btOptimizedBvh();
00038
00039 virtual ~btOptimizedBvh();
00040
00041 void build(btStridingMeshInterface* triangles,bool useQuantizedAabbCompression, const btVector3& bvhAabbMin, const btVector3& bvhAabbMax);
00042
00043 void refit(btStridingMeshInterface* triangles,const btVector3& aabbMin,const btVector3& aabbMax);
00044
00045 void refitPartial(btStridingMeshInterface* triangles,const btVector3& aabbMin, const btVector3& aabbMax);
00046
00047 void updateBvhNodes(btStridingMeshInterface* meshInterface,int firstNode,int endNode,int index);
00048
00050 virtual bool serializeInPlace(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) const
00051 {
00052 return btQuantizedBvh::serialize(o_alignedDataBuffer,i_dataBufferSize,i_swapEndian);
00053
00054 }
00055
00057 static btOptimizedBvh *deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian);
00058
00059
00060 };
00061
00062
00063 #endif //BT_OPTIMIZED_BVH_H
00064
00065