| 49 | 
  | 
 | 
| 50 | 
  | 
#include "brains/DataStorage.hpp" | 
| 51 | 
  | 
 | 
| 52 | 
+ | 
namespace oopse { | 
| 53 | 
  | 
 | 
| 54 | 
  | 
DataStorage::DataStorage() : size_(0), storageLayout_(0){ | 
| 55 | 
  | 
 | 
| 327 | 
  | 
    std::advance(result, target ); | 
| 328 | 
  | 
 | 
| 329 | 
  | 
    std::copy(first, last, result); | 
| 330 | 
+ | 
} | 
| 331 | 
+ | 
 | 
| 332 | 
+ | 
int DataStorage::getBytesPerStuntDouble(int layout) { | 
| 333 | 
+ | 
    int bytes = 0; | 
| 334 | 
+ | 
    if (layout & dslPosition) { | 
| 335 | 
+ | 
        bytes += sizeof(Vector3d); | 
| 336 | 
+ | 
    } | 
| 337 | 
+ | 
    if (layout & dslVelocity) { | 
| 338 | 
+ | 
        bytes += sizeof(Vector3d); | 
| 339 | 
+ | 
    } | 
| 340 | 
+ | 
    if (layout & dslAmat) { | 
| 341 | 
+ | 
        bytes += sizeof(Mat3x3d);     | 
| 342 | 
+ | 
    } | 
| 343 | 
+ | 
    if (layout & dslAngularMomentum) { | 
| 344 | 
+ | 
        bytes += sizeof(Vector3d); | 
| 345 | 
+ | 
    } | 
| 346 | 
+ | 
    if (layout & dslElectroFrame) { | 
| 347 | 
+ | 
        bytes += sizeof(Mat3x3d); | 
| 348 | 
+ | 
    } | 
| 349 | 
+ | 
    if (layout & dslZAngle) { | 
| 350 | 
+ | 
        bytes += sizeof(Vector3d); | 
| 351 | 
+ | 
    } | 
| 352 | 
+ | 
    if (layout & dslForce) { | 
| 353 | 
+ | 
        bytes += sizeof(Vector3d); | 
| 354 | 
+ | 
    } | 
| 355 | 
+ | 
    if (layout & dslTorque) { | 
| 356 | 
+ | 
        bytes += sizeof(Vector3d); | 
| 357 | 
+ | 
    } | 
| 358 | 
+ | 
    return bytes; | 
| 359 | 
  | 
} | 
| 360 | 
+ | 
 | 
| 361 | 
+ | 
} |