-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
77 changed files
with
3,112 additions
and
429 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
libsrc/bullet3-3.24/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
//Bullet Continuous Collision Detection and Physics Library | ||
//Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org | ||
|
||
// | ||
// btAxisSweep3 | ||
// | ||
// Copyright (c) 2006 Simon Hobbs | ||
// | ||
// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. | ||
// | ||
// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: | ||
// | ||
// 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. | ||
// | ||
// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. | ||
// | ||
// 3. This notice may not be removed or altered from any source distribution. | ||
#include "btAxisSweep3.h" | ||
|
||
btAxisSweep3::btAxisSweep3(const btVector3& worldAabbMin, const btVector3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator) | ||
: btAxisSweep3Internal<unsigned short int>(worldAabbMin, worldAabbMax, 0xfffe, 0xffff, maxHandles, pairCache, disableRaycastAccelerator) | ||
{ | ||
// 1 handle is reserved as sentinel | ||
btAssert(maxHandles > 1 && maxHandles < 32767); | ||
} | ||
|
||
bt32BitAxisSweep3::bt32BitAxisSweep3(const btVector3& worldAabbMin, const btVector3& worldAabbMax, unsigned int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator) | ||
: btAxisSweep3Internal<unsigned int>(worldAabbMin, worldAabbMax, 0xfffffffe, 0x7fffffff, maxHandles, pairCache, disableRaycastAccelerator) | ||
{ | ||
// 1 handle is reserved as sentinel | ||
btAssert(maxHandles > 1 && maxHandles < 2147483647); | ||
} |
48 changes: 48 additions & 0 deletions
48
libsrc/bullet3-3.24/BulletCollision/BroadphaseCollision/btAxisSweep3.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
//Bullet Continuous Collision Detection and Physics Library | ||
//Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org | ||
|
||
// | ||
// btAxisSweep3.h | ||
// | ||
// Copyright (c) 2006 Simon Hobbs | ||
// | ||
// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. | ||
// | ||
// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: | ||
// | ||
// 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. | ||
// | ||
// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. | ||
// | ||
// 3. This notice may not be removed or altered from any source distribution. | ||
|
||
#ifndef BT_AXIS_SWEEP_3_H | ||
#define BT_AXIS_SWEEP_3_H | ||
|
||
#include "../../LinearMath/btVector3.h" | ||
#include "btOverlappingPairCache.h" | ||
#include "btBroadphaseInterface.h" | ||
#include "btBroadphaseProxy.h" | ||
#include "btOverlappingPairCallback.h" | ||
#include "btDbvtBroadphase.h" | ||
#include "btAxisSweep3Internal.h" | ||
|
||
/// The btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase. | ||
/// It uses arrays rather then lists for storage of the 3 axis. Also it operates using 16 bit integer coordinates instead of floats. | ||
/// For large worlds and many objects, use bt32BitAxisSweep3 or btDbvtBroadphase instead. bt32BitAxisSweep3 has higher precision and allows more then 16384 objects at the cost of more memory and bit of performance. | ||
class btAxisSweep3 : public btAxisSweep3Internal<unsigned short int> | ||
{ | ||
public: | ||
btAxisSweep3(const btVector3& worldAabbMin, const btVector3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0, bool disableRaycastAccelerator = false); | ||
}; | ||
|
||
/// The bt32BitAxisSweep3 allows higher precision quantization and more objects compared to the btAxisSweep3 sweep and prune. | ||
/// This comes at the cost of more memory per handle, and a bit slower performance. | ||
/// It uses arrays rather then lists for storage of the 3 axis. | ||
class bt32BitAxisSweep3 : public btAxisSweep3Internal<unsigned int> | ||
{ | ||
public: | ||
bt32BitAxisSweep3(const btVector3& worldAabbMin, const btVector3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0, bool disableRaycastAccelerator = false); | ||
}; | ||
|
||
#endif |
Oops, something went wrong.