ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/primitives/RigidBody.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/primitives/RigidBody.cpp (file contents):
Revision 1937 by tim, Thu Jan 13 19:40:37 2005 UTC vs.
Revision 1957 by tim, Tue Jan 25 17:45:23 2005 UTC

# Line 172 | Line 172 | void  RigidBody::calcRefCoords() {
172          Itmp(0, 0) += mtmp * r2;
173          Itmp(1, 1) += mtmp * r2;
174          Itmp(2, 2) += mtmp * r2;
175 +    }
176 +
177 +    //project the inertial moment of directional atoms into this rigid body
178 +    for (std::size_t i = 0; i < atoms_.size(); i++) {
179 +        if (atoms_[i]->isDirectional()) {
180 +            RectMatrix<double, 3, 3> Iproject = refOrients_[i].transpose() * atoms_[i]->getI();
181 +            Itmp(0, 0) += Iproject(0, 0);
182 +            Itmp(1, 1) += Iproject(1, 1);
183 +            Itmp(2, 2) += Iproject(2, 2);
184 +        }
185      }
186  
187      //diagonalize

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines