| 31 |
|
|
| 32 |
|
} |
| 33 |
|
|
| 34 |
+ |
void RigidBody::setPrevA(const RotMat3x3d& a) { |
| 35 |
+ |
(snapshotMan_->getPrevSnapshot())->storage_->aMat[localIndex_] = a; |
| 36 |
+ |
(snapshotMan_->getPrevSnapshot())->storage_->unitVector[localIndex_] = a.inverse() * sU_.getColum(2); |
| 37 |
+ |
} |
| 38 |
+ |
|
| 39 |
+ |
|
| 40 |
+ |
void RigidBody::setA(const RotMat3x3d& a) { |
| 41 |
+ |
(snapshotMan_->getCurrentSnapshot())->storage_->aMat[localIndex_] = a; |
| 42 |
+ |
(snapshotMan_->getCurrentSnapshot())->storage_->unitVector[localIndex_] = a.inverse() * sU_.getColum(2); |
| 43 |
+ |
} |
| 44 |
+ |
|
| 45 |
+ |
void RigidBody::setA(const RotMat3x3d& a, int snapshotNo) { |
| 46 |
+ |
(snapshotMan_->getSnapshot(snapshotNo))->storage_->aMat[localIndex_] = a; |
| 47 |
+ |
(snapshotMan_->getSnapshot(snapshotNo))->storage_->unitVector[localIndex_] = a.inverse() * sU_.getColum(2); |
| 48 |
+ |
} |
| 49 |
+ |
|
| 50 |
|
Mat3x3d RigidBody::getI() { |
| 51 |
|
return inertiaTensor_; |
| 52 |
|
} |