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 |
|
|
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 |
|
|
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: |
454 |
|
* Returns the previous unit vectors of this stuntdouble |
455 |
|
* @return the unit vectors of this stuntdouble |
456 |
|
*/ |
457 |
< |
Vector3d getPrevUnitVector() { |
458 |
< |
return ((snapshotMan_->getPrevSnapshot())->*storage_).unitVector[localIndex_]; |
457 |
> |
RotMat3x3d getPrevUnitFrame() { |
458 |
> |
return ((snapshotMan_->getPrevSnapshot())->*storage_).unitFrame[localIndex_]; |
459 |
|
} |
460 |
|
|
461 |
|
/** |
462 |
|
* Returns the current unit vectors of this stuntdouble |
463 |
|
* @return the unit vectors of this stuntdouble |
464 |
|
*/ |
465 |
< |
Vector3d getUnitVector() { |
466 |
< |
return ((snapshotMan_->getCurrentSnapshot())->*storage_).unitVector[localIndex_]; |
465 |
> |
RotMat3x3d getUnitFrame() { |
466 |
> |
return ((snapshotMan_->getCurrentSnapshot())->*storage_).unitFrame[localIndex_]; |
467 |
|
} |
468 |
|
|
469 |
|
/** |
472 |
|
* @return the unit vectors of this stuntdouble |
473 |
|
* @param snapshotNo |
474 |
|
*/ |
475 |
< |
Vector3d getUnitVector(int snapshotNo) { |
476 |
< |
return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).unitVector[localIndex_]; |
475 |
> |
RotMat3x3d getUnitFrame(int snapshotNo) { |
476 |
> |
return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).unitFrame[localIndex_]; |
477 |
|
} |
478 |
|
|
479 |
|
/** |
816 |
|
* Removes property from PropertyMap by name |
817 |
|
* @param propName the name of property to be removed |
818 |
|
*/ |
819 |
< |
void removeProperty(std::string& propName); |
819 |
> |
void removeProperty(const std::string& propName); |
820 |
|
|
821 |
|
/** |
822 |
|
* clear all of the properties |
841 |
|
* @return a pointer point to property with propName. If no property named propName |
842 |
|
* exists, return NULL |
843 |
|
*/ |
844 |
< |
GenericData* getPropertyByName(std::string& propName); |
844 |
> |
GenericData* getPropertyByName(const std::string& propName); |
845 |
|
|
846 |
|
protected: |
847 |
|
|
871 |
|
}; |
872 |
|
|
873 |
|
}//end namespace oopse |
874 |
< |
#endif //ifndef _STUNTDOUBLE_HPP_ |
874 |
> |
#endif //PRIMITIVES_STUNTDOUBLE_HPP |