GIMPACT cleanup
This commit is contained in:
Родитель
343abae7fc
Коммит
d4d99323b9
|
@ -24,14 +24,14 @@ namespace BulletSharp
|
|||
|
||||
public int Index1
|
||||
{
|
||||
get { return UnsafeNativeMethods.GIM_PAIR_getIndex1(Native); }
|
||||
set { UnsafeNativeMethods.GIM_PAIR_setIndex1(Native, value); }
|
||||
get => UnsafeNativeMethods.GIM_PAIR_getIndex1(Native);
|
||||
set => UnsafeNativeMethods.GIM_PAIR_setIndex1(Native, value);
|
||||
}
|
||||
|
||||
public int Index2
|
||||
{
|
||||
get { return UnsafeNativeMethods.GIM_PAIR_getIndex2(Native); }
|
||||
set { UnsafeNativeMethods.GIM_PAIR_setIndex2(Native, value); }
|
||||
get => UnsafeNativeMethods.GIM_PAIR_getIndex2(Native);
|
||||
set => UnsafeNativeMethods.GIM_PAIR_setIndex2(Native, value);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
@ -113,14 +113,14 @@ namespace BulletSharp
|
|||
|
||||
public Aabb Bound
|
||||
{
|
||||
get { return new Aabb(UnsafeNativeMethods.GIM_BVH_DATA_getBound(Native)); }
|
||||
set { UnsafeNativeMethods.GIM_BVH_DATA_setBound(Native, value.Native); }
|
||||
get => new Aabb(UnsafeNativeMethods.GIM_BVH_DATA_getBound(Native));
|
||||
set => UnsafeNativeMethods.GIM_BVH_DATA_setBound(Native, value.Native);
|
||||
}
|
||||
|
||||
public int Data
|
||||
{
|
||||
get { return UnsafeNativeMethods.GIM_BVH_DATA_getData(Native); }
|
||||
set { UnsafeNativeMethods.GIM_BVH_DATA_setData(Native, value); }
|
||||
get => UnsafeNativeMethods.GIM_BVH_DATA_getData(Native);
|
||||
set => UnsafeNativeMethods.GIM_BVH_DATA_setData(Native, value);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
@ -163,27 +163,23 @@ namespace BulletSharp
|
|||
|
||||
public Aabb Bound
|
||||
{
|
||||
get { return new Aabb(UnsafeNativeMethods.GIM_BVH_TREE_NODE_getBound(Native)); }
|
||||
set { UnsafeNativeMethods.GIM_BVH_TREE_NODE_setBound(Native, value.Native); }
|
||||
get => new Aabb(UnsafeNativeMethods.GIM_BVH_TREE_NODE_getBound(Native));
|
||||
set => UnsafeNativeMethods.GIM_BVH_TREE_NODE_setBound(Native, value.Native);
|
||||
}
|
||||
|
||||
public int DataIndex
|
||||
{
|
||||
get { return UnsafeNativeMethods.GIM_BVH_TREE_NODE_getDataIndex(Native); }
|
||||
set { UnsafeNativeMethods.GIM_BVH_TREE_NODE_setDataIndex(Native, value); }
|
||||
get => UnsafeNativeMethods.GIM_BVH_TREE_NODE_getDataIndex(Native);
|
||||
set => UnsafeNativeMethods.GIM_BVH_TREE_NODE_setDataIndex(Native, value);
|
||||
}
|
||||
|
||||
public int EscapeIndex
|
||||
{
|
||||
get { return UnsafeNativeMethods.GIM_BVH_TREE_NODE_getEscapeIndex(Native); }
|
||||
set { UnsafeNativeMethods.GIM_BVH_TREE_NODE_setEscapeIndex(Native, value); }
|
||||
}
|
||||
|
||||
public bool IsLeafNode
|
||||
{
|
||||
get { return UnsafeNativeMethods.GIM_BVH_TREE_NODE_isLeafNode(Native); }
|
||||
get => UnsafeNativeMethods.GIM_BVH_TREE_NODE_getEscapeIndex(Native);
|
||||
set => UnsafeNativeMethods.GIM_BVH_TREE_NODE_setEscapeIndex(Native, value);
|
||||
}
|
||||
|
||||
public bool IsLeafNode => UnsafeNativeMethods.GIM_BVH_TREE_NODE_isLeafNode(Native);
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
|
@ -306,10 +302,7 @@ namespace BulletSharp
|
|||
UnsafeNativeMethods.btBvhTree_setNodeBound(_native, nodeIndex, bound.Native);
|
||||
}
|
||||
|
||||
public int NodeCount
|
||||
{
|
||||
get { return UnsafeNativeMethods.btBvhTree_getNodeCount(_native); }
|
||||
}
|
||||
public int NodeCount => UnsafeNativeMethods.btBvhTree_getNodeCount(_native);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
@ -351,15 +344,9 @@ namespace BulletSharp
|
|||
UnsafeNativeMethods.btPrimitiveManagerBase_get_primitive_triangle(Native, primitiveIndex, triangle.Native);
|
||||
}
|
||||
|
||||
public bool IsTrimesh
|
||||
{
|
||||
get { return UnsafeNativeMethods.btPrimitiveManagerBase_is_trimesh(Native); }
|
||||
}
|
||||
public bool IsTrimesh => UnsafeNativeMethods.btPrimitiveManagerBase_is_trimesh(Native);
|
||||
|
||||
public int PrimitiveCount
|
||||
{
|
||||
get { return UnsafeNativeMethods.btPrimitiveManagerBase_get_primitive_count(Native); }
|
||||
}
|
||||
public int PrimitiveCount => UnsafeNativeMethods.btPrimitiveManagerBase_get_primitive_count(Native);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
@ -482,30 +469,18 @@ namespace BulletSharp
|
|||
UnsafeNativeMethods.btGImpactBvh_update(_native);
|
||||
}
|
||||
|
||||
public Aabb GlobalBox
|
||||
{
|
||||
get { return new Aabb(UnsafeNativeMethods.btGImpactBvh_getGlobalBox(_native)); }
|
||||
}
|
||||
public Aabb GlobalBox => new Aabb(UnsafeNativeMethods.btGImpactBvh_getGlobalBox(_native));
|
||||
|
||||
public bool HasHierarchy
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactBvh_hasHierarchy(_native); }
|
||||
}
|
||||
public bool HasHierarchy => UnsafeNativeMethods.btGImpactBvh_hasHierarchy(_native);
|
||||
|
||||
public bool IsTrimesh
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactBvh_isTrimesh(_native); }
|
||||
}
|
||||
public bool IsTrimesh => UnsafeNativeMethods.btGImpactBvh_isTrimesh(_native);
|
||||
|
||||
public int NodeCount
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactBvh_getNodeCount(_native); }
|
||||
}
|
||||
public int NodeCount => UnsafeNativeMethods.btGImpactBvh_getNodeCount(_native);
|
||||
|
||||
public PrimitiveManagerBase PrimitiveManager
|
||||
{
|
||||
get { return new PrimitiveManagerBase(UnsafeNativeMethods.btGImpactBvh_getPrimitiveManager(_native)); }
|
||||
set { UnsafeNativeMethods.btGImpactBvh_setPrimitiveManager(_native, value.Native); }
|
||||
get => new PrimitiveManagerBase(UnsafeNativeMethods.btGImpactBvh_getPrimitiveManager(_native));
|
||||
set => UnsafeNativeMethods.btGImpactBvh_setPrimitiveManager(_native, value.Native);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
|
@ -75,26 +75,26 @@ namespace BulletSharp
|
|||
|
||||
public int Face0
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactCollisionAlgorithm_getFace0(_native); }
|
||||
set { UnsafeNativeMethods.btGImpactCollisionAlgorithm_setFace0(_native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactCollisionAlgorithm_getFace0(_native);
|
||||
set => UnsafeNativeMethods.btGImpactCollisionAlgorithm_setFace0(_native, value);
|
||||
}
|
||||
|
||||
public int Face1
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactCollisionAlgorithm_getFace1(_native); }
|
||||
set { UnsafeNativeMethods.btGImpactCollisionAlgorithm_setFace1(_native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactCollisionAlgorithm_getFace1(_native);
|
||||
set => UnsafeNativeMethods.btGImpactCollisionAlgorithm_setFace1(_native, value);
|
||||
}
|
||||
|
||||
public int Part0
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactCollisionAlgorithm_getPart0(_native); }
|
||||
set { UnsafeNativeMethods.btGImpactCollisionAlgorithm_setPart0(_native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactCollisionAlgorithm_getPart0(_native);
|
||||
set => UnsafeNativeMethods.btGImpactCollisionAlgorithm_setPart0(_native, value);
|
||||
}
|
||||
|
||||
public int Part1
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactCollisionAlgorithm_getPart1(_native); }
|
||||
set { UnsafeNativeMethods.btGImpactCollisionAlgorithm_setPart1(_native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactCollisionAlgorithm_getPart1(_native);
|
||||
set => UnsafeNativeMethods.btGImpactCollisionAlgorithm_setPart1(_native, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,35 +24,32 @@ namespace BulletSharp
|
|||
|
||||
public int DataIndex
|
||||
{
|
||||
get { return UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getDataIndex(_native); }
|
||||
set { UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_setDataIndex(_native, value); }
|
||||
get => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getDataIndex(_native);
|
||||
set => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_setDataIndex(_native, value);
|
||||
}
|
||||
|
||||
public int EscapeIndex
|
||||
{
|
||||
get { return UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getEscapeIndex(_native); }
|
||||
set { UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_setEscapeIndex(_native, value); }
|
||||
get => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getEscapeIndex(_native);
|
||||
set => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_setEscapeIndex(_native, value);
|
||||
}
|
||||
|
||||
public int EscapeIndexOrDataIndex
|
||||
{
|
||||
get { return UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getEscapeIndexOrDataIndex(_native); }
|
||||
set { UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_setEscapeIndexOrDataIndex(_native, value); }
|
||||
get => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getEscapeIndexOrDataIndex(_native);
|
||||
set => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_setEscapeIndexOrDataIndex(_native, value);
|
||||
}
|
||||
|
||||
public bool IsLeafNode
|
||||
{
|
||||
get { return UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_isLeafNode(_native); }
|
||||
}
|
||||
public bool IsLeafNode => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_isLeafNode(_native);
|
||||
/*
|
||||
public UShortArray QuantizedAabbMax
|
||||
{
|
||||
get { return UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getQuantizedAabbMax(_native); }
|
||||
get => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getQuantizedAabbMax(_native);
|
||||
}
|
||||
|
||||
public UShortArray QuantizedAabbMin
|
||||
{
|
||||
get { return UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getQuantizedAabbMin(_native); }
|
||||
get => UnsafeNativeMethods.BT_QUANTIZED_BVH_NODE_getQuantizedAabbMin(_native);
|
||||
}
|
||||
*/
|
||||
public void Dispose()
|
||||
|
@ -166,10 +163,7 @@ namespace BulletSharp
|
|||
return UnsafeNativeMethods.btQuantizedBvhTree_testQuantizedBoxOverlapp(_native, nodeIndex, quantizedMin, quantizedMax);
|
||||
}
|
||||
|
||||
public int NodeCount
|
||||
{
|
||||
get { return UnsafeNativeMethods.btQuantizedBvhTree_getNodeCount(_native); }
|
||||
}
|
||||
public int NodeCount => UnsafeNativeMethods.btQuantizedBvhTree_getNodeCount(_native);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
@ -293,29 +287,17 @@ namespace BulletSharp
|
|||
UnsafeNativeMethods.btGImpactQuantizedBvh_update(_native);
|
||||
}
|
||||
|
||||
public Aabb GlobalBox
|
||||
{
|
||||
get { return new Aabb(UnsafeNativeMethods.btGImpactQuantizedBvh_getGlobalBox(_native)); }
|
||||
}
|
||||
public Aabb GlobalBox => new Aabb(UnsafeNativeMethods.btGImpactQuantizedBvh_getGlobalBox(_native));
|
||||
|
||||
public bool HasHierarchy
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactQuantizedBvh_hasHierarchy(_native); }
|
||||
}
|
||||
public bool HasHierarchy => UnsafeNativeMethods.btGImpactQuantizedBvh_hasHierarchy(_native);
|
||||
|
||||
public bool IsTrimesh
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactQuantizedBvh_isTrimesh(_native); }
|
||||
}
|
||||
public bool IsTrimesh => UnsafeNativeMethods.btGImpactQuantizedBvh_isTrimesh(_native);
|
||||
|
||||
public int NodeCount
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactQuantizedBvh_getNodeCount(_native); }
|
||||
}
|
||||
public int NodeCount => UnsafeNativeMethods.btGImpactQuantizedBvh_getNodeCount(_native);
|
||||
|
||||
public PrimitiveManagerBase PrimitiveManager
|
||||
{
|
||||
get { return _primitiveManager; }
|
||||
get => _primitiveManager;
|
||||
set
|
||||
{
|
||||
UnsafeNativeMethods.btGImpactQuantizedBvh_setPrimitiveManager(_native, value.Native);
|
||||
|
|
|
@ -2,7 +2,6 @@ using BulletSharp.Math;
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace BulletSharp
|
||||
{
|
||||
|
@ -16,203 +15,125 @@ namespace BulletSharp
|
|||
public class TetrahedronShapeEx : BuSimplex1To4
|
||||
{
|
||||
public TetrahedronShapeEx()
|
||||
: base(btTetrahedronShapeEx_new())
|
||||
: base(UnsafeNativeMethods.btTetrahedronShapeEx_new())
|
||||
{
|
||||
}
|
||||
|
||||
public void SetVertices(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 v3)
|
||||
{
|
||||
btTetrahedronShapeEx_setVertices(_native, ref v0, ref v1, ref v2, ref v3);
|
||||
UnsafeNativeMethods.btTetrahedronShapeEx_setVertices(_native, ref v0, ref v1, ref v2, ref v3);
|
||||
}
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btTetrahedronShapeEx_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btTetrahedronShapeEx_setVertices(IntPtr obj, [In] ref Vector3 v0, [In] ref Vector3 v1, [In] ref Vector3 v2, [In] ref Vector3 v3);
|
||||
}
|
||||
|
||||
public abstract class GImpactShapeInterface : ConcaveShape
|
||||
{
|
||||
protected List<CollisionShape> _childShapes = new List<CollisionShape>();
|
||||
|
||||
internal GImpactShapeInterface(IntPtr native)
|
||||
: base(native)
|
||||
{
|
||||
}
|
||||
|
||||
public void GetBulletTetrahedron(int primIndex, TetrahedronShapeEx tetrahedron)
|
||||
public void GetBulletTetrahedron(int primitiveIndex, TetrahedronShapeEx tetrahedron)
|
||||
{
|
||||
btGImpactShapeInterface_getBulletTetrahedron(_native, primIndex, tetrahedron._native);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_getBulletTetrahedron(_native, primitiveIndex, tetrahedron._native);
|
||||
}
|
||||
|
||||
public void GetBulletTriangle(int primIndex, TriangleShapeEx triangle)
|
||||
public void GetBulletTriangle(int primitiveIndex, TriangleShapeEx triangle)
|
||||
{
|
||||
btGImpactShapeInterface_getBulletTriangle(_native, primIndex, triangle._native);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_getBulletTriangle(_native, primitiveIndex, triangle._native);
|
||||
}
|
||||
|
||||
public void GetChildAabb(int childIndex, Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
|
||||
public void GetChildAabb(int childIndex, Matrix transform, out Vector3 aabbMin, out Vector3 aabbMax)
|
||||
{
|
||||
btGImpactShapeInterface_getChildAabb(_native, childIndex, ref t, out aabbMin,
|
||||
out aabbMax);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_getChildAabb(_native, childIndex, ref transform,
|
||||
out aabbMin, out aabbMax);
|
||||
}
|
||||
|
||||
public CollisionShape GetChildShape(int index)
|
||||
{
|
||||
return _childShapes[index];
|
||||
}
|
||||
public abstract CollisionShape GetChildShape(int index);
|
||||
|
||||
public Matrix GetChildTransform(int index)
|
||||
{
|
||||
Matrix value;
|
||||
btGImpactShapeInterface_getChildTransform(_native, index, out value);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_getChildTransform(_native, index, out value);
|
||||
return value;
|
||||
}
|
||||
|
||||
public void GetPrimitiveTriangle(int index, PrimitiveTriangle triangle)
|
||||
{
|
||||
btGImpactShapeInterface_getPrimitiveTriangle(_native, index, triangle.Native);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_getPrimitiveTriangle(_native, index, triangle.Native);
|
||||
}
|
||||
|
||||
public void LockChildShapes()
|
||||
{
|
||||
btGImpactShapeInterface_lockChildShapes(_native);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_lockChildShapes(_native);
|
||||
}
|
||||
|
||||
public void PostUpdate()
|
||||
{
|
||||
btGImpactShapeInterface_postUpdate(_native);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_postUpdate(_native);
|
||||
}
|
||||
|
||||
public void ProcessAllTrianglesRayRef(TriangleCallback cb, ref Vector3 rayFrom,
|
||||
public void ProcessAllTrianglesRayRef(TriangleCallback callback, ref Vector3 rayFrom,
|
||||
ref Vector3 rayTo)
|
||||
{
|
||||
btGImpactShapeInterface_processAllTrianglesRay(_native, cb._native,
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_processAllTrianglesRay(_native, callback._native,
|
||||
ref rayFrom, ref rayTo);
|
||||
}
|
||||
|
||||
public void ProcessAllTrianglesRay(TriangleCallback cb, Vector3 rayFrom,
|
||||
public void ProcessAllTrianglesRay(TriangleCallback callback, Vector3 rayFrom,
|
||||
Vector3 rayTo)
|
||||
{
|
||||
btGImpactShapeInterface_processAllTrianglesRay(_native, cb._native,
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_processAllTrianglesRay(_native, callback._native,
|
||||
ref rayFrom, ref rayTo);
|
||||
}
|
||||
|
||||
public void RayTestRef(ref Vector3 rayFrom, ref Vector3 rayTo, RayResultCallback resultCallback)
|
||||
{
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_rayTest(_native, ref rayFrom, ref rayTo, resultCallback._native);
|
||||
}
|
||||
|
||||
public void RayTest(Vector3 rayFrom, Vector3 rayTo, RayResultCallback resultCallback)
|
||||
{
|
||||
btGImpactShapeInterface_rayTest(_native, ref rayFrom, ref rayTo, resultCallback._native);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_rayTest(_native, ref rayFrom, ref rayTo, resultCallback._native);
|
||||
}
|
||||
|
||||
public void SetChildTransform(int index, Matrix transform)
|
||||
{
|
||||
btGImpactShapeInterface_setChildTransform(_native, index, ref transform);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_setChildTransform(_native, index, ref transform);
|
||||
}
|
||||
|
||||
public void UnlockChildShapes()
|
||||
{
|
||||
btGImpactShapeInterface_unlockChildShapes(_native);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_unlockChildShapes(_native);
|
||||
}
|
||||
|
||||
public void UpdateBound()
|
||||
{
|
||||
btGImpactShapeInterface_updateBound(_native);
|
||||
UnsafeNativeMethods.btGImpactShapeInterface_updateBound(_native);
|
||||
}
|
||||
/*
|
||||
public GImpactBoxSet BoxSet
|
||||
{
|
||||
get { return btGImpactShapeInterface_getBoxSet(_native); }
|
||||
get { return UnsafeNativeMethods.btGImpactShapeInterface_getBoxSet(_native); }
|
||||
}
|
||||
*/
|
||||
public bool ChildrenHasTransform
|
||||
{
|
||||
get{return btGImpactShapeInterface_childrenHasTransform(_native);}
|
||||
}
|
||||
public bool ChildrenHasTransform => UnsafeNativeMethods.btGImpactShapeInterface_childrenHasTransform(_native);
|
||||
|
||||
public GImpactShapeType GImpactShapeType
|
||||
{
|
||||
get { return btGImpactShapeInterface_getGImpactShapeType(_native); }
|
||||
}
|
||||
public abstract GImpactShapeType GImpactShapeType { get; }
|
||||
|
||||
public bool HasBoxSet
|
||||
{
|
||||
get { return btGImpactShapeInterface_hasBoxSet(_native); }
|
||||
}
|
||||
public bool HasBoxSet => UnsafeNativeMethods.btGImpactShapeInterface_hasBoxSet(_native);
|
||||
|
||||
public Aabb LocalBox
|
||||
{
|
||||
get { return new Aabb(btGImpactShapeInterface_getLocalBox(_native)); }
|
||||
}
|
||||
public Aabb LocalBox => new Aabb(UnsafeNativeMethods.btGImpactShapeInterface_getLocalBox(_native));
|
||||
|
||||
public bool NeedsRetrieveTetrahedrons
|
||||
{
|
||||
get { return btGImpactShapeInterface_needsRetrieveTetrahedrons(_native); }
|
||||
}
|
||||
public bool NeedsRetrieveTetrahedrons => UnsafeNativeMethods.btGImpactShapeInterface_needsRetrieveTetrahedrons(_native);
|
||||
|
||||
public bool NeedsRetrieveTriangles
|
||||
{
|
||||
get { return btGImpactShapeInterface_needsRetrieveTriangles(_native); }
|
||||
}
|
||||
public bool NeedsRetrieveTriangles => UnsafeNativeMethods.btGImpactShapeInterface_needsRetrieveTriangles(_native);
|
||||
|
||||
public int NumChildShapes
|
||||
{
|
||||
get { return btGImpactShapeInterface_getNumChildShapes(_native); }
|
||||
}
|
||||
public int NumChildShapes => UnsafeNativeMethods.btGImpactShapeInterface_getNumChildShapes(_native);
|
||||
|
||||
public abstract PrimitiveManagerBase PrimitiveManager
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btGImpactShapeInterface_childrenHasTransform(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactShapeInterface_getBoxSet(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_getBulletTetrahedron(IntPtr obj, int prim_index, IntPtr tetrahedron);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_getBulletTriangle(IntPtr obj, int prim_index, IntPtr triangle);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_getChildAabb(IntPtr obj, int child_index, [In] ref Matrix t, out Vector3 aabbMin, out Vector3 aabbMax);
|
||||
//[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
//static extern IntPtr btGImpactShapeInterface_getChildShape(IntPtr obj, int index);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_getChildTransform(IntPtr obj, int index, out Matrix value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern GImpactShapeType btGImpactShapeInterface_getGImpactShapeType(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactShapeInterface_getLocalBox(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btGImpactShapeInterface_getNumChildShapes(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactShapeInterface_getPrimitiveManager(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_getPrimitiveTriangle(IntPtr obj, int index, IntPtr triangle);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btGImpactShapeInterface_hasBoxSet(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_lockChildShapes(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btGImpactShapeInterface_needsRetrieveTetrahedrons(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btGImpactShapeInterface_needsRetrieveTriangles(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_postUpdate(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_processAllTrianglesRay(IntPtr obj, IntPtr __unnamed0, [In] ref Vector3 __unnamed1, [In] ref Vector3 __unnamed2);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_rayTest(IntPtr obj, [In] ref Vector3 rayFrom, [In] ref Vector3 rayTo, IntPtr resultCallback);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_setChildTransform(IntPtr obj, int index, [In] ref Matrix transform);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_unlockChildShapes(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactShapeInterface_updateBound(IntPtr obj);
|
||||
public abstract PrimitiveManagerBase PrimitiveManager { get; }
|
||||
}
|
||||
|
||||
public class CompoundPrimitiveManager : PrimitiveManagerBase
|
||||
public sealed class CompoundPrimitiveManager : PrimitiveManagerBase
|
||||
{
|
||||
internal CompoundPrimitiveManager(IntPtr native, GImpactCompoundShape compoundShape)
|
||||
: base(native)
|
||||
|
@ -226,6 +147,7 @@ namespace BulletSharp
|
|||
public class GImpactCompoundShape : GImpactShapeInterface
|
||||
{
|
||||
private CompoundPrimitiveManager _compoundPrimitiveManager;
|
||||
private List<CollisionShape> _childShapes = new List<CollisionShape>();
|
||||
|
||||
internal GImpactCompoundShape(IntPtr native)
|
||||
: base(native)
|
||||
|
@ -233,50 +155,46 @@ namespace BulletSharp
|
|||
}
|
||||
|
||||
public GImpactCompoundShape(bool childrenHasTransform = true)
|
||||
: base(btGImpactCompoundShape_new(childrenHasTransform))
|
||||
: base(UnsafeNativeMethods.btGImpactCompoundShape_new(childrenHasTransform))
|
||||
{
|
||||
}
|
||||
|
||||
public void AddChildShape(Matrix localTransform, CollisionShape shape)
|
||||
{
|
||||
_childShapes.Add(shape);
|
||||
btGImpactCompoundShape_addChildShape(_native, ref localTransform, shape._native);
|
||||
UnsafeNativeMethods.btGImpactCompoundShape_addChildShape(_native, ref localTransform, shape._native);
|
||||
}
|
||||
|
||||
public void AddChildShape(CollisionShape shape)
|
||||
{
|
||||
_childShapes.Add(shape);
|
||||
btGImpactCompoundShape_addChildShape2(_native, shape._native);
|
||||
UnsafeNativeMethods.btGImpactCompoundShape_addChildShape2(_native, shape._native);
|
||||
}
|
||||
|
||||
public override PrimitiveManagerBase PrimitiveManager
|
||||
public override CollisionShape GetChildShape(int index)
|
||||
{
|
||||
get { return CompoundPrimitiveManager; }
|
||||
return _childShapes[index];
|
||||
}
|
||||
|
||||
public override PrimitiveManagerBase PrimitiveManager => CompoundPrimitiveManager;
|
||||
|
||||
public CompoundPrimitiveManager CompoundPrimitiveManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_compoundPrimitiveManager == null)
|
||||
{
|
||||
_compoundPrimitiveManager = new CompoundPrimitiveManager(btGImpactCompoundShape_getCompoundPrimitiveManager(_native), this);
|
||||
_compoundPrimitiveManager = new CompoundPrimitiveManager(
|
||||
UnsafeNativeMethods.btGImpactCompoundShape_getCompoundPrimitiveManager(_native), this);
|
||||
}
|
||||
return _compoundPrimitiveManager;
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactCompoundShape_new(bool children_has_transform);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactCompoundShape_addChildShape(IntPtr obj, [In] ref Matrix localTransform, IntPtr shape);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactCompoundShape_addChildShape2(IntPtr obj, IntPtr shape);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactCompoundShape_getCompoundPrimitiveManager(IntPtr obj);
|
||||
public override GImpactShapeType GImpactShapeType => GImpactShapeType.CompoundShape;
|
||||
}
|
||||
|
||||
public class TrimeshPrimitiveManager : PrimitiveManagerBase
|
||||
public sealed class TrimeshPrimitiveManager : PrimitiveManagerBase
|
||||
{
|
||||
private StridingMeshInterface _meshInterface;
|
||||
|
||||
|
@ -332,37 +250,37 @@ namespace BulletSharp
|
|||
|
||||
public IntPtr IndexBase
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndexbase(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndexbase(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndexbase(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndexbase(Native, value);
|
||||
}
|
||||
|
||||
public int IndexStride
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndexstride(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndexstride(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndexstride(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndexstride(Native, value);
|
||||
}
|
||||
|
||||
public PhyScalarType IndicesType
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndicestype(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndicestype(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndicestype(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndicestype(Native, value);
|
||||
}
|
||||
|
||||
public int LockCount
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getLock_count(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setLock_count(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getLock_count(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setLock_count(Native, value);
|
||||
}
|
||||
|
||||
public float Margin
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getMargin(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setMargin(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getMargin(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setMargin(Native, value);
|
||||
}
|
||||
|
||||
public StridingMeshInterface MeshInterface
|
||||
{
|
||||
get { return _meshInterface; }
|
||||
get => _meshInterface;
|
||||
set
|
||||
{
|
||||
UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setMeshInterface(Native, value._native);
|
||||
|
@ -372,20 +290,20 @@ namespace BulletSharp
|
|||
|
||||
public int Numfaces
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getNumfaces(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setNumfaces(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getNumfaces(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setNumfaces(Native, value);
|
||||
}
|
||||
|
||||
public int Numverts
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getNumverts(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setNumverts(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getNumverts(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setNumverts(Native, value);
|
||||
}
|
||||
|
||||
public int Part
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getPart(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setPart(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getPart(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setPart(Native, value);
|
||||
}
|
||||
|
||||
public Vector3 Scale
|
||||
|
@ -396,31 +314,28 @@ namespace BulletSharp
|
|||
UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getScale(Native, out value);
|
||||
return value;
|
||||
}
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setScale(Native, ref value); }
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setScale(Native, ref value);
|
||||
}
|
||||
|
||||
public int Stride
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getStride(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setStride(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getStride(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setStride(Native, value);
|
||||
}
|
||||
|
||||
public PhyScalarType Type
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getType(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setType(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getType(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setType(Native, value);
|
||||
}
|
||||
|
||||
public IntPtr VertexBase
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getVertexbase(Native); }
|
||||
set { UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setVertexbase(Native, value); }
|
||||
get => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_getVertexbase(Native);
|
||||
set => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_setVertexbase(Native, value);
|
||||
}
|
||||
|
||||
public int VertexCount
|
||||
{
|
||||
get { return UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_get_vertex_count(Native); }
|
||||
}
|
||||
public int VertexCount => UnsafeNativeMethods.btGImpactMeshShapePart_TrimeshPrimitiveManager_get_vertex_count(Native);
|
||||
}
|
||||
|
||||
public class GImpactMeshShapePart : GImpactShapeInterface
|
||||
|
@ -433,29 +348,26 @@ namespace BulletSharp
|
|||
}
|
||||
|
||||
public GImpactMeshShapePart()
|
||||
: base(btGImpactMeshShapePart_new())
|
||||
: base(UnsafeNativeMethods.btGImpactMeshShapePart_new())
|
||||
{
|
||||
}
|
||||
|
||||
public GImpactMeshShapePart(StridingMeshInterface meshInterface, int part)
|
||||
: base(btGImpactMeshShapePart_new2(meshInterface._native, part))
|
||||
: base(UnsafeNativeMethods.btGImpactMeshShapePart_new2(meshInterface._native, part))
|
||||
{
|
||||
}
|
||||
|
||||
public override CollisionShape GetChildShape(int index)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
public void GetVertex(int vertexIndex, out Vector3 vertex)
|
||||
{
|
||||
btGImpactMeshShapePart_getVertex(_native, vertexIndex, out vertex);
|
||||
UnsafeNativeMethods.btGImpactMeshShapePart_getVertex(_native, vertexIndex, out vertex);
|
||||
}
|
||||
|
||||
public int Part
|
||||
{
|
||||
get { return btGImpactMeshShapePart_getPart(_native); }
|
||||
}
|
||||
|
||||
public override PrimitiveManagerBase PrimitiveManager
|
||||
{
|
||||
get { return GImpactTrimeshPrimitiveManager; }
|
||||
}
|
||||
public override GImpactShapeType GImpactShapeType => GImpactShapeType.TrimeshShapePart;
|
||||
|
||||
public TrimeshPrimitiveManager GImpactTrimeshPrimitiveManager
|
||||
{
|
||||
|
@ -463,35 +375,24 @@ namespace BulletSharp
|
|||
{
|
||||
if (_gImpactTrimeshPrimitiveManager == null)
|
||||
{
|
||||
_gImpactTrimeshPrimitiveManager = new TrimeshPrimitiveManager(btGImpactMeshShapePart_getTrimeshPrimitiveManager(_native));
|
||||
_gImpactTrimeshPrimitiveManager = new TrimeshPrimitiveManager(
|
||||
UnsafeNativeMethods.btGImpactMeshShapePart_getTrimeshPrimitiveManager(_native));
|
||||
}
|
||||
return _gImpactTrimeshPrimitiveManager;
|
||||
}
|
||||
}
|
||||
|
||||
public int VertexCount
|
||||
{
|
||||
get { return btGImpactMeshShapePart_getVertexCount(_native); }
|
||||
}
|
||||
public int Part => UnsafeNativeMethods.btGImpactMeshShapePart_getPart(_native);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactMeshShapePart_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactMeshShapePart_new2(IntPtr meshInterface, int part);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btGImpactMeshShapePart_getPart(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactMeshShapePart_getTrimeshPrimitiveManager(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btGImpactMeshShapePart_getVertex(IntPtr obj, int vertex_index, out Vector3 vertex);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btGImpactMeshShapePart_getVertexCount(IntPtr obj);
|
||||
public override PrimitiveManagerBase PrimitiveManager => GImpactTrimeshPrimitiveManager;
|
||||
|
||||
public int VertexCount => UnsafeNativeMethods.btGImpactMeshShapePart_getVertexCount(_native);
|
||||
}
|
||||
|
||||
public class GImpactMeshShape : GImpactShapeInterface
|
||||
{
|
||||
private StridingMeshInterface _meshInterface;
|
||||
bool _disposeMeshInterface;
|
||||
private bool _disposeMeshInterface;
|
||||
|
||||
internal GImpactMeshShape(IntPtr native)
|
||||
: base(native)
|
||||
|
@ -499,14 +400,19 @@ namespace BulletSharp
|
|||
}
|
||||
|
||||
public GImpactMeshShape(StridingMeshInterface meshInterface)
|
||||
: base(btGImpactMeshShape_new(meshInterface._native))
|
||||
: base(UnsafeNativeMethods.btGImpactMeshShape_new(meshInterface._native))
|
||||
{
|
||||
_meshInterface = meshInterface;
|
||||
}
|
||||
|
||||
public override CollisionShape GetChildShape(int index)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
public GImpactMeshShapePart GetMeshPart(int index)
|
||||
{
|
||||
return new GImpactMeshShapePart(btGImpactMeshShape_getMeshPart(_native, index));
|
||||
return new GImpactMeshShapePart(UnsafeNativeMethods.btGImpactMeshShape_getMeshPart(_native, index));
|
||||
}
|
||||
|
||||
public StridingMeshInterface MeshInterface
|
||||
|
@ -515,22 +421,18 @@ namespace BulletSharp
|
|||
{
|
||||
if (_meshInterface == null)
|
||||
{
|
||||
_meshInterface = new StridingMeshInterface(btGImpactMeshShape_getMeshInterface(_native));
|
||||
_meshInterface = new StridingMeshInterface(UnsafeNativeMethods.btGImpactMeshShape_getMeshInterface(_native));
|
||||
_disposeMeshInterface = true;
|
||||
}
|
||||
return _meshInterface;
|
||||
}
|
||||
}
|
||||
|
||||
public int MeshPartCount
|
||||
{
|
||||
get { return btGImpactMeshShape_getMeshPartCount(_native); }
|
||||
}
|
||||
public int MeshPartCount => UnsafeNativeMethods.btGImpactMeshShape_getMeshPartCount(_native);
|
||||
|
||||
public override PrimitiveManagerBase PrimitiveManager
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
public override PrimitiveManagerBase PrimitiveManager => null;
|
||||
|
||||
public override GImpactShapeType GImpactShapeType => GImpactShapeType.TrimeshShape;
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
|
@ -541,15 +443,6 @@ namespace BulletSharp
|
|||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactMeshShape_new(IntPtr meshInterface);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactMeshShape_getMeshInterface(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btGImpactMeshShape_getMeshPart(IntPtr obj, int index);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btGImpactMeshShape_getMeshPartCount(IntPtr obj);
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using BulletSharp.Math;
|
||||
using System;
|
||||
|
||||
namespace BulletSharp
|
||||
{
|
||||
|
@ -16,50 +14,47 @@ namespace BulletSharp
|
|||
|
||||
public GimTriangleContact()
|
||||
{
|
||||
Native = GIM_TRIANGLE_CONTACT_new();
|
||||
Native = UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_new();
|
||||
}
|
||||
|
||||
public GimTriangleContact(GimTriangleContact other)
|
||||
{
|
||||
Native = GIM_TRIANGLE_CONTACT_new2(other.Native);
|
||||
Native = UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_new2(other.Native);
|
||||
}
|
||||
|
||||
public void CopyFrom(GimTriangleContact other)
|
||||
{
|
||||
GIM_TRIANGLE_CONTACT_copy_from(Native, other.Native);
|
||||
UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_copy_from(Native, other.Native);
|
||||
}
|
||||
/*
|
||||
public void MergePoints(Vector4 plane, float margin, Vector3 points, int pointCount)
|
||||
{
|
||||
GIM_TRIANGLE_CONTACT_merge_points(_native, ref plane, margin, ref points, pointCount);
|
||||
UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_merge_points(_native, ref plane, margin, ref points, pointCount);
|
||||
}
|
||||
*/
|
||||
public float PenetrationDepth
|
||||
{
|
||||
get { return GIM_TRIANGLE_CONTACT_getPenetration_depth(Native); }
|
||||
set { GIM_TRIANGLE_CONTACT_setPenetration_depth(Native, value); }
|
||||
get => UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_getPenetration_depth(Native);
|
||||
set => UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_setPenetration_depth(Native, value);
|
||||
}
|
||||
|
||||
public int PointCount
|
||||
{
|
||||
get { return GIM_TRIANGLE_CONTACT_getPoint_count(Native); }
|
||||
set { GIM_TRIANGLE_CONTACT_setPoint_count(Native, value); }
|
||||
get => UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_getPoint_count(Native);
|
||||
set => UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_setPoint_count(Native, value);
|
||||
}
|
||||
|
||||
public Vector3Array Points
|
||||
{
|
||||
get { return new Vector3Array(GIM_TRIANGLE_CONTACT_getPoints(Native), 16); }
|
||||
}
|
||||
public Vector3Array Points => new Vector3Array(UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_getPoints(Native), 16);
|
||||
|
||||
public Vector4 SeparatingNormal
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector4 value;
|
||||
GIM_TRIANGLE_CONTACT_getSeparating_normal(Native, out value);
|
||||
UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_getSeparating_normal(Native, out value);
|
||||
return value;
|
||||
}
|
||||
set { GIM_TRIANGLE_CONTACT_setSeparating_normal(Native, ref value); }
|
||||
set => UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_setSeparating_normal(Native, ref value);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
@ -72,7 +67,7 @@ namespace BulletSharp
|
|||
{
|
||||
if (Native != IntPtr.Zero)
|
||||
{
|
||||
GIM_TRIANGLE_CONTACT_delete(Native);
|
||||
UnsafeNativeMethods.GIM_TRIANGLE_CONTACT_delete(Native);
|
||||
Native = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
@ -81,31 +76,6 @@ namespace BulletSharp
|
|||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr GIM_TRIANGLE_CONTACT_new();
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr GIM_TRIANGLE_CONTACT_new2(IntPtr other);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void GIM_TRIANGLE_CONTACT_copy_from(IntPtr obj, IntPtr other);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern float GIM_TRIANGLE_CONTACT_getPenetration_depth(IntPtr obj);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int GIM_TRIANGLE_CONTACT_getPoint_count(IntPtr obj);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr GIM_TRIANGLE_CONTACT_getPoints(IntPtr obj);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void GIM_TRIANGLE_CONTACT_getSeparating_normal(IntPtr obj, [Out] out Vector4 value);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void GIM_TRIANGLE_CONTACT_merge_points(IntPtr obj, [In] ref Vector4 plane, float margin, [In] ref Vector3 points, int point_count);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void GIM_TRIANGLE_CONTACT_setPenetration_depth(IntPtr obj, float value);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void GIM_TRIANGLE_CONTACT_setPoint_count(IntPtr obj, int value);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void GIM_TRIANGLE_CONTACT_setSeparating_normal(IntPtr obj, [In] ref Vector4 value);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void GIM_TRIANGLE_CONTACT_delete(IntPtr obj);
|
||||
}
|
||||
|
||||
public class PrimitiveTriangle : IDisposable
|
||||
|
@ -119,49 +89,49 @@ namespace BulletSharp
|
|||
|
||||
public PrimitiveTriangle()
|
||||
{
|
||||
Native = btPrimitiveTriangle_new();
|
||||
Native = UnsafeNativeMethods.btPrimitiveTriangle_new();
|
||||
}
|
||||
|
||||
public void ApplyTransform(Matrix t)
|
||||
{
|
||||
btPrimitiveTriangle_applyTransform(Native, ref t);
|
||||
UnsafeNativeMethods.btPrimitiveTriangle_applyTransform(Native, ref t);
|
||||
}
|
||||
|
||||
public void BuildTriPlane()
|
||||
{
|
||||
btPrimitiveTriangle_buildTriPlane(Native);
|
||||
UnsafeNativeMethods.btPrimitiveTriangle_buildTriPlane(Native);
|
||||
}
|
||||
/*
|
||||
public int ClipTriangle(PrimitiveTriangle other, Vector3 clippedPoints)
|
||||
{
|
||||
return btPrimitiveTriangle_clip_triangle(Native, other.Native, ref clippedPoints);
|
||||
return UnsafeNativeMethods.btPrimitiveTriangle_clip_triangle(Native, other.Native, ref clippedPoints);
|
||||
}
|
||||
*/
|
||||
public bool FindTriangleCollisionClipMethod(PrimitiveTriangle other, GimTriangleContact contacts)
|
||||
{
|
||||
return btPrimitiveTriangle_find_triangle_collision_clip_method(Native, other.Native, contacts.Native);
|
||||
return UnsafeNativeMethods.btPrimitiveTriangle_find_triangle_collision_clip_method(Native, other.Native, contacts.Native);
|
||||
}
|
||||
|
||||
public void GetEdgePlane(int edgeIndex, out Vector4 plane)
|
||||
{
|
||||
btPrimitiveTriangle_get_edge_plane(Native, edgeIndex, out plane);
|
||||
UnsafeNativeMethods.btPrimitiveTriangle_get_edge_plane(Native, edgeIndex, out plane);
|
||||
}
|
||||
|
||||
public bool OverlapTestConservative(PrimitiveTriangle other)
|
||||
{
|
||||
return btPrimitiveTriangle_overlap_test_conservative(Native, other.Native);
|
||||
return UnsafeNativeMethods.btPrimitiveTriangle_overlap_test_conservative(Native, other.Native);
|
||||
}
|
||||
|
||||
public float Dummy
|
||||
{
|
||||
get { return btPrimitiveTriangle_getDummy(Native); }
|
||||
set { btPrimitiveTriangle_setDummy(Native, value); }
|
||||
get => UnsafeNativeMethods.btPrimitiveTriangle_getDummy(Native);
|
||||
set => UnsafeNativeMethods.btPrimitiveTriangle_setDummy(Native, value);
|
||||
}
|
||||
|
||||
public float Margin
|
||||
{
|
||||
get { return btPrimitiveTriangle_getMargin(Native); }
|
||||
set { btPrimitiveTriangle_setMargin(Native, value); }
|
||||
get => UnsafeNativeMethods.btPrimitiveTriangle_getMargin(Native);
|
||||
set => UnsafeNativeMethods.btPrimitiveTriangle_setMargin(Native, value);
|
||||
}
|
||||
|
||||
public Vector4 Plane
|
||||
|
@ -169,16 +139,13 @@ namespace BulletSharp
|
|||
get
|
||||
{
|
||||
Vector4 value;
|
||||
btPrimitiveTriangle_getPlane(Native, out value);
|
||||
UnsafeNativeMethods.btPrimitiveTriangle_getPlane(Native, out value);
|
||||
return value;
|
||||
}
|
||||
set { btPrimitiveTriangle_setPlane(Native, ref value); }
|
||||
set => UnsafeNativeMethods.btPrimitiveTriangle_setPlane(Native, ref value);
|
||||
}
|
||||
|
||||
public Vector3Array Vertices
|
||||
{
|
||||
get { return new Vector3Array(btPrimitiveTriangle_getVertices(Native), 3); }
|
||||
}
|
||||
public Vector3Array Vertices => new Vector3Array(UnsafeNativeMethods.btPrimitiveTriangle_getVertices(Native), 3);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
@ -190,7 +157,7 @@ namespace BulletSharp
|
|||
{
|
||||
if (Native != IntPtr.Zero)
|
||||
{
|
||||
btPrimitiveTriangle_delete(Native);
|
||||
UnsafeNativeMethods.btPrimitiveTriangle_delete(Native);
|
||||
Native = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
@ -199,85 +166,38 @@ namespace BulletSharp
|
|||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btPrimitiveTriangle_new();
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btPrimitiveTriangle_applyTransform(IntPtr obj, [In] ref Matrix t);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btPrimitiveTriangle_buildTriPlane(IntPtr obj);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern int btPrimitiveTriangle_clip_triangle(IntPtr obj, IntPtr other, [Out] out Vector3 clipped_points);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btPrimitiveTriangle_find_triangle_collision_clip_method(IntPtr obj, IntPtr other, IntPtr contacts);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btPrimitiveTriangle_get_edge_plane(IntPtr obj, int edge_index, [Out] out Vector4 plane);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern float btPrimitiveTriangle_getDummy(IntPtr obj);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern float btPrimitiveTriangle_getMargin(IntPtr obj);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btPrimitiveTriangle_getPlane(IntPtr obj, [Out] out Vector4 value);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btPrimitiveTriangle_getVertices(IntPtr obj);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btPrimitiveTriangle_overlap_test_conservative(IntPtr obj, IntPtr other);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btPrimitiveTriangle_setDummy(IntPtr obj, float value);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btPrimitiveTriangle_setMargin(IntPtr obj, float value);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btPrimitiveTriangle_setPlane(IntPtr obj, [In] ref Vector4 value);
|
||||
[DllImport(BulletSharp.Native.Dll, CallingConvention = BulletSharp.Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btPrimitiveTriangle_delete(IntPtr obj);
|
||||
}
|
||||
|
||||
public class TriangleShapeEx : TriangleShape
|
||||
{
|
||||
public TriangleShapeEx()
|
||||
: base(btTriangleShapeEx_new())
|
||||
: base(UnsafeNativeMethods.btTriangleShapeEx_new())
|
||||
{
|
||||
}
|
||||
|
||||
public TriangleShapeEx(Vector3 p0, Vector3 p1, Vector3 p2)
|
||||
: base(btTriangleShapeEx_new2(ref p0, ref p1, ref p2))
|
||||
: base(UnsafeNativeMethods.btTriangleShapeEx_new2(ref p0, ref p1, ref p2))
|
||||
{
|
||||
}
|
||||
|
||||
public TriangleShapeEx(TriangleShapeEx other)
|
||||
: base(btTriangleShapeEx_new3(other._native))
|
||||
: base(UnsafeNativeMethods.btTriangleShapeEx_new3(other._native))
|
||||
{
|
||||
}
|
||||
|
||||
public void ApplyTransform(Matrix t)
|
||||
public void ApplyTransform(Matrix transform)
|
||||
{
|
||||
btTriangleShapeEx_applyTransform(_native, ref t);
|
||||
UnsafeNativeMethods.btTriangleShapeEx_applyTransform(_native, ref transform);
|
||||
}
|
||||
|
||||
public void BuildTriPlane(out Vector4 plane)
|
||||
{
|
||||
btTriangleShapeEx_buildTriPlane(_native, out plane);
|
||||
UnsafeNativeMethods.btTriangleShapeEx_buildTriPlane(_native, out plane);
|
||||
}
|
||||
|
||||
public bool OverlapTestConservative(TriangleShapeEx other)
|
||||
{
|
||||
return btTriangleShapeEx_overlap_test_conservative(_native, other._native);
|
||||
return UnsafeNativeMethods.btTriangleShapeEx_overlap_test_conservative(_native, other._native);
|
||||
}
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btTriangleShapeEx_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btTriangleShapeEx_new2([In] ref Vector3 p0, [In] ref Vector3 p1, [In] ref Vector3 p2);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr btTriangleShapeEx_new3(IntPtr other);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btTriangleShapeEx_applyTransform(IntPtr obj, [In] ref Matrix t);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
static extern void btTriangleShapeEx_buildTriPlane(IntPtr obj, [Out] out Vector4 plane);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv), SuppressUnmanagedCodeSecurity]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
static extern bool btTriangleShapeEx_overlap_test_conservative(IntPtr obj, IntPtr other);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -252,6 +252,37 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactCollisionAlgorithm_setPart1(IntPtr obj, int value);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactCompoundShape_new(bool children_has_transform);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactCompoundShape_addChildShape(IntPtr obj, [In] ref Matrix localTransform, IntPtr shape);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactCompoundShape_addChildShape2(IntPtr obj, IntPtr shape);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactCompoundShape_getCompoundPrimitiveManager(IntPtr obj);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactMeshShape_new(IntPtr meshInterface);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactMeshShape_getMeshInterface(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactMeshShape_getMeshPart(IntPtr obj, int index);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern int btGImpactMeshShape_getMeshPartCount(IntPtr obj);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactMeshShapePart_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactMeshShapePart_new2(IntPtr meshInterface, int part);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern int btGImpactMeshShapePart_getPart(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactMeshShapePart_getTrimeshPrimitiveManager(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactMeshShapePart_getVertex(IntPtr obj, int vertex_index, out Vector3 vertex);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern int btGImpactMeshShapePart_getVertexCount(IntPtr obj);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactMeshShapePart_TrimeshPrimitiveManager_new(IntPtr meshInterface, int part);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
|
@ -378,6 +409,51 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactQuantizedBvh_delete(IntPtr obj);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool btGImpactShapeInterface_childrenHasTransform(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactShapeInterface_getBoxSet(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_getBulletTetrahedron(IntPtr obj, int prim_index, IntPtr tetrahedron);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_getBulletTriangle(IntPtr obj, int prim_index, IntPtr triangle);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_getChildAabb(IntPtr obj, int child_index, [In] ref Matrix t, out Vector3 aabbMin, out Vector3 aabbMax);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_getChildTransform(IntPtr obj, int index, out Matrix value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactShapeInterface_getLocalBox(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern int btGImpactShapeInterface_getNumChildShapes(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btGImpactShapeInterface_getPrimitiveManager(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_getPrimitiveTriangle(IntPtr obj, int index, IntPtr triangle);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool btGImpactShapeInterface_hasBoxSet(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_lockChildShapes(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool btGImpactShapeInterface_needsRetrieveTetrahedrons(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool btGImpactShapeInterface_needsRetrieveTriangles(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_postUpdate(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_processAllTrianglesRay(IntPtr obj, IntPtr __unnamed0, [In] ref Vector3 __unnamed1, [In] ref Vector3 __unnamed2);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_rayTest(IntPtr obj, [In] ref Vector3 rayFrom, [In] ref Vector3 rayTo, IntPtr resultCallback);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_setChildTransform(IntPtr obj, int index, [In] ref Matrix transform);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_unlockChildShapes(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btGImpactShapeInterface_updateBound(IntPtr obj);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btIndexedMesh_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
|
@ -445,6 +521,39 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveManagerBase_delete(IntPtr obj);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btPrimitiveTriangle_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveTriangle_applyTransform(IntPtr obj, [In] ref Matrix t);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveTriangle_buildTriPlane(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern int btPrimitiveTriangle_clip_triangle(IntPtr obj, IntPtr other, [Out] out Vector3 clipped_points);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool btPrimitiveTriangle_find_triangle_collision_clip_method(IntPtr obj, IntPtr other, IntPtr contacts);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveTriangle_get_edge_plane(IntPtr obj, int edge_index, [Out] out Vector4 plane);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btPrimitiveTriangle_getDummy(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float btPrimitiveTriangle_getMargin(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveTriangle_getPlane(IntPtr obj, [Out] out Vector4 value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btPrimitiveTriangle_getVertices(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool btPrimitiveTriangle_overlap_test_conservative(IntPtr obj, IntPtr other);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveTriangle_setDummy(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveTriangle_setMargin(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveTriangle_setPlane(IntPtr obj, [In] ref Vector4 value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btPrimitiveTriangle_delete(IntPtr obj);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btQuantizedBvhTree_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
|
@ -478,6 +587,11 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btQuantizedBvhTree_delete(IntPtr obj);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btTetrahedronShapeEx_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btTetrahedronShapeEx_setVertices(IntPtr obj, [In] ref Vector3 v0, [In] ref Vector3 v1, [In] ref Vector3 v2, [In] ref Vector3 v3);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btThreads_btGetOpenMPTaskScheduler();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
|
@ -489,6 +603,20 @@ namespace BulletSharp
|
|||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btThreads_btSetTaskScheduler(IntPtr taskScheduler);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btTriangleShapeEx_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btTriangleShapeEx_new2([In] ref Vector3 p0, [In] ref Vector3 p1, [In] ref Vector3 p2);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr btTriangleShapeEx_new3(IntPtr other);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btTriangleShapeEx_applyTransform(IntPtr obj, [In] ref Matrix t);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void btTriangleShapeEx_buildTriPlane(IntPtr obj, [Out] out Vector4 plane);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool btTriangleShapeEx_overlap_test_conservative(IntPtr obj, IntPtr other);
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr GIM_BVH_DATA_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
|
@ -547,5 +675,30 @@ namespace BulletSharp
|
|||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr GIM_QUANTIZED_BVH_NODE_ARRAY_new();
|
||||
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr GIM_TRIANGLE_CONTACT_new();
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr GIM_TRIANGLE_CONTACT_new2(IntPtr other);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void GIM_TRIANGLE_CONTACT_copy_from(IntPtr obj, IntPtr other);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern float GIM_TRIANGLE_CONTACT_getPenetration_depth(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern int GIM_TRIANGLE_CONTACT_getPoint_count(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern IntPtr GIM_TRIANGLE_CONTACT_getPoints(IntPtr obj);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void GIM_TRIANGLE_CONTACT_getSeparating_normal(IntPtr obj, [Out] out Vector4 value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void GIM_TRIANGLE_CONTACT_merge_points(IntPtr obj, [In] ref Vector4 plane, float margin, [In] ref Vector3 points, int point_count);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void GIM_TRIANGLE_CONTACT_setPenetration_depth(IntPtr obj, float value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void GIM_TRIANGLE_CONTACT_setPoint_count(IntPtr obj, int value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void GIM_TRIANGLE_CONTACT_setSeparating_normal(IntPtr obj, [In] ref Vector4 value);
|
||||
[DllImport(Native.Dll, CallingConvention = Native.Conv)]
|
||||
public static extern void GIM_TRIANGLE_CONTACT_delete(IntPtr obj);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче