ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/primitives/StuntDouble.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/primitives/StuntDouble.hpp (file contents):
Revision 1692 by tim, Mon Nov 1 20:15:58 2004 UTC vs.
Revision 1813 by tim, Wed Dec 1 17:38:32 2004 UTC

# Line 30 | Line 30
30   * @version 1.0
31   */
32    
33 < #ifndef _STUNTDOUBLE_HPP_
34 < #define _STUNTDOUBLE_HPP_
33 > #ifndef PRIMITIVES_STUNTDOUBLE_HPP
34 > #define PRIMITIVES_STUNTDOUBLE_HPP
35  
36   #include <vector>
37  
# Line 40 | Line 40
40   #include "math/SquareMatrix3.hpp"
41   #include "math/Vector3.hpp"
42   #include "utils/PropertyMap.hpp"
43 + #include "brains/Snapshot.hpp"
44   #include "brains/SnapshotManager.hpp"
45   namespace oopse{
46  
# Line 55 | Line 56 | namespace oopse{
56     * provides an interface for the Integrators and Minimizers to use,
57     * and does some preliminary sanity checking so that the program
58     * doesn't try to do something stupid like torque an Atom
59 <   * @note the dynamoc data of stuntdouble will be stored outside of the class
59 >   * @note the dynamic data of stuntdouble will be stored outside of the class
60     */
61     class StuntDouble{
62     public:    
# Line 98 | Line 99 | namespace oopse{
99           */        
100          void setLocalIndex(int index) {
101              localIndex_ = index;
102 +        }
103 +
104 +        /**
105 +         * Sets the Snapshot Manager of this stuntdouble
106 +         */
107 +        void setSnapshotManager(SnapshotManager* sman) {
108 +            snapshotMan_ = sman;
109          }
110  
111          /**
# Line 453 | Line 461 | namespace oopse{
461           * Returns the previous unit vectors of this stuntdouble
462           * @return the unit vectors of this stuntdouble
463           */    
464 <        Vector3d getPrevUnitVector() {
465 <            return ((snapshotMan_->getPrevSnapshot())->*storage_).unitVector[localIndex_];
464 >        RotMat3x3d getPrevElectroFrame() {
465 >            return ((snapshotMan_->getPrevSnapshot())->*storage_).electroFrame[localIndex_];
466          }
467        
468          /**
469           * Returns the current unit vectors of this stuntdouble
470           * @return the unit vectors of this stuntdouble
471           */    
472 <        Vector3d getUnitVector() {
473 <            return ((snapshotMan_->getCurrentSnapshot())->*storage_).unitVector[localIndex_];
472 >        RotMat3x3d getElectroFrame() {
473 >            return ((snapshotMan_->getCurrentSnapshot())->*storage_).electroFrame[localIndex_];
474          }
475  
476         /**
# Line 471 | Line 479 | namespace oopse{
479           * @return the unit vectors of this stuntdouble
480           * @param snapshotNo
481           */    
482 <         Vector3d getUnitVector(int snapshotNo) {
483 <            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).unitVector[localIndex_];
482 >         RotMat3x3d getElectroFrame(int snapshotNo) {
483 >            return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electroFrame[localIndex_];
484          }
485  
486         /**
# Line 815 | Line 823 | namespace oopse{
823           * Removes property from PropertyMap by name
824           * @param propName the name of property to be removed
825           */
826 <        void removeProperty(std::string& propName);
826 >        void removeProperty(const std::string& propName);
827  
828          /**
829           * clear all of the properties
# Line 840 | Line 848 | namespace oopse{
848           * @return a pointer point to property with propName. If no property named propName
849           * exists, return NULL
850           */      
851 <        GenericData* getPropertyByName(std::string& propName);
851 >        GenericData* getPropertyByName(const std::string& propName);
852  
853      protected:
854          
# Line 870 | Line 878 | namespace oopse{
878      };
879  
880   }//end namespace oopse
881 < #endif //ifndef _STUNTDOUBLE_HPP_
881 > #endif //PRIMITIVES_STUNTDOUBLE_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines