Merge pull request #49 from goncalo/missing-methods
Wrap some missing properties in DispatcherInfo and ContactSolverInfo
This commit is contained in:
Коммит
77dee2edd7
|
@ -17,9 +17,9 @@ namespace BulletSharp
|
|||
_shape = shape;
|
||||
}
|
||||
|
||||
public bool BuildHull(float margin)
|
||||
public bool BuildHull(float margin, int highRes = 0)
|
||||
{
|
||||
return btShapeHull_buildHull(Native, margin);
|
||||
return btShapeHull_buildHull(Native, margin, highRes);
|
||||
}
|
||||
|
||||
public IntPtr IndexPointer => btShapeHull_getIndexPointer(Native);
|
||||
|
|
|
@ -74,6 +74,12 @@ namespace BulletSharp
|
|||
set => btContactSolverInfoData_setGlobalCfm(Native, value);
|
||||
}
|
||||
|
||||
public float LeastSquaresResidualThreshold
|
||||
{
|
||||
get => btContactSolverInfoData_getLeastSquaresResidualThreshold(Native);
|
||||
set => btContactSolverInfoData_setLeastSquaresResidualThreshold(Native, value);
|
||||
}
|
||||
|
||||
public float LinearSlop
|
||||
{
|
||||
get => btContactSolverInfoData_getLinearSlop(Native);
|
||||
|
@ -116,6 +122,12 @@ namespace BulletSharp
|
|||
set => btContactSolverInfoData_setRestitution(Native, value);
|
||||
}
|
||||
|
||||
public float RestitutionVelocityThreshold
|
||||
{
|
||||
get => btContactSolverInfoData_getRestitutionVelocityThreshold(Native);
|
||||
set => btContactSolverInfoData_setRestitutionVelocityThreshold(Native, value);
|
||||
}
|
||||
|
||||
public float SingleAxisRollingFrictionThreshold
|
||||
{
|
||||
get => btContactSolverInfoData_getSingleAxisRollingFrictionThreshold(Native);
|
||||
|
|
|
@ -1386,6 +1386,8 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btContactSolverInfoData_getGlobalCfm(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btContactSolverInfoData_getLeastSquaresResidualThreshold(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btContactSolverInfoData_getLinearSlop(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btContactSolverInfoData_getMaxErrorReduction(IntPtr obj);
|
||||
|
@ -1400,6 +1402,8 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btContactSolverInfoData_getRestitution(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btContactSolverInfoData_getRestitutionVelocityThreshold(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btContactSolverInfoData_getSingleAxisRollingFrictionThreshold(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern SolverModes btContactSolverInfoData_getSolverMode(IntPtr obj);
|
||||
|
@ -1432,6 +1436,8 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btContactSolverInfoData_setGlobalCfm(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btContactSolverInfoData_setLeastSquaresResidualThreshold(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btContactSolverInfoData_setLinearSlop(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btContactSolverInfoData_setMaxErrorReduction(IntPtr obj, float value);
|
||||
|
@ -1446,6 +1452,8 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btContactSolverInfoData_setRestitution(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btContactSolverInfoData_setRestitutionVelocityThreshold(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btContactSolverInfoData_setSingleAxisRollingFrictionThreshold(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btContactSolverInfoData_setSolverMode(IntPtr obj, SolverModes value);
|
||||
|
@ -4923,7 +4931,7 @@ namespace BulletSharp
|
|||
public static extern IntPtr btShapeHull_new(IntPtr shape);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool btShapeHull_buildHull(IntPtr obj, float margin);
|
||||
public static extern bool btShapeHull_buildHull(IntPtr obj, float margin, int highRes);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btShapeHull_getIndexPointer(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
|
|
|
@ -42,6 +42,11 @@ btScalar btContactSolverInfoData_getGlobalCfm(btContactSolverInfoData* obj)
|
|||
return obj->m_globalCfm;
|
||||
}
|
||||
|
||||
btScalar btContactSolverInfoData_getLeastSquaresResidualThreshold(btContactSolverInfoData* obj)
|
||||
{
|
||||
return obj->m_leastSquaresResidualThreshold;
|
||||
}
|
||||
|
||||
btScalar btContactSolverInfoData_getLinearSlop(btContactSolverInfoData* obj)
|
||||
{
|
||||
return obj->m_linearSlop;
|
||||
|
@ -77,6 +82,11 @@ btScalar btContactSolverInfoData_getRestitution(btContactSolverInfoData* obj)
|
|||
return obj->m_restitution;
|
||||
}
|
||||
|
||||
btScalar btContactSolverInfoData_getRestitutionVelocityThreshold(btContactSolverInfoData* obj)
|
||||
{
|
||||
return obj->m_restitutionVelocityThreshold;
|
||||
}
|
||||
|
||||
btScalar btContactSolverInfoData_getSingleAxisRollingFrictionThreshold(btContactSolverInfoData* obj)
|
||||
{
|
||||
return obj->m_singleAxisRollingFrictionThreshold;
|
||||
|
@ -157,6 +167,11 @@ void btContactSolverInfoData_setGlobalCfm(btContactSolverInfoData* obj, btScalar
|
|||
obj->m_globalCfm = value;
|
||||
}
|
||||
|
||||
void btContactSolverInfoData_setLeastSquaresResidualThreshold(btContactSolverInfoData* obj, btScalar value)
|
||||
{
|
||||
obj->m_leastSquaresResidualThreshold = value;
|
||||
}
|
||||
|
||||
void btContactSolverInfoData_setLinearSlop(btContactSolverInfoData* obj, btScalar value)
|
||||
{
|
||||
obj->m_linearSlop = value;
|
||||
|
@ -195,6 +210,11 @@ void btContactSolverInfoData_setRestitution(btContactSolverInfoData* obj, btScal
|
|||
obj->m_restitution = value;
|
||||
}
|
||||
|
||||
void btContactSolverInfoData_setRestitutionVelocityThreshold(btContactSolverInfoData* obj, btScalar value)
|
||||
{
|
||||
obj->m_restitutionVelocityThreshold = value;
|
||||
}
|
||||
|
||||
void btContactSolverInfoData_setSingleAxisRollingFrictionThreshold(btContactSolverInfoData* obj,
|
||||
btScalar value)
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ extern "C" {
|
|||
EXPORT btScalar btContactSolverInfoData_getFrictionCfm(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getFrictionErp(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getGlobalCfm(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getLeastSquaresResidualThreshold(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getLinearSlop(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getMaxErrorReduction(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getMaxGyroscopicForce(btContactSolverInfoData* obj);
|
||||
|
@ -18,6 +19,7 @@ extern "C" {
|
|||
EXPORT int btContactSolverInfoData_getNumIterations(btContactSolverInfoData* obj);
|
||||
EXPORT int btContactSolverInfoData_getRestingContactRestitutionThreshold(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getRestitution(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getRestitutionVelocityThreshold(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getSingleAxisRollingFrictionThreshold(btContactSolverInfoData* obj);
|
||||
EXPORT int btContactSolverInfoData_getSolverMode(btContactSolverInfoData* obj);
|
||||
EXPORT btScalar btContactSolverInfoData_getSor(btContactSolverInfoData* obj);
|
||||
|
@ -34,6 +36,7 @@ extern "C" {
|
|||
EXPORT void btContactSolverInfoData_setFrictionCfm(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setFrictionErp(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setGlobalCfm(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setLeastSquaresResidualThreshold(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setLinearSlop(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setMaxErrorReduction(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setMaxGyroscopicForce(btContactSolverInfoData* obj, btScalar value);
|
||||
|
@ -41,6 +44,7 @@ extern "C" {
|
|||
EXPORT void btContactSolverInfoData_setNumIterations(btContactSolverInfoData* obj, int value);
|
||||
EXPORT void btContactSolverInfoData_setRestingContactRestitutionThreshold(btContactSolverInfoData* obj, int value);
|
||||
EXPORT void btContactSolverInfoData_setRestitution(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setRestitutionVelocityThreshold(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setSingleAxisRollingFrictionThreshold(btContactSolverInfoData* obj, btScalar value);
|
||||
EXPORT void btContactSolverInfoData_setSolverMode(btContactSolverInfoData* obj, int value);
|
||||
EXPORT void btContactSolverInfoData_setSor(btContactSolverInfoData* obj, btScalar value);
|
||||
|
|
|
@ -24,6 +24,11 @@ btIDebugDraw* btDispatcherInfo_getDebugDraw(btDispatcherInfo* obj)
|
|||
return obj->m_debugDraw;
|
||||
}
|
||||
|
||||
bool btDispatcherInfo_getDeterministicOverlappingPairs(btDispatcherInfo* obj)
|
||||
{
|
||||
return obj->m_deterministicOverlappingPairs;
|
||||
}
|
||||
|
||||
int btDispatcherInfo_getDispatchFunc(btDispatcherInfo* obj)
|
||||
{
|
||||
return obj->m_dispatchFunc;
|
||||
|
@ -85,6 +90,11 @@ void btDispatcherInfo_setDebugDraw(btDispatcherInfo* obj, btIDebugDraw* value)
|
|||
obj->m_debugDraw = value;
|
||||
}
|
||||
|
||||
void btDispatcherInfo_setDeterministicOverlappingPairs(btDispatcherInfo* obj, bool value)
|
||||
{
|
||||
obj->m_deterministicOverlappingPairs = value;
|
||||
}
|
||||
|
||||
void btDispatcherInfo_setDispatchFunc(btDispatcherInfo* obj, int value)
|
||||
{
|
||||
obj->m_dispatchFunc = value;
|
||||
|
|
|
@ -6,6 +6,7 @@ extern "C" {
|
|||
EXPORT btScalar btDispatcherInfo_getAllowedCcdPenetration(btDispatcherInfo* obj);
|
||||
EXPORT btScalar btDispatcherInfo_getConvexConservativeDistanceThreshold(btDispatcherInfo* obj);
|
||||
EXPORT btIDebugDraw* btDispatcherInfo_getDebugDraw(btDispatcherInfo* obj);
|
||||
EXPORT bool btDispatcherInfo_getDeterministicOverlappingPairs(btDispatcherInfo* obj);
|
||||
EXPORT int btDispatcherInfo_getDispatchFunc(btDispatcherInfo* obj);
|
||||
EXPORT bool btDispatcherInfo_getEnableSatConvex(btDispatcherInfo* obj);
|
||||
EXPORT bool btDispatcherInfo_getEnableSPU(btDispatcherInfo* obj);
|
||||
|
@ -18,6 +19,7 @@ extern "C" {
|
|||
EXPORT void btDispatcherInfo_setAllowedCcdPenetration(btDispatcherInfo* obj, btScalar value);
|
||||
EXPORT void btDispatcherInfo_setConvexConservativeDistanceThreshold(btDispatcherInfo* obj, btScalar value);
|
||||
EXPORT void btDispatcherInfo_setDebugDraw(btDispatcherInfo* obj, btIDebugDraw* value);
|
||||
EXPORT void btDispatcherInfo_setDeterministicOverlappingPairs(btDispatcherInfo* obj, bool value);
|
||||
EXPORT void btDispatcherInfo_setDispatchFunc(btDispatcherInfo* obj, int value);
|
||||
EXPORT void btDispatcherInfo_setEnableSatConvex(btDispatcherInfo* obj, bool value);
|
||||
EXPORT void btDispatcherInfo_setEnableSPU(btDispatcherInfo* obj, bool value);
|
||||
|
|
|
@ -7,9 +7,9 @@ btShapeHull* btShapeHull_new(const btConvexShape* shape)
|
|||
return ALIGNED_NEW(btShapeHull)(shape);
|
||||
}
|
||||
|
||||
bool btShapeHull_buildHull(btShapeHull* obj, btScalar margin)
|
||||
bool btShapeHull_buildHull(btShapeHull* obj, btScalar margin, int highRes)
|
||||
{
|
||||
return obj->buildHull(margin);
|
||||
return obj->buildHull(margin, highRes);
|
||||
}
|
||||
|
||||
const unsigned int* btShapeHull_getIndexPointer(btShapeHull* obj)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
EXPORT btShapeHull* btShapeHull_new(const btConvexShape* shape);
|
||||
EXPORT bool btShapeHull_buildHull(btShapeHull* obj, btScalar margin);
|
||||
EXPORT bool btShapeHull_buildHull(btShapeHull* obj, btScalar margin, int highRes);
|
||||
EXPORT const unsigned int* btShapeHull_getIndexPointer(btShapeHull* obj);
|
||||
EXPORT const btVector3* btShapeHull_getVertexPointer(btShapeHull* obj);
|
||||
EXPORT int btShapeHull_numIndices(btShapeHull* obj);
|
||||
|
|
Загрузка…
Ссылка в новой задаче