ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/brains/DataStorage.cpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/brains/DataStorage.cpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2015 by tim, Sun Feb 13 21:18:27 2005 UTC

# Line 49 | Line 49
49  
50   #include "brains/DataStorage.hpp"
51  
52 + namespace oopse {
53  
54   DataStorage::DataStorage() : size_(0), storageLayout_(0){
55  
# Line 326 | Line 327 | void DataStorage::internalCopy(std::vector<T>& v, int
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 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines