home *** CD-ROM | disk | FTP | other *** search
- package Box2D.Common.Math
- {
- public class b2XForm
- {
-
-
- public var position:b2Vec2;
-
- public var R:b2Mat22;
-
- public function b2XForm(pos:b2Vec2 = null, r:b2Mat22 = null)
- {
- position = new b2Vec2();
- R = new b2Mat22();
- super();
- if(pos)
- {
- position.SetV(pos);
- R.SetM(r);
- }
- }
-
- public function Initialize(pos:b2Vec2, r:b2Mat22) : void
- {
- position.SetV(pos);
- R.SetM(r);
- }
-
- public function Set(x:b2XForm) : void
- {
- position.SetV(x.position);
- R.SetM(x.R);
- }
-
- public function SetIdentity() : void
- {
- position.SetZero();
- R.SetIdentity();
- }
- }
- }
-