Skip to content

Commit d23072e

Browse files
committed
Add new methods
1 parent 05fd584 commit d23072e

10 files changed

+44
-2
lines changed

BulletSharp/Collision/ConvexPolyhedron.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ public void Initialize()
7272
btConvexPolyhedron_initialize(Native);
7373
}
7474

75+
public void Initialize2()
76+
{
77+
btConvexPolyhedron_initialize2(Native);
78+
}
79+
7580
public void ProjectRef(ref Matrix trans, ref Vector3 dir, out float minProj, out float maxProj,
7681
out Vector3 witnesPtMin, out Vector3 witnesPtMax)
7782
{

BulletSharp/Collision/OverlappingPairCache.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,20 @@ public BroadphasePair FindPair(BroadphaseProxy proxy0, BroadphaseProxy proxy1)
106106
{
107107
return new BroadphasePair(btOverlappingPairCache_findPair(Native, proxy0.Native, proxy1.Native));
108108
}
109-
/*
109+
110110
public void ProcessAllOverlappingPairs(OverlapCallback __unnamed0, Dispatcher dispatcher)
111111
{
112112
btOverlappingPairCache_processAllOverlappingPairs(Native, __unnamed0.Native,
113113
dispatcher.Native);
114114
}
115-
*/
115+
116+
public void ProcessAllOverlappingPairs(OverlapCallback __unnamed0, Dispatcher dispatcher,
117+
DispatcherInfo dispatcherInfo)
118+
{
119+
btOverlappingPairCache_processAllOverlappingPairs2(Native, __unnamed0.Native,
120+
dispatcher.Native, dispatcherInfo.Native);
121+
}
122+
116123
public void SetInternalGhostPairCallback(OverlappingPairCallback ghostPairCallback)
117124
{
118125
_ghostPairCallback = ghostPairCallback;

BulletSharp/Collision/PolyhedralConvexShape.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public bool IsInside(Vector3 pt, float tolerance)
4545
return btPolyhedralConvexShape_isInside(Native, ref pt, tolerance);
4646
}
4747

48+
public void SetPolyhedralFeatures(ConvexPolyhedron polyhedron)
49+
{
50+
btPolyhedralConvexShape_setPolyhedralFeatures(Native, polyhedron.Native);
51+
}
52+
4853
public ConvexPolyhedron ConvexPolyhedron
4954
{
5055
get

BulletSharp/UnsafeNativeMethods.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,8 @@ public static extern IntPtr btIDebugDrawWrapper_new(IntPtr debugDrawGCHandle, In
16631663
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
16641664
public static extern void btConvexPolyhedron_initialize(IntPtr obj);
16651665
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
1666+
public static extern void btConvexPolyhedron_initialize2(IntPtr obj);
1667+
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
16661668
public static extern void btConvexPolyhedron_project(IntPtr obj, [In] ref Matrix trans, [In] ref Vector3 dir, out float minProj, out float maxProj, out Vector3 witnesPtMin, out Vector3 witnesPtMax);
16671669
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
16681670
public static extern void btConvexPolyhedron_setExtents(IntPtr obj, [In] ref Vector3 value);
@@ -4184,6 +4186,8 @@ public static extern IntPtr btIDebugDrawWrapper_new(IntPtr debugDrawGCHandle, In
41844186
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
41854187
public static extern void btOverlappingPairCache_processAllOverlappingPairs(IntPtr obj, IntPtr __unnamed0, IntPtr dispatcher);
41864188
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
4189+
public static extern void btOverlappingPairCache_processAllOverlappingPairs2(IntPtr obj, IntPtr callback, IntPtr dispatcher, IntPtr dispatchInfo);
4190+
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
41874191
public static extern void btOverlappingPairCache_setInternalGhostPairCallback(IntPtr obj, IntPtr ghostPairCallback);
41884192
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
41894193
public static extern void btOverlappingPairCache_setOverlapFilterCallback(IntPtr obj, IntPtr callback);
@@ -4351,6 +4355,8 @@ public static extern IntPtr btIDebugDrawWrapper_new(IntPtr debugDrawGCHandle, In
43514355
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
43524356
[return: MarshalAs(UnmanagedType.I1)]
43534357
public static extern bool btPolyhedralConvexShape_isInside(IntPtr obj, [In] ref Vector3 pt, float tolerance);
4358+
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
4359+
public static extern void btPolyhedralConvexShape_setPolyhedralFeatures(IntPtr obj, IntPtr polyhedron);
43544360

43554361
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
43564362
public static extern IntPtr btPoolAllocator_new(int elemSize, int maxElements);

libbulletc/src/btConvexPolyhedron_wrap.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ void btConvexPolyhedron_initialize(btConvexPolyhedron* obj)
7474
obj->initialize();
7575
}
7676

77+
void btConvexPolyhedron_initialize2(btConvexPolyhedron* obj)
78+
{
79+
obj->initialize2();
80+
}
81+
7782
void btConvexPolyhedron_project(btConvexPolyhedron* obj, const btTransform* trans,
7883
const btVector3* dir, btScalar* minProj, btScalar* maxProj, btVector3* witnesPtMin,
7984
btVector3* witnesPtMax)

libbulletc/src/btConvexPolyhedron_wrap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ extern "C" {
1818
EXPORT btAlignedObjectArray_btVector3* btConvexPolyhedron_getUniqueEdges(btConvexPolyhedron* obj);
1919
EXPORT btAlignedObjectArray_btVector3* btConvexPolyhedron_getVertices(btConvexPolyhedron* obj);
2020
EXPORT void btConvexPolyhedron_initialize(btConvexPolyhedron* obj);
21+
EXPORT void btConvexPolyhedron_initialize2(btConvexPolyhedron* obj);
2122
EXPORT void btConvexPolyhedron_project(btConvexPolyhedron* obj, const btTransform* trans, const btVector3* dir, btScalar* minProj, btScalar* maxProj, btVector3* witnesPtMin, btVector3* witnesPtMax);
2223
EXPORT void btConvexPolyhedron_setExtents(btConvexPolyhedron* obj, const btVector3* value);
2324
EXPORT void btConvexPolyhedron_setLocalCenter(btConvexPolyhedron* obj, const btVector3* value);

libbulletc/src/btOverlappingPairCache_wrap.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ void btOverlappingPairCache_processAllOverlappingPairs(btOverlappingPairCache* o
7171
obj->processAllOverlappingPairs(__unnamed0, dispatcher);
7272
}
7373

74+
void btOverlappingPairCache_processAllOverlappingPairs2(btOverlappingPairCache* obj,
75+
btOverlapCallback* callback, btDispatcher* dispatcher, const btDispatcherInfo* dispatchInfo)
76+
{
77+
obj->processAllOverlappingPairs(callback, dispatcher, *dispatchInfo);
78+
}
79+
7480
void btOverlappingPairCache_setInternalGhostPairCallback(btOverlappingPairCache* obj,
7581
btOverlappingPairCallback* ghostPairCallback)
7682
{

libbulletc/src/btOverlappingPairCache_wrap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extern "C" {
3535
EXPORT btBroadphasePair* btOverlappingPairCache_getOverlappingPairArrayPtr(btOverlappingPairCache* obj);
3636
EXPORT bool btOverlappingPairCache_hasDeferredRemoval(btOverlappingPairCache* obj);
3737
EXPORT void btOverlappingPairCache_processAllOverlappingPairs(btOverlappingPairCache* obj, btOverlapCallback* __unnamed0, btDispatcher* dispatcher);
38+
EXPORT void btOverlappingPairCache_processAllOverlappingPairs2(btOverlappingPairCache* obj, btOverlapCallback* callback, btDispatcher* dispatcher, const btDispatcherInfo* dispatchInfo);
3839
EXPORT void btOverlappingPairCache_setInternalGhostPairCallback(btOverlappingPairCache* obj, btOverlappingPairCallback* ghostPairCallback);
3940
EXPORT void btOverlappingPairCache_setOverlapFilterCallback(btOverlappingPairCache* obj, btOverlapFilterCallback* callback);
4041
EXPORT void btOverlappingPairCache_sortOverlappingPairs(btOverlappingPairCache* obj, btDispatcher* dispatcher);

libbulletc/src/btPolyhedralConvexShape_wrap.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ bool btPolyhedralConvexShape_isInside(btPolyhedralConvexShape* obj, const btVect
6464
return obj->isInside(BTVECTOR3_USE(pt), tolerance);
6565
}
6666

67+
void btPolyhedralConvexShape_setPolyhedralFeatures(btPolyhedralConvexShape* obj, btConvexPolyhedron* polyhedron)
68+
{
69+
obj->setPolyhedralFeatures(*polyhedron);
70+
}
71+
6772

6873
void btPolyhedralConvexAabbCachingShape_getNonvirtualAabb(btPolyhedralConvexAabbCachingShape* obj,
6974
const btTransform* trans, btVector3* aabbMin, btVector3* aabbMax, btScalar margin)

libbulletc/src/btPolyhedralConvexShape_wrap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ extern "C" {
1212
EXPORT void btPolyhedralConvexShape_getVertex(btPolyhedralConvexShape* obj, int i, btVector3* vtx);
1313
EXPORT bool btPolyhedralConvexShape_initializePolyhedralFeatures(btPolyhedralConvexShape* obj, int shiftVerticesByMargin);
1414
EXPORT bool btPolyhedralConvexShape_isInside(btPolyhedralConvexShape* obj, const btVector3* pt, btScalar tolerance);
15+
EXPORT void btPolyhedralConvexShape_setPolyhedralFeatures(btPolyhedralConvexShape* obj, btConvexPolyhedron* polyhedron);
1516

1617
EXPORT void btPolyhedralConvexAabbCachingShape_getNonvirtualAabb(btPolyhedralConvexAabbCachingShape* obj, const btTransform* trans, btVector3* aabbMin, btVector3* aabbMax, btScalar margin);
1718
EXPORT void btPolyhedralConvexAabbCachingShape_recalcLocalAabb(btPolyhedralConvexAabbCachingShape* obj);

0 commit comments

Comments
 (0)