summaryrefslogtreecommitdiff
path: root/src/simulation/Particle.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-07 13:23:26 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-07 13:23:26 (GMT)
commit61ed6e0276d580515d0acf5ddb96b1db95b9b191 (patch)
tree65d9ad219e0b0f6bb1a81813c1888888f2cbd7a4 /src/simulation/Particle.h
parent2e48fc6115ebe0d294a2c7ff7fe8774217676f44 (diff)
downloadpowder-61ed6e0276d580515d0acf5ddb96b1db95b9b191.zip
powder-61ed6e0276d580515d0acf5ddb96b1db95b9b191.tar.gz
Rename Save class to SaveInfo, introduce SaveFile for hanlding of local data (stamps and local saves). Rename Stamps browser to LocalBrowser, ready for sharing code with the local save browser
Diffstat (limited to 'src/simulation/Particle.h')
-rw-r--r--src/simulation/Particle.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/simulation/Particle.h b/src/simulation/Particle.h
index 91a1315..bb0297e 100644
--- a/src/simulation/Particle.h
+++ b/src/simulation/Particle.h
@@ -9,6 +9,7 @@
#ifndef The_Powder_Toy_Particle_h
#define The_Powder_Toy_Particle_h
+#include <vector>
#include "StructProperty.h"
struct Particle
@@ -24,23 +25,7 @@ struct Particle
unsigned int dcolour;
/** Returns a list of properties, their type and offset within the structure that can be changed
by higher-level processes refering to them by name such as Lua or the property tool **/
- static std::vector<StructProperty> 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;
- }
+ static std::vector<StructProperty> GetProperties();
};
#endif