diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Misc/MessageParameters.h |
Diffstat (limited to 'Runtime/Misc/MessageParameters.h')
-rw-r--r-- | Runtime/Misc/MessageParameters.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Runtime/Misc/MessageParameters.h b/Runtime/Misc/MessageParameters.h new file mode 100644 index 0000000..97a4669 --- /dev/null +++ b/Runtime/Misc/MessageParameters.h @@ -0,0 +1,35 @@ +#pragma once + +#include "Runtime/Math/Vector3.h" +#include <list> + +class Collider; +class Rigidbody; +struct MonoObject; + +struct ContactPoint +{ + Collider* collider[2]; + Vector3f point; + Vector3f normal; +}; + +struct Collision +{ + int status; + + bool flipped; + + Rigidbody* thisRigidbody; + Rigidbody* otherRigidbody; + Collider* thisCollider; + Collider* otherCollider; + + Vector3f impactForceSum; + Vector3f frictionForceSum; + Vector3f relativeVelocity; + typedef std::list<ContactPoint> Contacts; + Contacts contacts; +}; + +ScriptingObjectPtr ConvertContactToMono (Collision* input); |