ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/primitives/StuntDouble.hpp
(Generate patch)

Comparing trunk/src/primitives/StuntDouble.hpp (file contents):
Revision 944 by gezelter, Wed Aug 10 19:17:39 2005 UTC vs.
Revision 945 by gezelter, Tue Apr 25 02:09:01 2006 UTC

# Line 168 | Line 168 | namespace oopse{
168      }
169  
170      /**
171 +     * Freezes out all velocity, angular velocity, forces and torques
172 +     * on this StuntDouble.  Also computes the number of frozen degrees
173 +     * of freedom.
174 +     * @return the total number of frozen degrees of freedom
175 +     */  
176 +    int freeze() {
177 +      
178 +      int fdf = 3;
179 +
180 +      setVel(V3Zero);
181 +      setFrc(V3Zero);
182 +      if (isDirectional()){
183 +        setJ(V3Zero);
184 +        setTrq(V3Zero);
185 +        if (isLinear())
186 +          fdf +=2;
187 +        else
188 +          fdf +=3;        
189 +      }      
190 +      return fdf;
191 +    }
192 +
193 +    /**
194       * Returns the previous position of this stuntdouble
195       * @return the position of this stuntdouble
196       */    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines