3namespace XXSharpKmyPhysics
5 class NativePhysicsNotifyTarget :
public kmyPhysics::PhysicsNotifyTarget
8 void*
operator new(
size_t sz) {
11 void operator delete(
void* ptr) {
15 NativePhysicsNotifyTarget();
16 void onUpdate()
override;
17 void onStartContact(kmyPhysics::ContactInfo &c)
override;
18 void onContact(kmyPhysics::ContactInfo &c)
override;
19 void onEndContact(kmyPhysics::ContactInfo &c)
override;
20 void onDestroy()
override;
25 private ref class PhysicsNotifyTarget
30 handle = System::Runtime::InteropServices::GCHandle::Alloc(
this);
33 !PhysicsNotifyTarget()
38 ~PhysicsNotifyTarget()
42 virtual void onUpdate() {}
43 virtual void onStartContact(PhysicsNotifyTarget^ other, XXSharpKmyMath::Vector3 position, XXSharpKmyMath::Vector3 normal) {}
44 virtual void onContact(PhysicsNotifyTarget^ other, XXSharpKmyMath::Vector3 position, XXSharpKmyMath::Vector3 normal) {}
45 virtual void onEndContact(PhysicsNotifyTarget^ other, XXSharpKmyMath::Vector3 position, XXSharpKmyMath::Vector3 normal) {}
46 virtual void onDestroy() {}
49 System::Runtime::InteropServices::GCHandle handle;