Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2021
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. #include <cstddef>
  2. #include "Particle.h"
  3.  
  4. std::vector<StructProperty> const &Particle::GetProperties()
  5. {
  6. static std::vector<StructProperty> properties = {
  7. { "type" , StructProperty::ParticleType, (intptr_t) offsetof(Particle, type ) },
  8. { "life" , StructProperty::ParticleType, (intptr_t) offsetof(Particle, life ) },
  9. { "ctype" , StructProperty::ParticleType, (intptr_t) offsetof(Particle, ctype ) },
  10. { "x" , StructProperty::Float , (intptr_t) offsetof(Particle, x ) },
  11. { "y" , StructProperty::Float , (intptr_t) offsetof(Particle, y ) },
  12. { "vx" , StructProperty::Float , (intptr_t) offsetof(Particle, vx ) },
  13. { "vy" , StructProperty::Float , (intptr_t) offsetof(Particle, vy ) },
  14. { "temp" , StructProperty::Float , (intptr_t) offsetof(Particle, temp ) },
  15. { "flags" , StructProperty::UInteger , (intptr_t) offsetof(Particle, flags ) },
  16. { "tmp" , StructProperty::Integer , (intptr_t) offsetof(Particle, tmp ) },
  17. { "tmp2" , StructProperty::Integer , (intptr_t) offsetof(Particle, tmp2 ) },
  18. { "dcolour", StructProperty::UInteger , (intptr_t) offsetof(Particle, dcolour) },
  19. { "pavg0" , StructProperty::Float , (intptr_t) offsetof(Particle, pavg[0]) },
  20. { "pavg1" , StructProperty::Float , (intptr_t) offsetof(Particle, pavg[1]) },
  21. };
  22. return properties;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement