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 2007 by tim, Sun Feb 13 15:56:10 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 327 | Line 328 | void DataStorage::internalCopy(std::vector<T>& v, int
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 +    } else if (layout & dslVelocity) {
337 +        bytes += sizeof(Vector3d);
338 +    } else if (layout & dslAmat) {
339 +        bytes += sizeof(Mat3x3d);    
340 +    } else if (layout & dslAngularMomentum) {
341 +        bytes += sizeof(Vector3d);
342 +    } else if (layout & dslElectroFrame) {
343 +        bytes += sizeof(Mat3x3d);
344 +    } else if (layout & dslZAngle) {
345 +        bytes += sizeof(Vector3d);
346 +    } else if (layout & dslForce) {
347 +        bytes += sizeof(Vector3d);
348 +    } else if (layout & dslTorque) {
349 +        bytes += sizeof(Vector3d);
350 +    }
351 +    return bytes;
352 + }
353 +
354 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines