Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/bullet2/src/BulletCollision/Gimpact')
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h8
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h4
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp6
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.h24
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.cpp15
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.h47
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp13
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h6
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp17
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h21
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h17
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp6
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h5
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h4
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h4
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp8
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h10
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_array.h8
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h4
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h6
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h4
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp4
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h7
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h4
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h16
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h7
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h26
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h11
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_math.h32
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h47
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_radixsort.h8
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.cpp6
-rw-r--r--extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.h6
33 files changed, 129 insertions, 282 deletions
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h b/extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h
index cf43f487e24..827a3c89587 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h
@@ -26,9 +26,6 @@ subject to the following restrictions:
#include "LinearMath/btTransform.h"
-/*! \defgroup BOUND_AABB_OPERATIONS
-*/
-//! @{
///Swap numbers
#define BT_SWAP_NUMBERS(a,b){ \
@@ -41,7 +38,7 @@ subject to the following restrictions:
#define BT_MAX(a,b) (a<b?b:a)
#define BT_MIN(a,b) (a>b?b:a)
-#define BT_GREATER(x, y) fabsf(x) > (y)
+#define BT_GREATER(x, y) btFabs(x) > (y)
#define BT_MAX3(a,b,c) BT_MAX(a,BT_MAX(b,c))
#define BT_MIN3(a,b,c) BT_MIN(a,BT_MIN(b,c))
@@ -181,7 +178,7 @@ public:
{
for(j=0;j<3;j++ )
{
- m_AR[i][j] = 1e-6f + fabsf(m_R1to0[i][j]);
+ m_AR[i][j] = 1e-6f + btFabs(m_R1to0[i][j]);
}
}
@@ -646,6 +643,5 @@ SIMD_FORCE_INLINE bool btCompareTransformsEqual(const btTransform & t1,const btT
}
-//! @}
#endif // GIM_BOX_COLLISION_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h b/extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h
index 28c03b7e039..5de391a7561 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h
@@ -27,9 +27,6 @@ subject to the following restrictions:
#include "LinearMath/btTransform.h"
#include "LinearMath/btGeometryUtil.h"
-/*! \addtogroup GEOMETRIC_OPERATIONS
-*/
-//! @{
SIMD_FORCE_INLINE btScalar bt_distance_point_plane(const btVector4 & plane,const btVector3 &point)
{
@@ -181,6 +178,5 @@ SIMD_FORCE_INLINE int bt_plane_clip_triangle(
-//! @}
#endif // GIM_TRI_COLLISION_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp
index faba2d8a542..c3b697bdd1e 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp
@@ -103,12 +103,12 @@ void btContactArray::merge_contacts(
push_back(contacts[keycontacts[0].m_value]);
- BT_CONTACT * pcontact = &(*this)[0];
+ GIM_CONTACT * pcontact = &(*this)[0];
for( i=1;i<keycontacts.size();i++)
{
key = keycontacts[i].m_key;
- const BT_CONTACT * scontact = &contacts[keycontacts[i].m_value];
+ const GIM_CONTACT * scontact = &contacts[keycontacts[i].m_value];
if(last_key == key)//same points
{
@@ -158,7 +158,7 @@ void btContactArray::merge_contacts_unique(const btContactArray & contacts)
return;
}
- BT_CONTACT average_contact = contacts[0];
+ GIM_CONTACT average_contact = contacts[0];
for (int i=1;i<contacts.size() ;i++ )
{
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.h b/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.h
index 0cfd013b962..4b0b70293b4 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.h
@@ -29,11 +29,6 @@ subject to the following restrictions:
#include "btTriangleShapeEx.h"
-/*! \defgroup CONTACTS
-\brief
-Functions for managing and sorting contacts resulting from a collision query.
-*/
-//! @{
/**
Configuration var for applying interpolation of contact normals
@@ -42,8 +37,9 @@ Configuration var for applying interpolation of contact normals
#define CONTACT_DIFF_EPSILON 0.00001f
-/// Structure for collision results
-class BT_CONTACT
+///The GIM_CONTACT is an internal GIMPACT structure, similar to btManifoldPoint.
+///@todo: remove and replace GIM_CONTACT by btManifoldPoint.
+class GIM_CONTACT
{
public:
btVector3 m_point;
@@ -53,11 +49,11 @@ public:
int m_feature1;//Face number
int m_feature2;//Face number
public:
- BT_CONTACT()
+ GIM_CONTACT()
{
}
- BT_CONTACT(const BT_CONTACT & contact):
+ GIM_CONTACT(const GIM_CONTACT & contact):
m_point(contact.m_point),
m_normal(contact.m_normal),
m_depth(contact.m_depth),
@@ -66,7 +62,7 @@ public:
{
}
- BT_CONTACT(const btVector3 &point,const btVector3 & normal,
+ GIM_CONTACT(const btVector3 &point,const btVector3 & normal,
btScalar depth, int feature1, int feature2):
m_point(point),
m_normal(normal),
@@ -112,7 +108,7 @@ public:
};
-class btContactArray:public btAlignedObjectArray<BT_CONTACT>
+class btContactArray:public btAlignedObjectArray<GIM_CONTACT>
{
public:
btContactArray()
@@ -124,11 +120,11 @@ public:
const btVector3 &point,const btVector3 & normal,
btScalar depth, int feature1, int feature2)
{
- push_back( BT_CONTACT(point,normal,depth,feature1,feature2) );
+ push_back( GIM_CONTACT(point,normal,depth,feature1,feature2) );
}
SIMD_FORCE_INLINE void push_triangle_contacts(
- const BT_TRIANGLE_CONTACT & tricontact,
+ const GIM_TRIANGLE_CONTACT & tricontact,
int feature1,int feature2)
{
for(int i = 0;i<tricontact.m_point_count ;i++ )
@@ -145,5 +141,5 @@ public:
void merge_contacts_unique(const btContactArray & contacts);
};
-//! @}
+
#endif // GIM_CONTACT_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.cpp
index b07926c30dc..38fed6b4fd2 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.cpp
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.cpp
@@ -65,7 +65,7 @@ float btGImpactBvh::getAverageTreeCollisionTime()
/////////////////////// btBvhTree /////////////////////////////////
int btBvhTree::_calc_splitting_axis(
- BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
+ GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
{
int i;
@@ -97,7 +97,7 @@ int btBvhTree::_calc_splitting_axis(
int btBvhTree::_sort_and_calc_splitting_index(
- BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex,
+ GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex,
int endIndex, int splitAxis)
{
int i;
@@ -150,15 +150,14 @@ int btBvhTree::_sort_and_calc_splitting_index(
splitIndex = startIndex+ (numIndices>>1);
}
- bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex));
- btAssert(!unbal);
+ btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex))));
return splitIndex;
}
-void btBvhTree::_build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
+void btBvhTree::_build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
{
int curIndex = m_num_nodes;
m_num_nodes++;
@@ -211,7 +210,7 @@ void btBvhTree::_build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIn
//! stackless build tree
void btBvhTree::build_tree(
- BT_BVH_DATA_ARRAY & primitive_boxes)
+ GIM_BVH_DATA_ARRAY & primitive_boxes)
{
// initialize node count to 0
m_num_nodes = 0;
@@ -236,7 +235,7 @@ void btGImpactBvh::refit()
}
else
{
- //const BT_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount);
+ //const GIM_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount);
//get left bound
btAABB bound;
bound.invalidate();
@@ -266,7 +265,7 @@ void btGImpactBvh::refit()
void btGImpactBvh::buildSet()
{
//obtain primitive boxes
- BT_BVH_DATA_ARRAY primitive_boxes;
+ GIM_BVH_DATA_ARRAY primitive_boxes;
primitive_boxes.resize(m_primitive_manager->get_primitive_count());
for (int i = 0;i<primitive_boxes.size() ;i++ )
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.h b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.h
index 1907efc2463..b432b615f8a 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactBvh.h
@@ -32,29 +32,23 @@ subject to the following restrictions:
-/*! \defgroup BOX_TREES
-
-
-
-*/
-//! @{
//! Overlapping pair
-struct BT_PAIR
+struct GIM_PAIR
{
int m_index1;
int m_index2;
- BT_PAIR()
+ GIM_PAIR()
{}
- BT_PAIR(const BT_PAIR & p)
+ GIM_PAIR(const GIM_PAIR & p)
{
m_index1 = p.m_index1;
m_index2 = p.m_index2;
}
- BT_PAIR(int index1, int index2)
+ GIM_PAIR(int index1, int index2)
{
m_index1 = index1;
m_index2 = index2;
@@ -62,7 +56,7 @@ struct BT_PAIR
};
//! A pairset array
-class btPairSet: public btAlignedObjectArray<BT_PAIR>
+class btPairSet: public btAlignedObjectArray<GIM_PAIR>
{
public:
btPairSet()
@@ -71,32 +65,32 @@ public:
}
inline void push_pair(int index1,int index2)
{
- push_back(BT_PAIR(index1,index2));
+ push_back(GIM_PAIR(index1,index2));
}
inline void push_pair_inv(int index1,int index2)
{
- push_back(BT_PAIR(index2,index1));
+ push_back(GIM_PAIR(index2,index1));
}
};
-
-struct BT_BVH_DATA
+///GIM_BVH_DATA is an internal GIMPACT collision structure to contain axis aligned bounding box
+struct GIM_BVH_DATA
{
btAABB m_bound;
int m_data;
};
//! Node Structure for trees
-class BT_BVH_TREE_NODE
+class GIM_BVH_TREE_NODE
{
public:
btAABB m_bound;
protected:
int m_escapeIndexOrDataIndex;
public:
- BT_BVH_TREE_NODE()
+ GIM_BVH_TREE_NODE()
{
m_escapeIndexOrDataIndex = 0;
}
@@ -133,12 +127,12 @@ public:
};
-class BT_BVH_DATA_ARRAY:public btAlignedObjectArray<BT_BVH_DATA>
+class GIM_BVH_DATA_ARRAY:public btAlignedObjectArray<GIM_BVH_DATA>
{
};
-class BT_BVH_TREE_NODE_ARRAY:public btAlignedObjectArray<BT_BVH_TREE_NODE>
+class GIM_BVH_TREE_NODE_ARRAY:public btAlignedObjectArray<GIM_BVH_TREE_NODE>
{
};
@@ -150,15 +144,15 @@ class btBvhTree
{
protected:
int m_num_nodes;
- BT_BVH_TREE_NODE_ARRAY m_node_array;
+ GIM_BVH_TREE_NODE_ARRAY m_node_array;
protected:
int _sort_and_calc_splitting_index(
- BT_BVH_DATA_ARRAY & primitive_boxes,
+ GIM_BVH_DATA_ARRAY & primitive_boxes,
int startIndex, int endIndex, int splitAxis);
- int _calc_splitting_axis(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
+ int _calc_splitting_axis(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
- void _build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
+ void _build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
public:
btBvhTree()
{
@@ -167,7 +161,7 @@ public:
//! prototype functions for box tree management
//!@{
- void build_tree(BT_BVH_DATA_ARRAY & primitive_boxes);
+ void build_tree(GIM_BVH_DATA_ARRAY & primitive_boxes);
SIMD_FORCE_INLINE void clearNodes()
{
@@ -218,7 +212,7 @@ public:
return m_node_array[nodeindex].getEscapeIndex();
}
- SIMD_FORCE_INLINE const BT_BVH_TREE_NODE * get_node_pointer(int index = 0) const
+ SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * get_node_pointer(int index = 0) const
{
return &m_node_array[index];
}
@@ -382,12 +376,11 @@ public:
}
- SIMD_FORCE_INLINE const BT_BVH_TREE_NODE * get_node_pointer(int index = 0) const
+ SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * get_node_pointer(int index = 0) const
{
return m_box_tree.get_node_pointer(index);
}
-//! @}
static float getAverageTreeCollisionTime();
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
index 28ad18fbde2..4d6fa88f62d 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
@@ -192,7 +192,7 @@ float btGImpactCollisionAlgorithm::getAverageTriangleCollisionTime()
btGImpactCollisionAlgorithm::btGImpactCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
-: btCollisionAlgorithm(ci)
+: btActivatingCollisionAlgorithm(ci,body0,body1)
{
m_manifoldPtr = NULL;
m_convex_algorithm = NULL;
@@ -404,7 +404,7 @@ void btGImpactCollisionAlgorithm::collide_sat_triangles(btCollisionObject * body
btPrimitiveTriangle ptri0;
btPrimitiveTriangle ptri1;
- BT_TRIANGLE_CONTACT contact_data;
+ GIM_TRIANGLE_CONTACT contact_data;
shape0->lockChildShapes();
shape1->lockChildShapes();
@@ -540,7 +540,7 @@ void btGImpactCollisionAlgorithm::gimpact_vs_gimpact(
int i = pairset.size();
while(i--)
{
- BT_PAIR * pair = &pairset[i];
+ GIM_PAIR * pair = &pairset[i];
m_triface0 = pair->m_index1;
m_triface1 = pair->m_index2;
btCollisionShape * colshape0 = retriever0.getChildShape(m_triface0);
@@ -584,14 +584,15 @@ void btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject * body0,
if(shape0->getGImpactShapeType()==CONST_GIMPACT_TRIMESH_SHAPE)
{
btGImpactMeshShape * meshshape0 = static_cast<btGImpactMeshShape *>(shape0);
- m_part0 = meshshape0->getMeshPartCount();
+ int& part = swapped ? m_part1 : m_part0;
+ part = meshshape0->getMeshPartCount();
- while(m_part0--)
+ while(part--)
{
gimpact_vs_shape(body0,
body1,
- meshshape0->getMeshPart(m_part0),
+ meshshape0->getMeshPart(part),
shape1,swapped);
}
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h
index c745b7ed5d8..453472aa034 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h
@@ -24,7 +24,7 @@ subject to the following restrictions:
#ifndef BVH_CONCAVE_COLLISION_ALGORITHM_H
#define BVH_CONCAVE_COLLISION_ALGORITHM_H
-#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
@@ -51,7 +51,7 @@ btCollisionDispatcher * dispatcher = static_cast<btCollisionDispatcher *>(m_dyna
btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher);
\endcode
*/
-class btGImpactCollisionAlgorithm : public btCollisionAlgorithm
+class btGImpactCollisionAlgorithm : public btActivatingCollisionAlgorithm
{
protected:
btCollisionAlgorithm * m_convex_algorithm;
@@ -67,7 +67,7 @@ protected:
//! Creates a new contact point
SIMD_FORCE_INLINE btPersistentManifold* newContactManifold(btCollisionObject* body0,btCollisionObject* body1)
{
- m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1);
+ m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1);
return m_manifoldPtr;
}
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp
index 0b1ef6acd83..ea1647a8129 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp
@@ -67,7 +67,7 @@ float btGImpactQuantizedBvh::getAverageTreeCollisionTime()
/////////////////////// btQuantizedBvhTree /////////////////////////////////
void btQuantizedBvhTree::calc_quantization(
- BT_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin)
+ GIM_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin)
{
//calc globa box
btAABB global_bound;
@@ -86,7 +86,7 @@ void btQuantizedBvhTree::calc_quantization(
int btQuantizedBvhTree::_calc_splitting_axis(
- BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
+ GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
{
int i;
@@ -118,7 +118,7 @@ int btQuantizedBvhTree::_calc_splitting_axis(
int btQuantizedBvhTree::_sort_and_calc_splitting_index(
- BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex,
+ GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex,
int endIndex, int splitAxis)
{
int i;
@@ -171,15 +171,14 @@ int btQuantizedBvhTree::_sort_and_calc_splitting_index(
splitIndex = startIndex+ (numIndices>>1);
}
- bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex));
- btAssert(!unbal);
+ btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex))));
return splitIndex;
}
-void btQuantizedBvhTree::_build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
+void btQuantizedBvhTree::_build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
{
int curIndex = m_num_nodes;
m_num_nodes++;
@@ -232,7 +231,7 @@ void btQuantizedBvhTree::_build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, in
//! stackless build tree
void btQuantizedBvhTree::build_tree(
- BT_BVH_DATA_ARRAY & primitive_boxes)
+ GIM_BVH_DATA_ARRAY & primitive_boxes)
{
calc_quantization(primitive_boxes);
// initialize node count to 0
@@ -258,7 +257,7 @@ void btGImpactQuantizedBvh::refit()
}
else
{
- //const BT_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount);
+ //const GIM_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount);
//get left bound
btAABB bound;
bound.invalidate();
@@ -288,7 +287,7 @@ void btGImpactQuantizedBvh::refit()
void btGImpactQuantizedBvh::buildSet()
{
//obtain primitive boxes
- BT_BVH_DATA_ARRAY primitive_boxes;
+ GIM_BVH_DATA_ARRAY primitive_boxes;
primitive_boxes.resize(m_primitive_manager->get_primitive_count());
for (int i = 0;i<primitive_boxes.size() ;i++ )
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h
index 3a4774b849d..e9cccac75f5 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h
@@ -29,12 +29,6 @@ subject to the following restrictions:
-/*! \defgroup BOX_TREES
-
-
-
-*/
-//! @{
///btQuantizedBvhNode is a compressed aabb node, 16 bytes.
@@ -100,7 +94,7 @@ ATTRIBUTE_ALIGNED16 (struct) BT_QUANTIZED_BVH_NODE
-class BT_QUANTIZED_BVH_NODE_ARRAY:public btAlignedObjectArray<BT_QUANTIZED_BVH_NODE>
+class GIM_QUANTIZED_BVH_NODE_ARRAY:public btAlignedObjectArray<BT_QUANTIZED_BVH_NODE>
{
};
@@ -112,19 +106,19 @@ class btQuantizedBvhTree
{
protected:
int m_num_nodes;
- BT_QUANTIZED_BVH_NODE_ARRAY m_node_array;
+ GIM_QUANTIZED_BVH_NODE_ARRAY m_node_array;
btAABB m_global_bound;
btVector3 m_bvhQuantization;
protected:
- void calc_quantization(BT_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin = btScalar(1.0) );
+ void calc_quantization(GIM_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin = btScalar(1.0) );
int _sort_and_calc_splitting_index(
- BT_BVH_DATA_ARRAY & primitive_boxes,
+ GIM_BVH_DATA_ARRAY & primitive_boxes,
int startIndex, int endIndex, int splitAxis);
- int _calc_splitting_axis(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
+ int _calc_splitting_axis(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
- void _build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
+ void _build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
public:
btQuantizedBvhTree()
{
@@ -133,7 +127,7 @@ public:
//! prototype functions for box tree management
//!@{
- void build_tree(BT_BVH_DATA_ARRAY & primitive_boxes);
+ void build_tree(GIM_BVH_DATA_ARRAY & primitive_boxes);
SIMD_FORCE_INLINE void quantizePoint(
unsigned short * quantizedpoint, const btVector3 & point) const
@@ -365,7 +359,6 @@ public:
return m_box_tree.get_node_pointer(index);
}
-//! @}
static float getAverageTreeCollisionTime();
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h
index 43f32bea5a1..05431cfce15 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h
@@ -105,6 +105,7 @@ protected:
public:
btGImpactShapeInterface()
{
+ m_shapeType=GIMPACT_SHAPE_PROXYTYPE;
m_localAABB.invalidate();
m_needs_update = true;
localScaling.setValue(1.f,1.f,1.f);
@@ -880,6 +881,8 @@ Set of btGImpactMeshShapePart parts
*/
class btGImpactMeshShape : public btGImpactShapeInterface
{
+ btStridingMeshInterface* m_meshInterface;
+
protected:
btAlignedObjectArray<btGImpactMeshShapePart*> m_mesh_parts;
void buildMeshParts(btStridingMeshInterface * meshInterface)
@@ -906,6 +909,7 @@ protected:
public:
btGImpactMeshShape(btStridingMeshInterface * meshInterface)
{
+ m_meshInterface = meshInterface;
buildMeshParts(meshInterface);
}
@@ -921,6 +925,15 @@ public:
}
+ btStridingMeshInterface* getMeshInterface()
+ {
+ return m_meshInterface;
+ }
+
+ const btStridingMeshInterface* getMeshInterface() const
+ {
+ return m_meshInterface;
+ }
int getMeshPartCount() const
{
@@ -1032,12 +1045,12 @@ public:
}
//! call when reading child shapes
- virtual void lockChildShapes()
+ virtual void lockChildShapes() const
{
btAssert(0);
}
- virtual void unlockChildShapes()
+ virtual void unlockChildShapes() const
{
btAssert(0);
}
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp
index 4b4b5e20dd3..956fa0430e3 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp
@@ -251,16 +251,16 @@ bool btGenericPoolAllocator::freeMemory(void * pointer)
#define BT_DEFAULT_POOL_ELEMENT_SIZE 8
// main allocator
-class BT_STANDARD_ALLOCATOR: public btGenericPoolAllocator
+class GIM_STANDARD_ALLOCATOR: public btGenericPoolAllocator
{
public:
- BT_STANDARD_ALLOCATOR():btGenericPoolAllocator(BT_DEFAULT_POOL_ELEMENT_SIZE,BT_DEFAULT_POOL_SIZE)
+ GIM_STANDARD_ALLOCATOR():btGenericPoolAllocator(BT_DEFAULT_POOL_ELEMENT_SIZE,BT_DEFAULT_POOL_SIZE)
{
}
};
// global allocator
-BT_STANDARD_ALLOCATOR g_main_allocator;
+GIM_STANDARD_ALLOCATOR g_main_allocator;
void * btPoolAlloc(size_t size)
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h b/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h
index 05b79a82516..e883bcd23d2 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h
@@ -155,14 +155,9 @@ public:
-/*! \defgroup POOL_MEMORY_FUNCTIONS
-standar managed Memory functions. Memory pools are used.
-*/
-//! @{
void * btPoolAlloc(size_t size);
void * btPoolRealloc(void *ptr, size_t oldsize, size_t newsize);
void btPoolFree(void *ptr);
-//! @}
#endif
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h b/extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h
index f5800716a96..bc5a416ddb7 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h
@@ -29,9 +29,6 @@ subject to the following restrictions:
-/*! \defgroup GEOMETRIC_OPERATIONS
-*/
-//! @{
#define PLANEDIREPSILON 0.0000001f
@@ -210,7 +207,6 @@ SIMD_FORCE_INLINE void bt_segment_collision(
-//! @}
#endif // GIM_VECTOR_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h b/extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h
index e9e6ad3d805..7faada61c95 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h
@@ -29,9 +29,6 @@ subject to the following restrictions:
-/*! \defgroup GEOMETRIC_OPERATIONS
-*/
-//! @{
@@ -86,7 +83,6 @@ SIMD_FORCE_INLINE btVector3 bt_unquantize(
return vecOut;
}
-//! @}
#endif // GIM_VECTOR_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp
index 0267f7e67c7..78696277c34 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp
@@ -25,7 +25,7 @@ subject to the following restrictions:
-void BT_TRIANGLE_CONTACT::merge_points(const btVector4 & plane,
+void GIM_TRIANGLE_CONTACT::merge_points(const btVector4 & plane,
btScalar margin, const btVector3 * points, int point_count)
{
m_point_count = 0;
@@ -123,7 +123,7 @@ int btPrimitiveTriangle::clip_triangle(btPrimitiveTriangle & other, btVector3 *
return clipped_count;
}
-bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangle & other, BT_TRIANGLE_CONTACT & contacts)
+bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangle & other, GIM_TRIANGLE_CONTACT & contacts)
{
btScalar margin = m_margin + other.m_margin;
@@ -132,7 +132,7 @@ bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangl
//create planes
// plane v vs U points
- BT_TRIANGLE_CONTACT contacts1;
+ GIM_TRIANGLE_CONTACT contacts1;
contacts1.m_separating_normal = m_plane;
@@ -152,7 +152,7 @@ bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangl
//Clip tri1 by tri2 edges
- BT_TRIANGLE_CONTACT contacts2;
+ GIM_TRIANGLE_CONTACT contacts2;
contacts2.m_separating_normal = other.m_plane;
clipped_count = other.clip_triangle(*this,clipped_points);
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h b/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h
index bdaa323d564..bbd6b630c02 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h
@@ -35,14 +35,14 @@ subject to the following restrictions:
#define MAX_TRI_CLIPPING 16
//! Structure for collision
-struct BT_TRIANGLE_CONTACT
+struct GIM_TRIANGLE_CONTACT
{
btScalar m_penetration_depth;
int m_point_count;
btVector4 m_separating_normal;
btVector3 m_points[MAX_TRI_CLIPPING];
- SIMD_FORCE_INLINE void copy_from(const BT_TRIANGLE_CONTACT& other)
+ SIMD_FORCE_INLINE void copy_from(const GIM_TRIANGLE_CONTACT& other)
{
m_penetration_depth = other.m_penetration_depth;
m_separating_normal = other.m_separating_normal;
@@ -54,11 +54,11 @@ struct BT_TRIANGLE_CONTACT
}
}
- BT_TRIANGLE_CONTACT()
+ GIM_TRIANGLE_CONTACT()
{
}
- BT_TRIANGLE_CONTACT(const BT_TRIANGLE_CONTACT& other)
+ GIM_TRIANGLE_CONTACT(const GIM_TRIANGLE_CONTACT& other)
{
copy_from(other);
}
@@ -123,7 +123,7 @@ public:
/*!
\pre this triangle and other must have their triangles calculated
*/
- bool find_triangle_collision_clip_method(btPrimitiveTriangle & other, BT_TRIANGLE_CONTACT & contacts);
+ bool find_triangle_collision_clip_method(btPrimitiveTriangle & other, GIM_TRIANGLE_CONTACT & contacts);
};
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_array.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_array.h
index 89fbb5ab0a5..c8161d252d5 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_array.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_array.h
@@ -34,11 +34,6 @@ email: projectileman@yahoo.com
#include "gim_memory.h"
-/*! \addtogroup CONTAINERS
-\brief
-Abstract class for template containers
-*/
-//! @{
#define GIM_ARRAY_GROW_INCREMENT 2
#define GIM_ARRAY_GROW_FACTOR 2
@@ -321,11 +316,10 @@ public:
{
resizeData(m_size);
}
-//!@}
+
};
-//! @}
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h
index d4cbce04b5e..666abf7917a 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h
@@ -40,9 +40,6 @@ email: projectileman@yahoo.com
-/*! \defgroup GEOMETRIC_OPERATIONS
-*/
-//! @{
#define PLANEDIREPSILON 0.0000001f
@@ -541,7 +538,6 @@ SIMD_FORCE_INLINE void SORT_3_INDICES(
-//! @}
#endif // GIM_VECTOR_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h
index 7784aeff140..322004a8d5b 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h
@@ -34,11 +34,6 @@ email: projectileman@yahoo.com
#include "gim_array.h"
-/*! \addtogroup CONTAINERS
-\brief
-Abstract class for template containers
-*/
-//! @{
#define GUINT_BIT_COUNT 32
#define GUINT_EXPONENT 5
@@ -122,7 +117,6 @@ public:
};
-//! @}
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h
index c9bb83e3653..0add5e4b99f 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h
@@ -35,9 +35,6 @@ email: projectileman@yahoo.com
#include "gim_basic_geometry_operations.h"
#include "LinearMath/btTransform.h"
-/*! \defgroup BOUND_AABB_OPERATIONS
-*/
-//! @{
//SIMD_FORCE_INLINE bool test_cross_edge_box(
@@ -589,6 +586,5 @@ SIMD_FORCE_INLINE bool btCompareTransformsEqual(const btTransform & t1,const btT
}
-//! @}
#endif // GIM_BOX_COLLISION_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp
index 1ffc2bbad78..0c3d7ba8db0 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp
@@ -110,8 +110,7 @@ GUINT GIM_BOX_TREE::_sort_and_calc_splitting_index(
splitIndex = startIndex+ (numIndices>>1);
}
- bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex));
- btAssert(!unbal);
+ btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex))));
return splitIndex;
}
@@ -180,3 +179,4 @@ void GIM_BOX_TREE::build_tree(
_build_sub_tree(primitive_boxes, 0, primitive_boxes.size());
}
+
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h
index ece5936de6b..1058a0872a5 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h
@@ -40,12 +40,6 @@ email: projectileman@yahoo.com
#include "gim_tri_collision.h"
-/*! \defgroup BOX_PRUNNING
-
-
-
-*/
-//! @{
//! Overlapping pair
struct GIM_PAIR
@@ -446,7 +440,6 @@ public:
m_primitive_manager.get_primitive_triangle(getNodeData(nodeindex),triangle);
}
-//! @}
};
//! Class for Box Tree Sets
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h
index 62151cb97b7..a91fd3aa422 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h
@@ -33,9 +33,6 @@ email: projectileman@yahoo.com
-----------------------------------------------------------------------------
*/
-/*! \addtogroup GEOMETRIC_OPERATIONS
-*/
-//! @{
//! This function calcs the distance from a 3D plane
class DISTANCE_PLANE_3D_FUNC
@@ -209,6 +206,5 @@ SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE3D(
}
-//! @}
#endif // GIM_TRI_COLLISION_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h
index 62df51b782f..ad3e12298fe 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h
@@ -36,17 +36,6 @@ email: projectileman@yahoo.com
#include "gim_radixsort.h"
#include "gim_array.h"
-/*! \defgroup CONTACTS
-\brief
-Functions for managing and sorting contacts resulting from a collision query.
-<ul>
-<li> Contact lists must be create by calling \ref GIM_CREATE_CONTACT_LIST
-<li> After querys, contact lists must be destroy by calling \ref GIM_DYNARRAY_DESTROY
-<li> Contacts can be merge for avoid duplicate results by calling \ref gim_merge_contacts
-</ul>
-
-*/
-//! @{
/**
Configuration var for applying interpolation of contact normals
@@ -55,6 +44,10 @@ Configuration var for applying interpolation of contact normals
#define CONTACT_DIFF_EPSILON 0.00001f
/// Structure for collision results
+///Functions for managing and sorting contacts resulting from a collision query.
+///Contact lists must be create by calling \ref GIM_CREATE_CONTACT_LIST
+///After querys, contact lists must be destroy by calling \ref GIM_DYNARRAY_DESTROY
+///Contacts can be merge for avoid duplicate results by calling \ref gim_merge_contacts
class GIM_CONTACT
{
public:
@@ -168,5 +161,4 @@ public:
void merge_contacts_unique(const gim_contact_array & contacts);
};
-//! @}
#endif // GIM_CONTACT_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h
index cd3e53dcc0c..2fb1e3f9e45 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h
@@ -36,11 +36,7 @@ email: projectileman@yahoo.com
#include "gim_math.h"
-/*! \defgroup GEOMETRIC_TYPES
-\brief
-Basic types and constants for geometry
-*/
-//! @{
+
//! Short Integer vector 2D
typedef GSHORT vec2s[2];
@@ -95,7 +91,6 @@ typedef GREAL mat4f[4][4];
typedef GREAL quatf[4];
//typedef struct _aabb3f aabb3f;
-//! @}
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h
index fd980dff5fa..93c66f81823 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h
@@ -34,11 +34,6 @@ email: projectileman@yahoo.com
#include "gim_radixsort.h"
-/*! \addtogroup CONTAINERS
-\brief
-Abstract class for collision objects
-*/
-//! @{
#define GIM_INVALID_HASH 0xffffffff //!< A very very high value
#define GIM_DEFAULT_HASH_TABLE_SIZE 380
@@ -204,12 +199,7 @@ protected:
//SuperBufferedArray< _node_type > m_nodes;
bool m_sorted;
- /*! \defgroup HASH_TABLE_STRUCTURES
- \brief
- Hash table data management. The hash table has the indices to the corresponding m_nodes array
- */
- //! @{
-
+ ///Hash table data management. The hash table has the indices to the corresponding m_nodes array
GUINT * m_hash_table;//!<
GUINT m_table_size;//!<
GUINT m_node_size;//!<
@@ -459,13 +449,8 @@ protected:
}
- //! @}
-
- /*! \defgroup SORTED_ARRAY_STRUCTURES
- \brief
- Sorted array data management. The hash table has the indices to the corresponding m_nodes array
- */
- //! @{
+
+ ///Sorted array data management. The hash table has the indices to the corresponding m_nodes array
inline bool _erase_sorted(GUINT index)
{
if(index>=(GUINT)m_nodes.size()) return false;
@@ -575,8 +560,7 @@ protected:
return GIM_INVALID_HASH;
}
- //! @}
-
+
public:
@@ -913,8 +897,6 @@ public:
};
-//! @}
-
#endif // GIM_CONTAINERS_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h
index adf1c1c2ddf..0247d4e61cc 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h
@@ -40,11 +40,6 @@ email: projectileman@yahoo.com
-/*! \defgroup VECTOR_OPERATIONS
-T
-Operations for vectors : vec2f,vec3f and vec4f
-*/
-//! @{
//! Zero out a 2D vector
#define VEC_ZERO_2(a) \
@@ -446,13 +441,8 @@ Takes two vectors a, b, blends them together with s <=1 */
-//! @}
-/*! \defgroup MATRIX_OPERATIONS
-Operations for matrices : mat2f, mat3f and mat4f
-*/
-//! @{
/// initialize matrix
#define IDENTIFY_MATRIX_3X3(m) \
@@ -1579,6 +1569,5 @@ and m is a mat4f<br>
}\
-//! @}
#endif // GIM_VECTOR_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_math.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_math.h
index 25ad1e21c7f..8b9e6806ef7 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_math.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_math.h
@@ -35,13 +35,6 @@ email: projectileman@yahoo.com
#include "LinearMath/btScalar.h"
-/*! \defgroup BASIC_TYPES
-Basic types and constants
-Conventions:
-Types starting with G
-Constants starting with G_
-*/
-//! @{
#define GREAL btScalar
#define GREAL2 double
@@ -52,15 +45,7 @@ Constants starting with G_
#define GINT64 long long
#define GUINT64 unsigned long long
-//! @}
-/*! \defgroup BASIC_CONSTANTS
-Basic constants
-Conventions:
-Types starting with G
-Constants starting with G_
-*/
-//! @{
#define G_PI 3.14159265358979f
#define G_HALF_PI 1.5707963f
@@ -73,14 +58,9 @@ Constants starting with G_
#define G_REAL_INFINITY FLT_MAX
#define G_SIGN_BITMASK 0x80000000
#define G_EPSILON SIMD_EPSILON
-//! @}
-/*! \defgroup SCALAR_TYPES
-\brief
-Precision type constants
-*/
-//! @{
+
enum GIM_SCALAR_TYPES
{
G_STYPE_REAL =0,
@@ -92,12 +72,8 @@ enum GIM_SCALAR_TYPES
G_STYPE_INT64,
G_STYPE_UINT64
};
-//! @}
-/*! \defgroup MATH_FUNCTIONS
-mathematical functions
-*/
-//! @{
+
#define G_DEGTORAD(X) ((X)*3.1415926f/180.0f)
#define G_RADTODEG(X) ((X)*180.0f/3.1415926f)
@@ -131,7 +107,7 @@ mathematical functions
///returns a clamped number
#define GIM_CLAMP(number,minval,maxval) (number<minval?minval:(number>maxval?maxval:number))
-#define GIM_GREATER(x, y) fabsf(x) > (y)
+#define GIM_GREATER(x, y) btFabs(x) > (y)
///Swap numbers
#define GIM_SWAP_NUMBERS(a,b){ \
@@ -176,6 +152,6 @@ inline GREAL gim_sqrt(GREAL f)
return r;
}
-//! @}
+
#endif // GIM_MATH_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h
index 469a8280f7d..fa99eebb60e 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h
@@ -36,9 +36,6 @@ email: projectileman@yahoo.com
#include "gim_math.h"
#include <memory.h>
-//#define PREFETCH 1
-//! \defgroup PREFETCH
-//! @{
#ifdef PREFETCH
#include <xmmintrin.h> // for prefetch
#define pfval 64
@@ -53,13 +50,9 @@ email: projectileman@yahoo.com
//! Prefetch 128
#define pf2(_x,_i)
#endif
-//! @}
-/*! \defgroup ARRAY_UTILITIES
-\brief
-Functions for manip packed arrays of numbers
-*/
-//! @{
+
+///Functions for manip packed arrays of numbers
#define GIM_COPY_ARRAYS(dest_array,source_array,element_count)\
{\
for (GUINT _i_=0;_i_<element_count ;++_i_)\
@@ -92,50 +85,36 @@ Functions for manip packed arrays of numbers
array[_i_] = constant;\
}\
}\
-//! @}
-/*! \defgroup MEMORY_FUNCTION_PROTOTYPES
-Function prototypes to allocate and free memory.
-*/
-//! @{
+
+///Function prototypes to allocate and free memory.
typedef void * gim_alloc_function (size_t size);
typedef void * gim_alloca_function (size_t size);//Allocs on the heap
typedef void * gim_realloc_function (void *ptr, size_t oldsize, size_t newsize);
typedef void gim_free_function (void *ptr);
-//! @}
-
-/*! \defgroup MEMORY_FUNCTION_HANDLERS
-\brief
-Memory Function Handlers
- set new memory management functions. if fn is 0, the default handlers are
- used. */
-//! @{
+
+
+///Memory Function Handlers
+///set new memory management functions. if fn is 0, the default handlers are used.
void gim_set_alloc_handler (gim_alloc_function *fn);
void gim_set_alloca_handler (gim_alloca_function *fn);
void gim_set_realloc_handler (gim_realloc_function *fn);
void gim_set_free_handler (gim_free_function *fn);
-//! @}
-/*! \defgroup MEMORY_FUNCTION_GET_HANDLERS
-\brief
-get current memory management functions.
-*/
-//! @{
+
+///get current memory management functions.
gim_alloc_function *gim_get_alloc_handler (void);
gim_alloca_function *gim_get_alloca_handler(void);
gim_realloc_function *gim_get_realloc_handler (void);
gim_free_function *gim_get_free_handler (void);
-//! @}
-/*! \defgroup MEMORY_FUNCTIONS
-Standar Memory functions
-*/
-//! @{
+
+///Standar Memory functions
void * gim_alloc(size_t size);
void * gim_alloca(size_t size);
void * gim_realloc(void *ptr, size_t oldsize, size_t newsize);
void gim_free(void *ptr);
-//! @}
+
#if defined (WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_radixsort.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_radixsort.h
index 9ecf61bdc6d..f7dadbbca93 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_radixsort.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_radixsort.h
@@ -36,11 +36,7 @@ email: projectileman@yahoo.com
#include "gim_memory.h"
-/*! \defgroup SORTING
-\brief
-Macros for sorting.
-*/
-
+///Macros for sorting.
//! Prototype for comparators
class less_comparator
{
@@ -406,5 +402,5 @@ void gim_heap_sort(T *pArr, GUINT element_count, COMP_CLASS CompareFunc)
-//! @}
+
#endif // GIM_RADIXSORT_H_INCLUDED
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.cpp b/extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.cpp
index ef6feabdfee..74d734146a7 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.cpp
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.cpp
@@ -38,7 +38,7 @@ email: projectileman@yahoo.com
#define MIN_EDGE_EDGE_DIS 0.00001f
-class _GIM_TRIANGLE_CALCULATION_CACHE
+class GIM_TRIANGLE_CALCULATION_CACHE
{
public:
GREAL margin;
@@ -489,7 +489,7 @@ public:
};
-/*class _GIM_TRIANGLE_CALCULATION_CACHE
+/*class GIM_TRIANGLE_CALCULATION_CACHE
{
public:
GREAL margin;
@@ -627,7 +627,7 @@ bool GIM_TRIANGLE::collide_triangle_hard_test(
const GIM_TRIANGLE & other,
GIM_TRIANGLE_CONTACT_DATA & contact_data) const
{
- _GIM_TRIANGLE_CALCULATION_CACHE calc_cache;
+ GIM_TRIANGLE_CALCULATION_CACHE calc_cache;
return calc_cache.triangle_collision(
m_vertices[0],m_vertices[1],m_vertices[2],m_margin,
other.m_vertices[0],other.m_vertices[1],other.m_vertices[2],other.m_margin,
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.h
index 7cea8fc33a6..2d6e43a1a2e 100644
--- a/extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.h
+++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_tri_collision.h
@@ -36,9 +36,6 @@ email: projectileman@yahoo.com
#include "gim_box_collision.h"
#include "gim_clip_polygon.h"
-/*! \addtogroup GEOMETRIC_OPERATIONS
-*/
-//! @{
@@ -278,7 +275,7 @@ if 0.0<= u+v <=1.0 then they are inside of triangle
}
else
{
- float sumuv;
+ btScalar sumuv;
sumuv = u+v;
if(sumuv<-G_EPSILON)
{
@@ -378,6 +375,5 @@ if 0.0<= u+v <=1.0 then they are inside of triangle
-//! @}
#endif // GIM_TRI_COLLISION_H_INCLUDED