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

Comparing trunk/OOPSE-2.0/test/brains/StuntDouble.hpp (file contents):
Revision 1684 by tim, Fri Oct 29 16:20:50 2004 UTC vs.
Revision 1691 by tim, Mon Nov 1 19:57:07 2004 UTC

# Line 35 | Line 35
35  
36   #include <vector>
37  
38 < #include <core/BaseVisitor.hpp>
39 < #include <math/Quaternion.hpp>
40 < #include <math/SquareMatrix3.hpp>
41 < #include <math/Vector3.hpp>
42 < #include <utils/PropertyMap.hpp>
43 <
38 > #include "visitors/BaseVisitor.hpp"
39 > #include "math/Quaternion.hpp"
40 > #include "math/SquareMatrix3.hpp"
41 > #include "math/Vector3.hpp"
42 > #include "utils/PropertyMap.hpp"
43 > #include "brains/SnapshotManager.hpp"
44   namespace oopse{
45  
46  
# Line 80 | Line 80 | namespace oopse{
80           * Sets the global index of this stuntdouble.
81           * @param new global index to be set
82           */
83 <        void setGlobalIndex(int index) {
83 >        int setGlobalIndex(int index) {
84              return globalIndex_;
85          }
86          
# Line 136 | Line 136 | namespace oopse{
136           * Returns the previous position of this stuntdouble
137           * @return the position of this stuntdouble
138           */    
139 <        void Vector3d getPrevPos() {
140 <            return (snapshotMan_->getPrevSnapshot())->storage_->position[localIndex_];
139 >        Vector3d getPrevPos() {
140 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).position[localIndex_];
141          }
142        
143          /**
144           * Returns the current position of this stuntdouble
145           * @return the position of this stuntdouble
146           */    
147 <        void Vector3d getPos() {
148 <            return (snapshotMan_->getCurrentSnapshot())->storage_->position[localIndex_];
147 >        Vector3d getPos() {
148 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).position[localIndex_];
149          }
150  
151         /**
# Line 154 | Line 154 | namespace oopse{
154           * @param snapshotNo
155           */    
156          Vector3d getPos(int snapshotNo) {
157 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->position[localIndex_];
157 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).position[localIndex_];
158          }
159  
160         /**
# Line 163 | Line 163 | namespace oopse{
163           * @see #getPos
164           */        
165         void setPrevPos(const Vector3d& pos) {
166 <            (snapshotMan_->getPrevSnapshot())->storage_->position[localIndex_] = pos;
166 >            ((snapshotMan_->getPrevSnapshot())->*storage_).position[localIndex_] = pos;
167         }
168        
169         /**
# Line 171 | Line 171 | namespace oopse{
171           * @param pos  new position
172           */        
173          void setPos(const Vector3d& pos) {
174 <            (snapshotMan_->getCurrentSnapshot())->storage_->position[localIndex_] = pos;
174 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).position[localIndex_] = pos;
175          }
176  
177         /**
# Line 181 | Line 181 | namespace oopse{
181           * @see #getPos
182           */        
183          void setPos(const Vector3d& pos, int snapshotNo) {
184 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->position[localIndex_] = pos;
184 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).position[localIndex_] = pos;
185          }
186        
187         /**
# Line 189 | Line 189 | namespace oopse{
189           * @return the velocity of this stuntdouble
190           */    
191          Vector3d getPrevVel() {
192 <            return (snapshotMan_->getPrevSnapshot())->storage_->velocity[localIndex_];
192 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).velocity[localIndex_];
193          }
194        
195          /**
# Line 197 | Line 197 | namespace oopse{
197           * @return the velocity of this stuntdouble
198           */    
199          Vector3d getVel() {
200 <            return (snapshotMan_->getCurrentSnapshot())->storage_->velocity[localIndex_];
200 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).velocity[localIndex_];
201          }
202  
203         /**
# Line 206 | Line 206 | namespace oopse{
206           * @param snapshotNo
207           */    
208           Vector3d getVel(int snapshotNo) {
209 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->velocity[localIndex_];
209 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).velocity[localIndex_];
210          }
211  
212         /**
# Line 215 | Line 215 | namespace oopse{
215           * @see #getVel
216           */        
217         void setPrevVel(const Vector3d& vel) {
218 <            (snapshotMan_->getPrevSnapshot())->storage_->velocity[localIndex_] = vel;
218 >            ((snapshotMan_->getPrevSnapshot())->*storage_).velocity[localIndex_] = vel;
219         }
220        
221         /**
# Line 223 | Line 223 | namespace oopse{
223           * @param vel  new velocity
224           */        
225          void setVel(const Vector3d& vel) {
226 <            (snapshotMan_->getCurrentSnapshot())->storage_->velocity[localIndex_] = vel;
226 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).velocity[localIndex_] = vel;
227          }
228  
229         /**
# Line 233 | Line 233 | namespace oopse{
233           * @see #getVel
234           */        
235          void setVel(const Vector3d& vel, int snapshotNo) {
236 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->velocity[localIndex_] = vel;
236 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).velocity[localIndex_] = vel;
237          }
238  
239         /**
# Line 241 | Line 241 | namespace oopse{
241           * @return the rotation matrix of this stuntdouble
242           */    
243          RotMat3x3d getPrevA() {
244 <            return (snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_];
244 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_];
245          }
246        
247          /**
# Line 249 | Line 249 | namespace oopse{
249           * @return the rotation matrix of this stuntdouble
250           */    
251          RotMat3x3d getA() {
252 <            return (snapshotMan_->getCurrentSnapshot())->storage_->aMat[localIndex_];
252 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_];
253          }
254  
255         /**
# Line 259 | Line 259 | namespace oopse{
259           * @param snapshotNo
260           */    
261           RotMat3x3d getA(int snapshotNo) {
262 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->aMat[localIndex_];
262 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_];
263          }
264  
265         /**
# Line 268 | Line 268 | namespace oopse{
268           * @see #getA
269           */        
270         virtual void setPrevA(const RotMat3x3d& a) {
271 <            (snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_] = a;
271 >            ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_] = a;
272         }
273        
274         /**
# Line 276 | Line 276 | namespace oopse{
276           * @param a  new rotation matrix
277           */        
278          virtual void setA(const RotMat3x3d& a) {
279 <            (snapshotMan_->getCurrentSnapshot())->storage_->aMat[localIndex_] = a;
279 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_] = a;
280          }
281  
282         /**
# Line 286 | Line 286 | namespace oopse{
286           * @see #getA
287           */        
288          virtual void setA(const RotMat3x3d& a, int snapshotNo) {
289 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->aMat[localIndex_] = a;
289 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_] = a;
290          }      
291  
292         /**
# Line 294 | Line 294 | namespace oopse{
294           * @return the angular momentum of this stuntdouble
295           */    
296          Vector3d getPrevJ() {
297 <            return (snapshotMan_->getPrevSnapshot())->storage_->angularMomentum[localIndex_];
297 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).angularMomentum[localIndex_];
298          }
299        
300          /**
# Line 302 | Line 302 | namespace oopse{
302           * @return the angular momentum of this stuntdouble
303           */    
304          Vector3d getJ() {
305 <            return (snapshotMan_->getCurrentSnapshot())->storage_->angularMomentum[localIndex_];
305 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).angularMomentum[localIndex_];
306          }
307  
308         /**
# Line 311 | Line 311 | namespace oopse{
311           * @param snapshotNo
312           */    
313           Vector3d getJ(int snapshotNo) {
314 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->angularMomentum[localIndex_];
314 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).angularMomentum[localIndex_];
315          }
316  
317         /**
# Line 320 | Line 320 | namespace oopse{
320           * @see #getJ
321           */        
322         void setPrevJ(const Vector3d& angMom) {
323 <            (snapshotMan_->getPrevSnapshot())->storage_->angularMomentum[localIndex_] = angMom;
323 >            ((snapshotMan_->getPrevSnapshot())->*storage_).angularMomentum[localIndex_] = angMom;
324         }
325        
326         /**
# Line 328 | Line 328 | namespace oopse{
328           * @param angMom  new angular momentum
329           */        
330          void setJ(const Vector3d& angMom) {
331 <            (snapshotMan_->getCurrentSnapshot())->storage_->angularMomentum[localIndex_] = angMom;
331 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).angularMomentum[localIndex_] = angMom;
332          }
333  
334         /**
# Line 338 | Line 338 | namespace oopse{
338           * @see #getJ
339           */        
340          void setJ(const Vector3d& angMom, int snapshotNo) {
341 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->angularMomentum[localIndex_] = angMom;
341 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).angularMomentum[localIndex_] = angMom;
342          }
343          
344         /**
# Line 346 | Line 346 | namespace oopse{
346           * @return the quaternion of this stuntdouble
347           */    
348          Quat4d getPrevQ() {
349 <            return (snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_].toQuaternion();
349 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_].toQuaternion();
350          }
351        
352          /**
# Line 354 | Line 354 | namespace oopse{
354           * @return the quaternion of this stuntdouble
355           */    
356          Quat4d getQ() {
357 <            return (snapshotMan_->getCurrentSnapshot())->storage_->aMat[localIndex_].toQuaternion();
357 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_].toQuaternion();
358          }
359  
360         /**
# Line 363 | Line 363 | namespace oopse{
363           * @param snapshotNo
364           */    
365           Quat4d getQ(int snapshotNo) {
366 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->aMat[localIndex_].toQuaternion();
366 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_].toQuaternion();
367          }
368  
369         /**
# Line 372 | Line 372 | namespace oopse{
372           * @note actual storage data is rotation matrix
373           */        
374         void setPrevQ(const Quat4d& q) {
375 <            (snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_] = q;
375 >            ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_] = q;
376         }
377        
378         /**
# Line 381 | Line 381 | namespace oopse{
381           * @note actual storage data is rotation matrix
382           */        
383          void setQ(const Quat4d& q) {
384 <            (snapshotMan_->getCurrentSnapshot())->storage_->aMat[localIndex_] = q;
384 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_] = q;
385          }
386  
387         /**
# Line 392 | Line 392 | namespace oopse{
392           * @note actual storage data is rotation matrix
393           */        
394          void setQ(const Quat4d& q, int snapshotNo) {
395 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->aMat[localIndex_] = q;
395 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_] = q;
396          }
397  
398         /**
# Line 400 | Line 400 | namespace oopse{
400           * @return the euler angles of this stuntdouble
401           */    
402          Vector3d getPrevEuler() {
403 <            return (snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_].toEulerAngles();
403 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_].toEulerAngles();
404          }
405        
406          /**
# Line 408 | Line 408 | namespace oopse{
408           * @return the euler angles of this stuntdouble
409           */    
410          Vector3d getEuler() {
411 <            return (snapshotMan_->getCurrentSnapshot())->storage_->aMat[localIndex_].toEulerAngles();
411 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_].toEulerAngles();
412          }
413  
414         /**
# Line 417 | Line 417 | namespace oopse{
417           * @param snapshotNo
418           */    
419           Vector3d getEuler(int snapshotNo) {
420 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->aMat[localIndex_].toEulerAngles();
420 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_].toEulerAngles();
421          }
422  
423         /**
# Line 427 | Line 427 | namespace oopse{
427           * @note actual storage data is rotation matrix        
428           */        
429         void setPrevEuler(const Vector3d& euler) {
430 <            (snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_] = euler;
430 >            ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_] = euler;
431         }
432        
433         /**
# Line 435 | Line 435 | namespace oopse{
435           * @param euler  new euler angles
436           */        
437          void setEuler(const Vector3d& euler) {
438 <            (snapshotMan_->getCurrentSnapshot())->storage_->aMat[localIndex_] = euler;
438 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_] = euler;
439          }
440  
441         /**
# Line 446 | Line 446 | namespace oopse{
446           * @note actual storage data is rotation matrix                  
447           */        
448          void setEuler(const Vector3d& euler, int snapshotNo) {
449 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->aMat[localIndex_] = euler;
449 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_] = euler;
450          }
451        
452         /**
# Line 454 | Line 454 | namespace oopse{
454           * @return the unit vectors of this stuntdouble
455           */    
456          Vector3d getPrevUnitVector() {
457 <            return (snapshotMan_->getPrevSnapshot())->storage_->unitVector[localIndex_];
457 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).unitVector[localIndex_];
458          }
459        
460          /**
# Line 462 | Line 462 | namespace oopse{
462           * @return the unit vectors of this stuntdouble
463           */    
464          Vector3d getUnitVector() {
465 <            return (snapshotMan_->getCurrentSnapshot())->storage_->unitVector[localIndex_];
465 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).unitVector[localIndex_];
466          }
467  
468         /**
# Line 472 | Line 472 | namespace oopse{
472           * @param snapshotNo
473           */    
474           Vector3d getUnitVector(int snapshotNo) {
475 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->unitVector[localIndex_];
475 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).unitVector[localIndex_];
476          }
477  
478         /**
# Line 480 | Line 480 | namespace oopse{
480           * @return the force of this stuntdouble
481           */    
482          Vector3d getPrevFrc() {
483 <            return (snapshotMan_->getPrevSnapshot())->storage_->force[localIndex_];
483 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).force[localIndex_];
484          }
485        
486          /**
# Line 488 | Line 488 | namespace oopse{
488           * @return the force of this stuntdouble
489           */    
490          Vector3d getFrc() {
491 <            return (snapshotMan_->getCurrentSnapshot())->storage_->force[localIndex_];
491 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).force[localIndex_];
492          }
493  
494         /**
# Line 498 | Line 498 | namespace oopse{
498           * @param snapshotNo
499           */    
500           Vector3d getFrc(int snapshotNo) {
501 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->force[localIndex_];
501 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).force[localIndex_];
502          }
503  
504         /**
# Line 508 | Line 508 | namespace oopse{
508           * @see #getFrc
509           */        
510         void setPrevFrc(const Vector3d& frc) {
511 <            (snapshotMan_->getPrevSnapshot())->storage_->force[localIndex_] = frc;
511 >            ((snapshotMan_->getPrevSnapshot())->*storage_).force[localIndex_] = frc;
512         }
513        
514         /**
# Line 516 | Line 516 | namespace oopse{
516           * @param frc  new force
517           */        
518          void setFrc(const Vector3d& frc) {
519 <            (snapshotMan_->getCurrentSnapshot())->storage_->force[localIndex_] = frc;
519 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).force[localIndex_] = frc;
520          }
521  
522         /**
# Line 527 | Line 527 | namespace oopse{
527           * @see #getFrc
528           */        
529          void setFrc(const Vector3d& frc, int snapshotNo) {
530 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->force[localIndex_] = frc;
530 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).force[localIndex_] = frc;
531          }
532  
533         /**
# Line 536 | Line 536 | namespace oopse{
536           * @param frc  new force
537           * @see #getFrc
538           */        
539 <       void setPrevFrc(const Vector3d& frc) {
540 <            (snapshotMan_->getPrevSnapshot())->storage_->force[localIndex_] += frc;
539 >       void addPrevFrc(const Vector3d& frc) {
540 >            ((snapshotMan_->getPrevSnapshot())->*storage_).force[localIndex_] += frc;
541         }
542        
543         /**
544           * Adds force into the current force of this stuntdouble
545           * @param frc  new force
546           */        
547 <        void setFrc(const Vector3d& frc) {
548 <            (snapshotMan_->getCurrentSnapshot())->storage_->force[localIndex_] += frc;
547 >        void addFrc(const Vector3d& frc) {
548 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).force[localIndex_] += frc;
549          }
550  
551         /**
# Line 555 | Line 555 | namespace oopse{
555           * @param snapshotNo
556           * @see #getFrc
557           */        
558 <        void setFrc(const Vector3d& frc, int snapshotNo) {
559 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->force[localIndex_] += frc;
558 >        void addFrc(const Vector3d& frc, int snapshotNo) {
559 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).force[localIndex_] += frc;
560          }
561  
562         /**
# Line 564 | Line 564 | namespace oopse{
564           * @return the torque of this stuntdouble
565           */    
566          Vector3d getPrevTrq() {
567 <            return (snapshotMan_->getPrevSnapshot())->storage_->torque[localIndex_];
567 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).torque[localIndex_];
568          }
569        
570          /**
# Line 572 | Line 572 | namespace oopse{
572           * @return the torque of this stuntdouble
573           */    
574          Vector3d getTrq() {
575 <            return (snapshotMan_->getCurrentSnapshot())->storage_->torque[localIndex_];
575 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).torque[localIndex_];
576          }
577  
578         /**
# Line 582 | Line 582 | namespace oopse{
582           * @param snapshotNo
583           */    
584           Vector3d getTrq(int snapshotNo) {
585 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->torque[localIndex_];
585 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).torque[localIndex_];
586          }
587  
588         /**
# Line 592 | Line 592 | namespace oopse{
592           * @see #getTrq
593           */        
594         void setPrevTrq(const Vector3d& trq) {
595 <            (snapshotMan_->getPrevSnapshot())->storage_->torque[localIndex_] = trq;
595 >            ((snapshotMan_->getPrevSnapshot())->*storage_).torque[localIndex_] = trq;
596         }
597        
598         /**
# Line 600 | Line 600 | namespace oopse{
600           * @param trq  new torque
601           */        
602          void setTrq(const Vector3d& trq) {
603 <            (snapshotMan_->getCurrentSnapshot())->storage_->torque[localIndex_] = trq;
603 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).torque[localIndex_] = trq;
604          }
605  
606         /**
# Line 611 | Line 611 | namespace oopse{
611           * @see #getTrq
612           */        
613          void setTrq(const Vector3d& trq, int snapshotNo) {
614 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->torque[localIndex_] = trq;
614 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).torque[localIndex_] = trq;
615          }
616  
617         /**
# Line 621 | Line 621 | namespace oopse{
621           * @see #getTrq
622           */        
623         void addPrevTrq(const Vector3d& trq) {
624 <            (snapshotMan_->getPrevSnapshot())->storage_->torque[localIndex_] += trq;
624 >            ((snapshotMan_->getPrevSnapshot())->*storage_).torque[localIndex_] += trq;
625         }
626        
627         /**
# Line 629 | Line 629 | namespace oopse{
629           * @param trq  new torque
630           */        
631          void addTrq(const Vector3d& trq) {
632 <            (snapshotMan_->getCurrentSnapshot())->storage_->torque[localIndex_] += trq;
632 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).torque[localIndex_] += trq;
633          }
634  
635         /**
# Line 640 | Line 640 | namespace oopse{
640           * @see #getTrq
641           */        
642          void addTrq(const Vector3d& trq, int snapshotNo) {
643 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->torque[localIndex_] += trq;
643 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).torque[localIndex_] += trq;
644          }      
645  
646  
# Line 648 | Line 648 | namespace oopse{
648           * Returns the previous z-angle of this stuntdouble
649           * @return the z-angle of this stuntdouble
650           */    
651 <        Vector3d getPrevZangle() {
652 <            return (snapshotMan_->getPrevSnapshot())->storage_->zAngle[localIndex_];
651 >        double getPrevZangle() {
652 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_];
653          }
654        
655          /**
656           * Returns the current z-angle of this stuntdouble
657           * @return the z-angle of this stuntdouble
658           */    
659 <        Vector3d getZangle() {
660 <            return (snapshotMan_->getCurrentSnapshot())->storage_->zAngle[localIndex_];
659 >        double getZangle() {
660 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_];
661          }
662  
663         /**
# Line 665 | Line 665 | namespace oopse{
665           * @return the z-angle of this stuntdouble
666           * @param snapshotNo
667           */    
668 <         Vector3d getZangle(int snapshotNo) {
669 <            return (snapshotMan_->getSnapshot(snapShotNo))->storage_->zAngle[localIndex_];
668 >         double getZangle(int snapshotNo) {
669 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_];
670          }
671  
672         /**
# Line 674 | Line 674 | namespace oopse{
674           * @param angle  new z-angle
675           * @see #getZangle
676           */        
677 <       void setPrevZangle(const Vector3d& angle) {
678 <            (snapshotMan_->getPrevSnapshot())->storage_->zAngle[localIndex_] = angle;
677 >       void setPrevZangle(double angle) {
678 >            ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_] = angle;
679         }
680        
681         /**
682           * Sets  the current z-angle of this stuntdouble
683           * @param angle  new z-angle
684           */        
685 <        void setZangle(const Vector3d& angle) {
686 <            (snapshotMan_->getCurrentSnapshot())->storage_->zAngle[localIndex_] = angle;
685 >        void setZangle(double angle) {
686 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_] = angle;
687          }
688  
689         /**
# Line 692 | Line 692 | namespace oopse{
692           * @param snapshotNo
693           * @see #getZangle
694           */        
695 <        void setZangle(const Vector3d& angle, int snapshotNo) {
696 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->zAngle[localIndex_] = angle;
695 >        void setZangle(double angle, int snapshotNo) {
696 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_] = angle;
697          }
698  
699         /**
# Line 701 | Line 701 | namespace oopse{
701           * @param angle  new z-angle
702           * @see #getZangle
703           */        
704 <       void addPrevZangle(const Vector3d& angle) {
705 <            (snapshotMan_->getPrevSnapshot())->storage_->zAngle[localIndex_] += angle;
704 >       void addPrevZangle(double angle) {
705 >            ((snapshotMan_->getPrevSnapshot())->*storage_).zAngle[localIndex_] += angle;
706         }
707        
708         /**
709           * Adds z-angle into the current z-angle of this stuntdouble
710           * @param angle  new z-angle
711           */        
712 <        void addZangle(const Vector3d& angle) {
713 <            (snapshotMan_->getCurrentSnapshot())->storage_->zAngle[localIndex_] += angle;
712 >        void addZangle(double angle) {
713 >            ((snapshotMan_->getCurrentSnapshot())->*storage_).zAngle[localIndex_] += angle;
714          }
715  
716         /**
# Line 719 | Line 719 | namespace oopse{
719           * @param snapshotNo
720           * @see #getZangle
721           */        
722 <        void addZangle(const Vector3d& angle, int snapshotNo) {
723 <            (snapshotMan_->getSnapshot(snapshotNo))->storage_->zAngle[localIndex_] += angle;
722 >        void addZangle(double angle, int snapshotNo) {
723 >            ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).zAngle[localIndex_] += angle;
724          }      
725  
726 +        /** Set the force of this stuntdouble to zero */
727 +        virtual void zeroForces();
728         /**
729           * Returns the inertia tensor of this stuntdouble
730           * @return the inertia tensor of this stuntdouble
# Line 838 | Line 840 | namespace oopse{
840           * @return a pointer point to property with propName. If no property named propName
841           * exists, return NULL
842           */      
843 <        GenericData* getPropertyByName(std:string& propName);
843 >        GenericData* getPropertyByName(std::string& propName);
844  
845      protected:
846          
847 <        StuntDouble();
847 >        StuntDouble(ObjectType objType, DataStoragePointer storage);
848          
849          StuntDouble(const StuntDouble& sd);
850          StuntDouble& operator=(const StuntDouble& sd);
# Line 855 | Line 857 | namespace oopse{
857          DataStoragePointer storage_;
858          SnapshotManager* snapshotMan_;
859          
858    private:
859        
860          int globalIndex_;
861          int localIndex_;
862 +        
863 +    private:
864  
865          std::string name_;
866  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines