summaryrefslogtreecommitdiff
path: root/src/simulation/Particle.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-11-17 19:44:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-11-17 19:44:09 (GMT)
commit058a2edd75debbd0297f92572316daa704bd379f (patch)
treead303f091f9a08b209b91eb34a9fcad996a3de69 /src/simulation/Particle.cpp
parente3594aba9e05c6865d396418c028049cda92c2f3 (diff)
parent7a21ae192fe19868539956f3fe28e62b2c7c4429 (diff)
downloadpowder-058a2edd75debbd0297f92572316daa704bd379f.zip
powder-058a2edd75debbd0297f92572316daa704bd379f.tar.gz
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/simulation/Particle.cpp')
-rw-r--r--src/simulation/Particle.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/simulation/Particle.cpp b/src/simulation/Particle.cpp
new file mode 100644
index 0000000..115ed95
--- /dev/null
+++ b/src/simulation/Particle.cpp
@@ -0,0 +1,27 @@
+/*
+ * Particle.cpp
+ *
+ * Created on: Jun 6, 2012
+ * Author: Simon
+ */
+
+#include <cstddef>
+#include "Particle.h"
+
+std::vector<StructProperty> Particle::GetProperties()
+{
+ std::vector<StructProperty> properties;
+ properties.push_back(StructProperty("type", StructProperty::ParticleType, offsetof(Particle, type)));
+ properties.push_back(StructProperty("life", StructProperty::ParticleType, offsetof(Particle, life)));
+ properties.push_back(StructProperty("ctype", StructProperty::ParticleType, offsetof(Particle, ctype)));
+ properties.push_back(StructProperty("x", StructProperty::Float, offsetof(Particle, x)));
+ properties.push_back(StructProperty("y", StructProperty::Float, offsetof(Particle, y)));
+ properties.push_back(StructProperty("vx", StructProperty::Float, offsetof(Particle, vx)));
+ properties.push_back(StructProperty("vy", StructProperty::Float, offsetof(Particle, vy)));
+ properties.push_back(StructProperty("temp", StructProperty::Float, offsetof(Particle, temp)));
+ properties.push_back(StructProperty("flags", StructProperty::UInteger, offsetof(Particle, flags)));
+ properties.push_back(StructProperty("tmp", StructProperty::Integer, offsetof(Particle, tmp)));
+ properties.push_back(StructProperty("tmp2", StructProperty::Integer, offsetof(Particle, tmp2)));
+ properties.push_back(StructProperty("dcolour", StructProperty::UInteger, offsetof(Particle, dcolour)));
+ return properties;
+}