PhysicsMesh.generated.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Physics
  7. * @{
  8. */
  9. /// <summary>
  10. /// Represents a physics mesh that can be used with a MeshCollider. Physics mesh can be a generic triangle mesh or a
  11. /// convex mesh. Convex meshes are limited to 255 faces.
  12. /// </summary>
  13. public partial class PhysicsMesh : Resource
  14. {
  15. private PhysicsMesh(bool __dummy0) { }
  16. protected PhysicsMesh() { }
  17. /// <summary>Creates a new physics mesh.</summary>
  18. /// <param name="meshData">Index and vertices of the mesh data.</param>
  19. /// <param name="type">
  20. /// Type of the mesh. If convex the provided mesh geometry will be converted into a convex mesh (that might not be the
  21. /// same as the provided mesh data).
  22. /// </param>
  23. public PhysicsMesh(MeshData meshData, PhysicsMeshType type = PhysicsMeshType.Convex)
  24. {
  25. Internal_create(this, meshData, type);
  26. }
  27. /// <summary>Returns the type of the physics mesh.</summary>
  28. public PhysicsMeshType Type
  29. {
  30. get { return Internal_getType(mCachedPtr); }
  31. }
  32. /// <summary>Returns the mesh's indices and vertices.</summary>
  33. public MeshData MeshData
  34. {
  35. get { return Internal_getMeshData(mCachedPtr); }
  36. }
  37. [MethodImpl(MethodImplOptions.InternalCall)]
  38. private static extern PhysicsMeshType Internal_getType(IntPtr thisPtr);
  39. [MethodImpl(MethodImplOptions.InternalCall)]
  40. private static extern void Internal_create(PhysicsMesh managedInstance, MeshData meshData, PhysicsMeshType type);
  41. [MethodImpl(MethodImplOptions.InternalCall)]
  42. private static extern MeshData Internal_getMeshData(IntPtr thisPtr);
  43. }
  44. /** @} */
  45. }