home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / Beez.swf / scripts / Box2D / Common / Math / b2XForm.as < prev   
Encoding:
Text File  |  2008-09-03  |  834 b   |  42 lines

  1. package Box2D.Common.Math
  2. {
  3.    public class b2XForm
  4.    {
  5.        
  6.       
  7.       public var position:b2Vec2;
  8.       
  9.       public var R:b2Mat22;
  10.       
  11.       public function b2XForm(pos:b2Vec2 = null, r:b2Mat22 = null)
  12.       {
  13.          position = new b2Vec2();
  14.          R = new b2Mat22();
  15.          super();
  16.          if(pos)
  17.          {
  18.             position.SetV(pos);
  19.             R.SetM(r);
  20.          }
  21.       }
  22.       
  23.       public function Initialize(pos:b2Vec2, r:b2Mat22) : void
  24.       {
  25.          position.SetV(pos);
  26.          R.SetM(r);
  27.       }
  28.       
  29.       public function Set(x:b2XForm) : void
  30.       {
  31.          position.SetV(x.position);
  32.          R.SetM(x.R);
  33.       }
  34.       
  35.       public function SetIdentity() : void
  36.       {
  37.          position.SetZero();
  38.          R.SetIdentity();
  39.       }
  40.    }
  41. }
  42.