btOptimizedBvh.h
Go to the documentation of this file.
00001 /*
00002 Bullet Continuous Collision Detection and Physics Library
00003 Copyright (c) 2003-2009 Erwin Coumans  http://bulletphysics.org
00004 
00005 This software is provided 'as-is', without any express or implied warranty.
00006 In no event will the authors be held liable for any damages arising from the use of this software.
00007 Permission is granted to anyone to use this software for any purpose, 
00008 including commercial applications, and to alter it and redistribute it freely, 
00009 subject to the following restrictions:
00010 
00011 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
00012 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
00013 3. This notice may not be removed or altered from any source distribution.
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 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:31