Update Bullet methods.
This commit is contained in:
Родитель
39e9f82a49
Коммит
a2ce2fb16a
|
@ -367,6 +367,12 @@ namespace BulletSharp
|
|||
set { btCollisionObject_setRollingFriction(_native, value); }
|
||||
}
|
||||
|
||||
public int UniqueId
|
||||
{
|
||||
get { return btCollisionObject_getUniqueId(_native); }
|
||||
set { btCollisionObject_setUniqueId(_native, value); }
|
||||
}
|
||||
|
||||
public object UserObject { get; set; }
|
||||
|
||||
public int UserIndex
|
||||
|
@ -497,6 +503,8 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern float btCollisionObject_getRollingFriction(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btCollisionObject_getUniqueId(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btCollisionObject_getUserIndex(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btCollisionObject_getUserIndex2(IntPtr obj);
|
||||
|
@ -579,6 +587,8 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btCollisionObject_setRollingFriction(IntPtr obj, float frict);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btCollisionObject_setUniqueId(IntPtr obj, int id);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btCollisionObject_setUserIndex(IntPtr obj, int index);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btCollisionObject_setUserIndex2(IntPtr obj, int index);
|
||||
|
|
|
@ -160,6 +160,12 @@ namespace BulletSharp
|
|||
return btCollisionWorld_ContactResultCallbackWrapper_needsCollision(_native, proxy0._native);
|
||||
}
|
||||
|
||||
public float ClosestDistanceThreshold
|
||||
{
|
||||
get { return btCollisionWorld_ContactResultCallback_getClosestDistanceThreshold(_native); }
|
||||
set { btCollisionWorld_ContactResultCallback_setClosestDistanceThreshold(_native, value); }
|
||||
}
|
||||
|
||||
public short CollisionFilterGroup
|
||||
{
|
||||
get { return btCollisionWorld_ContactResultCallback_getCollisionFilterGroup(_native); }
|
||||
|
@ -192,11 +198,15 @@ namespace BulletSharp
|
|||
Dispose(false);
|
||||
}
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern float btCollisionWorld_ContactResultCallback_getClosestDistanceThreshold(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern short btCollisionWorld_ContactResultCallback_getCollisionFilterGroup(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern short btCollisionWorld_ContactResultCallback_getCollisionFilterMask(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btCollisionWorld_ContactResultCallback_setClosestDistanceThreshold(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btCollisionWorld_ContactResultCallback_setCollisionFilterGroup(IntPtr obj, short value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btCollisionWorld_ContactResultCallback_setCollisionFilterMask(IntPtr obj, short value);
|
||||
|
|
|
@ -9,19 +9,16 @@ namespace BulletSharp
|
|||
public class CreateFunc : CollisionAlgorithmCreateFunc
|
||||
{
|
||||
private ConvexPenetrationDepthSolver _pdSolver;
|
||||
private VoronoiSimplexSolver _simplexSolver;
|
||||
|
||||
internal CreateFunc(IntPtr native)
|
||||
: base(native, true)
|
||||
{
|
||||
}
|
||||
|
||||
public CreateFunc(VoronoiSimplexSolver simplexSolver, ConvexPenetrationDepthSolver pdSolver)
|
||||
: base(btConvexConvexAlgorithm_CreateFunc_new(simplexSolver._native,
|
||||
pdSolver._native), false)
|
||||
public CreateFunc(ConvexPenetrationDepthSolver pdSolver)
|
||||
: base(btConvexConvexAlgorithm_CreateFunc_new(pdSolver._native), false)
|
||||
{
|
||||
_pdSolver = pdSolver;
|
||||
_simplexSolver = simplexSolver;
|
||||
}
|
||||
|
||||
public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo __unnamed0, CollisionObjectWrapper body0Wrap, CollisionObjectWrapper body1Wrap)
|
||||
|
@ -52,18 +49,8 @@ namespace BulletSharp
|
|||
}
|
||||
}
|
||||
|
||||
public VoronoiSimplexSolver SimplexSolver
|
||||
{
|
||||
get { return _simplexSolver; }
|
||||
set
|
||||
{
|
||||
btConvexConvexAlgorithm_CreateFunc_setSimplexSolver(_native, value._native);
|
||||
_simplexSolver = value;
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btConvexConvexAlgorithm_CreateFunc_new(IntPtr simplexSolver, IntPtr pdSolver);
|
||||
static extern IntPtr btConvexConvexAlgorithm_CreateFunc_new(IntPtr pdSolver);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btConvexConvexAlgorithm_CreateFunc_getMinimumPointsPerturbationThreshold(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
|
@ -74,8 +61,6 @@ namespace BulletSharp
|
|||
static extern void btConvexConvexAlgorithm_CreateFunc_setNumPerturbationIterations(IntPtr obj, int value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btConvexConvexAlgorithm_CreateFunc_setPdSolver(IntPtr obj, IntPtr value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btConvexConvexAlgorithm_CreateFunc_setSimplexSolver(IntPtr obj, IntPtr value);
|
||||
}
|
||||
|
||||
internal ConvexConvexAlgorithm(IntPtr native)
|
||||
|
|
|
@ -958,12 +958,7 @@ namespace BulletSharp
|
|||
get { return btDbvt_getOpath(_native); }
|
||||
set { btDbvt_setOpath(_native, value); }
|
||||
}
|
||||
/*
|
||||
public AlignedObjectArray<DbvtNode> RayTestStack
|
||||
{
|
||||
get { return btDbvt_getRayTestStack(_native); }
|
||||
}
|
||||
*/
|
||||
|
||||
public DbvtNode Root
|
||||
{
|
||||
get
|
||||
|
@ -1048,8 +1043,6 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern uint btDbvt_getOpath(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btDbvt_getRayTestStack(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btDbvt_getRoot(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btDbvt_getStkStack(IntPtr obj);
|
||||
|
|
|
@ -101,8 +101,6 @@ namespace BulletSharp
|
|||
|
||||
public class DefaultCollisionConfiguration : CollisionConfiguration
|
||||
{
|
||||
private VoronoiSimplexSolver _simplexSolver;
|
||||
|
||||
internal DefaultCollisionConfiguration(IntPtr native)
|
||||
: base(native)
|
||||
{
|
||||
|
@ -204,25 +202,11 @@ namespace BulletSharp
|
|||
numPerturbationIterations, minimumPointsPerturbationThreshold);
|
||||
}
|
||||
|
||||
public VoronoiSimplexSolver SimplexSolver
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_simplexSolver == null)
|
||||
{
|
||||
_simplexSolver = new VoronoiSimplexSolver(btDefaultCollisionConfiguration_getSimplexSolver(_native), true);
|
||||
}
|
||||
return _simplexSolver;
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btDefaultCollisionConfiguration_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btDefaultCollisionConfiguration_new2(IntPtr constructionInfo);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btDefaultCollisionConfiguration_getSimplexSolver(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations2(IntPtr obj, int numPerturbationIterations);
|
||||
|
|
|
@ -79,6 +79,12 @@ namespace BulletSharp
|
|||
set { btManifoldResult_setBody1Wrap(_native, value._native); }
|
||||
}
|
||||
|
||||
public float ClosestPointDistanceThreshold
|
||||
{
|
||||
get { return btManifoldResult_getClosestPointDistanceThreshold(_native); }
|
||||
set { btManifoldResult_setClosestPointDistanceThreshold(_native, value); }
|
||||
}
|
||||
|
||||
public PersistentManifold PersistentManifold
|
||||
{
|
||||
get { return new PersistentManifold(btManifoldResult_getPersistentManifold(_native), true); }
|
||||
|
@ -108,6 +114,8 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btManifoldResult_getBody1Wrap(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern float btManifoldResult_getClosestPointDistanceThreshold(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btManifoldResult_getPersistentManifold(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btManifoldResult_refreshContactPoints(IntPtr obj);
|
||||
|
@ -116,6 +124,8 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btManifoldResult_setBody1Wrap(IntPtr obj, IntPtr obj1Wrap);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btManifoldResult_setClosestPointDistanceThreshold(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btManifoldResult_setPersistentManifold(IntPtr obj, IntPtr manifoldPtr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,12 +128,7 @@ namespace BulletSharp
|
|||
get { return btDiscreteDynamicsWorld_getApplySpeculativeContactRestitution(_native); }
|
||||
set { btDiscreteDynamicsWorld_setApplySpeculativeContactRestitution(_native, value); }
|
||||
}
|
||||
/*
|
||||
public CollisionWorld CollisionWorld
|
||||
{
|
||||
get { return btDiscreteDynamicsWorld_getCollisionWorld(_native); }
|
||||
}
|
||||
*/
|
||||
|
||||
public bool LatencyMotionStateInterpolation
|
||||
{
|
||||
get { return btDiscreteDynamicsWorld_getLatencyMotionStateInterpolation(_native); }
|
||||
|
@ -168,8 +163,6 @@ namespace BulletSharp
|
|||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btDiscreteDynamicsWorld_getApplySpeculativeContactRestitution(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btDiscreteDynamicsWorld_getCollisionWorld(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btDiscreteDynamicsWorld_getLatencyMotionStateInterpolation(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
|
|
|
@ -151,6 +151,11 @@ btScalar btCollisionObject_getRollingFriction(btCollisionObject* obj)
|
|||
return obj->getRollingFriction();
|
||||
}
|
||||
|
||||
int btCollisionObject_getUniqueId(btCollisionObject * obj)
|
||||
{
|
||||
return obj->getUniqueId();
|
||||
}
|
||||
|
||||
int btCollisionObject_getUserIndex(btCollisionObject* obj)
|
||||
{
|
||||
return obj->getUserIndex();
|
||||
|
@ -345,6 +350,11 @@ void btCollisionObject_setRollingFriction(btCollisionObject* obj, btScalar frict
|
|||
obj->setRollingFriction(frict);
|
||||
}
|
||||
|
||||
void btCollisionObject_setUniqueId(btCollisionObject * obj, int id)
|
||||
{
|
||||
obj->setUniqueId(id);
|
||||
}
|
||||
|
||||
void btCollisionObject_setUserIndex(btCollisionObject* obj, int index)
|
||||
{
|
||||
obj->setUserIndex(index);
|
||||
|
|
|
@ -31,6 +31,7 @@ extern "C"
|
|||
EXPORT int btCollisionObject_getIslandTag(btCollisionObject* obj);
|
||||
EXPORT btScalar btCollisionObject_getRestitution(btCollisionObject* obj);
|
||||
EXPORT btScalar btCollisionObject_getRollingFriction(btCollisionObject* obj);
|
||||
EXPORT int btCollisionObject_getUniqueId(btCollisionObject* obj);
|
||||
EXPORT int btCollisionObject_getUserIndex(btCollisionObject* obj);
|
||||
EXPORT int btCollisionObject_getUserIndex2(btCollisionObject* obj);
|
||||
EXPORT void* btCollisionObject_getUserPointer(btCollisionObject* obj);
|
||||
|
@ -68,6 +69,7 @@ extern "C"
|
|||
EXPORT void btCollisionObject_setIslandTag(btCollisionObject* obj, int tag);
|
||||
EXPORT void btCollisionObject_setRestitution(btCollisionObject* obj, btScalar rest);
|
||||
EXPORT void btCollisionObject_setRollingFriction(btCollisionObject* obj, btScalar frict);
|
||||
EXPORT void btCollisionObject_setUniqueId(btCollisionObject* obj, int id);
|
||||
EXPORT void btCollisionObject_setUserIndex(btCollisionObject* obj, int index);
|
||||
EXPORT void btCollisionObject_setUserIndex2(btCollisionObject* obj, int index);
|
||||
EXPORT void btCollisionObject_setUserPointer(btCollisionObject* obj, void* userPointer);
|
||||
|
|
|
@ -292,6 +292,11 @@ btScalar btCollisionWorld_ContactResultCallback_addSingleResult(btCollisionWorld
|
|||
index1);
|
||||
}
|
||||
|
||||
btScalar btCollisionWorld_ContactResultCallback_getClosestDistanceThreshold(btCollisionWorld_ContactResultCallback* obj)
|
||||
{
|
||||
return obj->m_closestDistanceThreshold;
|
||||
}
|
||||
|
||||
short btCollisionWorld_ContactResultCallback_getCollisionFilterGroup(btCollisionWorld_ContactResultCallback* obj)
|
||||
{
|
||||
return obj->m_collisionFilterGroup;
|
||||
|
@ -308,6 +313,12 @@ bool btCollisionWorld_ContactResultCallback_needsCollision(btCollisionWorld_Cont
|
|||
return obj->needsCollision(proxy0);
|
||||
}
|
||||
|
||||
void btCollisionWorld_ContactResultCallback_setClosestDistanceThreshold(btCollisionWorld_ContactResultCallback* obj,
|
||||
btScalar value)
|
||||
{
|
||||
obj->m_closestDistanceThreshold = value;
|
||||
}
|
||||
|
||||
void btCollisionWorld_ContactResultCallback_setCollisionFilterGroup(btCollisionWorld_ContactResultCallback* obj,
|
||||
short value)
|
||||
{
|
||||
|
|
|
@ -117,9 +117,11 @@ extern "C"
|
|||
EXPORT bool btCollisionWorld_ContactResultCallbackWrapper_needsCollision(btCollisionWorld_ContactResultCallbackWrapper* obj, btBroadphaseProxy* proxy0);
|
||||
|
||||
EXPORT btScalar btCollisionWorld_ContactResultCallback_addSingleResult(btCollisionWorld_ContactResultCallback* obj, btManifoldPoint* cp, const btCollisionObjectWrapper* colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper* colObj1Wrap, int partId1, int index1);
|
||||
EXPORT btScalar btCollisionWorld_ContactResultCallback_getClosestDistanceThreshold(btCollisionWorld_ContactResultCallback* obj);
|
||||
EXPORT short btCollisionWorld_ContactResultCallback_getCollisionFilterGroup(btCollisionWorld_ContactResultCallback* obj);
|
||||
EXPORT short btCollisionWorld_ContactResultCallback_getCollisionFilterMask(btCollisionWorld_ContactResultCallback* obj);
|
||||
EXPORT bool btCollisionWorld_ContactResultCallback_needsCollision(btCollisionWorld_ContactResultCallback* obj, btBroadphaseProxy* proxy0);
|
||||
EXPORT void btCollisionWorld_ContactResultCallback_setClosestDistanceThreshold(btCollisionWorld_ContactResultCallback* obj, btScalar value);
|
||||
EXPORT void btCollisionWorld_ContactResultCallback_setCollisionFilterGroup(btCollisionWorld_ContactResultCallback* obj, short value);
|
||||
EXPORT void btCollisionWorld_ContactResultCallback_setCollisionFilterMask(btCollisionWorld_ContactResultCallback* obj, short value);
|
||||
EXPORT void btCollisionWorld_ContactResultCallback_delete(btCollisionWorld_ContactResultCallback* obj);
|
||||
|
|
|
@ -43,6 +43,11 @@ btScalar btManifoldResult_calculateCombinedRollingFriction(const btCollisionObje
|
|||
return btManifoldResult::calculateCombinedRollingFriction(body0, body1);
|
||||
}
|
||||
|
||||
btScalar btManifoldResult_getClosestPointDistanceThreshold(btManifoldResult * obj)
|
||||
{
|
||||
return obj->m_closestPointDistanceThreshold;
|
||||
}
|
||||
|
||||
const btCollisionObject* btManifoldResult_getBody0Internal(btManifoldResult* obj)
|
||||
{
|
||||
return obj->getBody0Internal();
|
||||
|
@ -83,6 +88,11 @@ void btManifoldResult_setBody1Wrap(btManifoldResult* obj, const btCollisionObjec
|
|||
obj->setBody1Wrap(obj1Wrap);
|
||||
}
|
||||
|
||||
void btManifoldResult_setClosestPointDistanceThreshold(btManifoldResult * obj, btScalar value)
|
||||
{
|
||||
obj->m_closestPointDistanceThreshold = value;
|
||||
}
|
||||
|
||||
void btManifoldResult_setPersistentManifold(btManifoldResult* obj, btPersistentManifold* manifoldPtr)
|
||||
{
|
||||
obj->setPersistentManifold(manifoldPtr);
|
||||
|
|
|
@ -9,6 +9,7 @@ extern "C"
|
|||
EXPORT btScalar btManifoldResult_calculateCombinedFriction(const btCollisionObject* body0, const btCollisionObject* body1);
|
||||
EXPORT btScalar btManifoldResult_calculateCombinedRestitution(const btCollisionObject* body0, const btCollisionObject* body1);
|
||||
EXPORT btScalar btManifoldResult_calculateCombinedRollingFriction(const btCollisionObject* body0, const btCollisionObject* body1);
|
||||
EXPORT btScalar btManifoldResult_getClosestPointDistanceThreshold(btManifoldResult* obj);
|
||||
EXPORT const btCollisionObject* btManifoldResult_getBody0Internal(btManifoldResult* obj);
|
||||
EXPORT const btCollisionObjectWrapper* btManifoldResult_getBody0Wrap(btManifoldResult* obj);
|
||||
EXPORT const btCollisionObject* btManifoldResult_getBody1Internal(btManifoldResult* obj);
|
||||
|
@ -17,5 +18,6 @@ extern "C"
|
|||
EXPORT void btManifoldResult_refreshContactPoints(btManifoldResult* obj);
|
||||
EXPORT void btManifoldResult_setBody0Wrap(btManifoldResult* obj, const btCollisionObjectWrapper* obj0Wrap);
|
||||
EXPORT void btManifoldResult_setBody1Wrap(btManifoldResult* obj, const btCollisionObjectWrapper* obj1Wrap);
|
||||
EXPORT void btManifoldResult_setClosestPointDistanceThreshold(btManifoldResult* obj, btScalar value);
|
||||
EXPORT void btManifoldResult_setPersistentManifold(btManifoldResult* obj, btPersistentManifold* manifoldPtr);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче