| 1089 |
|
} |
| 1090 |
|
|
| 1091 |
|
|
| 1092 |
+ |
/** |
| 1093 |
+ |
* Returns the previous electric field of this stuntDouble |
| 1094 |
+ |
* @return the electric field of this stuntDouble |
| 1095 |
+ |
*/ |
| 1096 |
+ |
Vector3d getPrevElectricField() { |
| 1097 |
+ |
return ((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_]; |
| 1098 |
+ |
} |
| 1099 |
+ |
|
| 1100 |
+ |
/** |
| 1101 |
+ |
* Returns the current electric field of this stuntDouble |
| 1102 |
+ |
* @return the electric field of this stuntDouble |
| 1103 |
+ |
*/ |
| 1104 |
+ |
Vector3d getElectricField() { |
| 1105 |
+ |
return ((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_]; |
| 1106 |
+ |
} |
| 1107 |
|
|
| 1108 |
+ |
/** |
| 1109 |
+ |
* Returns the electric field of this stuntDouble in specified snapshot |
| 1110 |
+ |
* @return the electric field of this stuntDouble |
| 1111 |
+ |
* @param snapshotNo |
| 1112 |
+ |
*/ |
| 1113 |
+ |
Vector3d getElectricField(int snapshotNo) { |
| 1114 |
+ |
return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_]; |
| 1115 |
+ |
} |
| 1116 |
|
|
| 1117 |
+ |
/** |
| 1118 |
+ |
* Sets the previous electric field of this stuntDouble |
| 1119 |
+ |
* @param pos new electric field |
| 1120 |
+ |
* @see #getElectricField |
| 1121 |
+ |
*/ |
| 1122 |
+ |
void setPrevElectricField(const Vector3d& pos) { |
| 1123 |
+ |
((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] = pos; |
| 1124 |
+ |
} |
| 1125 |
+ |
|
| 1126 |
+ |
/** |
| 1127 |
+ |
* Sets the current electric field of this stuntDouble |
| 1128 |
+ |
* @param pos new electric field |
| 1129 |
+ |
*/ |
| 1130 |
+ |
void setElectricField(const Vector3d& pos) { |
| 1131 |
+ |
DataStorage& data = snapshotMan_->getCurrentSnapshot()->*storage_; |
| 1132 |
+ |
data.electricField[localIndex_] = pos; |
| 1133 |
+ |
//((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] = pos; |
| 1134 |
+ |
} |
| 1135 |
+ |
|
| 1136 |
+ |
/** |
| 1137 |
+ |
* Sets the electric field of this stuntDouble in specified snapshot |
| 1138 |
+ |
* @param pos electric field to be set |
| 1139 |
+ |
* @param snapshotNo |
| 1140 |
+ |
* @see #getElectricField |
| 1141 |
+ |
*/ |
| 1142 |
+ |
void setElectricField(const Vector3d& pos, int snapshotNo) { |
| 1143 |
+ |
|
| 1144 |
+ |
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] = pos; |
| 1145 |
+ |
|
| 1146 |
+ |
} |
| 1147 |
+ |
|
| 1148 |
+ |
|
| 1149 |
|
/** Set the force of this stuntDouble to zero */ |
| 1150 |
|
void zeroForcesAndTorques(); |
| 1151 |
|
/** |