Created
March 6, 2013 14:36
-
-
Save aras-p/5099699 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| in .txt file: | |
| STRUCT ParticleCollisionEvent | |
| CSRAW | |
| private Vector3 m_Intersection; | |
| private Vector3 m_Normal; | |
| private Vector3 m_Velocity; | |
| private GameObject m_GameObject; | |
| // ... | |
| END | |
| somewhere in C++ file, a struct matching memory layout: | |
| struct MonoParticleCollisionEvent { | |
| Vector3 intersection; | |
| Vector3 normal; | |
| Vector3 velocity; | |
| ScriptingObjectPtr gameObject; | |
| }; | |
| This struct is _only_ used in implementation of GetParticleCollisionEvents script API. | |
| int ParticleSystem::GetParticleCollisionsExternal (int instanceId, MonoParticleCollisionEvent* collisionEvents, int size) const | |
| { | |
| // now here, fill in the destination array, with the game object pointer etc., using ObjectToScriptingObject | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment