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

Comparing trunk/OOPSE-4/src/math/SquareMatrix3.hpp (file contents):
Revision 2583 by tim, Thu Feb 2 17:14:15 2006 UTC vs.
Revision 2596 by tim, Wed Feb 22 20:35:16 2006 UTC

# Line 166 | Line 166 | namespace oopse {
166      void setupRotMat(Real w, Real x, Real y, Real z) {
167        Quaternion<Real> q(w, x, y, z);
168        *this = q.toRotationMatrix3();
169 +    }
170 +
171 +    void setupSkewMat(Vector3<Real> v) {
172 +        setupSkewMat(v[0], v[1], v[2]);
173 +    }
174 +
175 +    void setupSkewMat(Real v1, Real v2, Real v3) {
176 +        this->data_[0][0] = 0;
177 +        this->data_[0][1] = -v3;
178 +        this->data_[0][2] = v2;
179 +        this->data_[1][0] = v3;
180 +        this->data_[1][1] = 0;
181 +        this->data_[1][2] = -v1;
182 +        this->data_[2][0] = -v2;
183 +        this->data_[2][1] = v1;
184 +        this->data_[2][2] = 0;
185 +        
186 +        
187      }
188 +
189 +
190  
191      /**
192       * Returns the quaternion from this rotation matrix

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines