87 for (
int i = 0; i < 3; i++) {
88 serial[i] = this->_pos[i];
89 serial[i + 3] = this->_vel[i];
90 serial[i + 6] = this->_force[i];
92 serial[9] = this->_mas;
93 serial[10] = this->_rad;
94 serial[11] = this->_cuboid;
95 serial[12] = (double) this->_active;
96 serial[13] = (double) _aVel[0];
97 serial[14] = (double) _aVel[1];
98 serial[15] = (double) _aVel[2];
99 serial[16] = (double) _torque[0];
100 serial[17] = (double) _torque[1];
101 serial[18] = (double) _torque[2];
107 for (
int i = 0; i < 3; i++) {
108 this->_pos[i] = data[i];
109 this->_vel[i] = data[i + 3];
110 this->_force[i] = data[i + 6];
112 this->_mas = data[9];
113 this->_rad = data[10];
114 this->_cuboid = int(data[11]);
115 this->_active = (bool) data[12];
116 _aVel[0] = (bool) data[13];
117 _aVel[1] = (bool) data[14];
118 _aVel[2] = (bool) data[15];
119 _torque[0] = (bool) data[16];
120 _torque[1] = (bool) data[17];
121 _torque[2] = (bool) data[18];
std::vector< T > & getAVel()
void serialize(T serial[])
std::vector< T > & getTorque()
SimulateParticles(ParticleSystem3D< T, PARTICLETYPE > *ps)
void simulate(T dT, bool scale=false)