3#include "Math/Vector3.h"
5namespace XXSharpKmyMath
11namespace XXSharpKmyPhysics
18 ref class PhysicsNode;
22 ref class PhysicsBase;
23 ref class PhysicsNotifyTarget;
25 private ref class RayCastHit
29 XXSharpKmyMath::Vector3 position;
30 XXSharpKmyMath::Vector3 normal;
35 private ref class PhysicsBase
39 PhysicsBase(kmyPhysics::PhysicsBase* p);
44 void setGravity(
float x,
float y,
float z);
45 void removeRigidBody(RigidBody ^r);
46 void removeCollider(Collider ^c);
47 void removeVehicle(Vehicle^ v);
48 bool rayCast(XXSharpKmyMath::Vector3 from, XXSharpKmyMath::Vector3 to,
unsigned short mask, RayCastHit^ hit);
49 bool rayCast(XXSharpKmyMath::Vector3 from, XXSharpKmyMath::Vector3 to,
unsigned short mask, RayCastHit^ hit, PhysicsNotifyTarget^ self);
50 bool rayCast(XXSharpKmyMath::Vector3 from, XXSharpKmyMath::Vector3 to,
unsigned short mask, RayCastHit^ hit, PhysicsNotifyTarget^ self,
unsigned short type);
51 bool rayCast(XXSharpKmyMath::Vector3 from, XXSharpKmyMath::Vector3 to,
unsigned short mask, RayCastHit^ hit, PhysicsNotifyTarget^ self,
unsigned short type,
int fellowId);
52 bool convexSweepTest(
float radius,
float height, XXSharpKmyMath::Vector3 from, XXSharpKmyMath::Vector3 to,
unsigned short mask, RayCastHit^ hit);
53 bool convexSweepTest(
float radius,
float height, XXSharpKmyMath::Vector3 from, XXSharpKmyMath::Vector3 to,
unsigned short mask, RayCastHit^ hit, PhysicsNotifyTarget^ self,
unsigned short type);
54 bool convexSweepTest(
float radius,
float height, XXSharpKmyMath::Vector3 from, XXSharpKmyMath::Vector3 to,
unsigned short mask, RayCastHit^ hit, PhysicsNotifyTarget^ self,
unsigned short type,
int fellowId);
56 Collider^ createBoxCollider(
57 float halfWidth,
float halfHeight,
float halfDepth,
58 XXSharpKmyMath::Matrix4 ^mtx,
63 Collider^ createSphereCollider(
65 XXSharpKmyMath::Matrix4 ^mtx,
70 Collider^ createCapsuleCollider(
73 XXSharpKmyMath::Matrix4 ^mtx,
79 Collider^ createTriMeshCollider(
80 array<float> ^vertices,
81 array<unsigned short> ^indices,
82 XXSharpKmyMath::Matrix4 ^mtx,
83 XXSharpKmyMath::Vector3 ^scl,
90 Collider^ createTriMeshCollider(
92 XXSharpKmyMath::Matrix4 ^mtx,
93 XXSharpKmyMath::Vector3 ^scl,
98 Collider^ createCompoundCollider(
100 XXSharpKmyMath::Matrix4 ^mtx,
101 XXSharpKmyMath::Vector3 ^scl,
102 unsigned short group,
106 RigidBody^ createBoxRigidBody(
107 float halfWidth,
float halfHeight,
float halfDepth,
110 XXSharpKmyMath::Matrix4 ^mtx,
111 unsigned short group,
115 RigidBody^ createSphereRigidBody(
119 XXSharpKmyMath::Matrix4 ^mtx,
120 unsigned short group,
124 RigidBody^ createCapsuleRigidBody(
129 XXSharpKmyMath::Matrix4 ^mtx,
130 unsigned short group,
135 RigidBody^ createCompoundRigidBody(
139 XXSharpKmyMath::Matrix4 ^mtx,
140 XXSharpKmyMath::Vector3 ^scl,
141 unsigned short group,
145 RigidBody^ createTriMeshRigidBody(
147 XXSharpKmyMath::Vector3 ^massCenter,
150 XXSharpKmyMath::Matrix4 ^mtx,
151 XXSharpKmyMath::Vector3 ^scl,
152 unsigned short group,
156 Vehicle^ createVehicle(
157 float width,
float height,
float depth
158 ,
float wheelRadius,
float wheelWidth,
float wheelFriction
159 ,
float suspensionRestLength,
float connectionHeight
160 ,
float suspensionStiffness,
float suspensionDamping,
float suspensionCompression
161 ,
float rigidbodyOffsetX,
float rigidbodyOffsetY,
float rigidbodyOffsetZ
162 ,
float positionX,
float positionY,
float positionZ
166 void update(f32 delta);
170 kmyPhysics::PhysicsBase *obj =
nullptr;
DebugDrawError
Definition: PhysicsBase.cs:8