home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / pup_idol.swf / scripts / Box2D / Dynamics / Joints / b2Joint.as < prev    next >
Encoding:
Text File  |  2008-08-07  |  4.0 KB  |  161 lines

  1. package Box2D.Dynamics.Joints
  2. {
  3.    import Box2D.Common.Math.b2Vec2;
  4.    import Box2D.Dynamics.b2Body;
  5.    import Box2D.Dynamics.b2TimeStep;
  6.    
  7.    public class b2Joint
  8.    {
  9.       
  10.       public static const e_unknownJoint:int = 0;
  11.       
  12.       public static const e_inactiveLimit:int = 0;
  13.       
  14.       public static const e_atUpperLimit:int = 2;
  15.       
  16.       public static const e_atLowerLimit:int = 1;
  17.       
  18.       public static const e_gearJoint:int = 6;
  19.       
  20.       public static const e_revoluteJoint:int = 1;
  21.       
  22.       public static const e_equalLimits:int = 3;
  23.       
  24.       public static const e_distanceJoint:int = 3;
  25.       
  26.       public static const e_pulleyJoint:int = 4;
  27.       
  28.       public static const e_prismaticJoint:int = 2;
  29.       
  30.       public static const e_mouseJoint:int = 5;
  31.        
  32.       
  33.       public var m_islandFlag:Boolean;
  34.       
  35.       public var m_collideConnected:Boolean;
  36.       
  37.       public var m_prev:b2Joint;
  38.       
  39.       public var m_next:b2Joint;
  40.       
  41.       public var m_type:int;
  42.       
  43.       public var m_node1:b2JointNode;
  44.       
  45.       public var m_node2:b2JointNode;
  46.       
  47.       public var m_userData:*;
  48.       
  49.       public var m_body1:b2Body;
  50.       
  51.       public var m_body2:b2Body;
  52.       
  53.       public function b2Joint(param1:b2JointDef)
  54.       {
  55.          m_node1 = new b2JointNode();
  56.          m_node2 = new b2JointNode();
  57.          super();
  58.          m_type = param1.type;
  59.          m_prev = null;
  60.          m_next = null;
  61.          m_body1 = param1.body1;
  62.          m_body2 = param1.body2;
  63.          m_collideConnected = param1.collideConnected;
  64.          m_islandFlag = false;
  65.          m_userData = param1.userData;
  66.       }
  67.       
  68.       public static function Destroy(param1:b2Joint, param2:*) : void
  69.       {
  70.       }
  71.       
  72.       public static function Create(param1:b2JointDef, param2:*) : b2Joint
  73.       {
  74.          var _loc3_:b2Joint = null;
  75.          switch(param1.type)
  76.          {
  77.             case e_distanceJoint:
  78.                _loc3_ = new b2DistanceJoint(param1 as b2DistanceJointDef);
  79.                break;
  80.             case e_mouseJoint:
  81.                _loc3_ = new b2MouseJoint(param1 as b2MouseJointDef);
  82.                break;
  83.             case e_prismaticJoint:
  84.                _loc3_ = new b2PrismaticJoint(param1 as b2PrismaticJointDef);
  85.                break;
  86.             case e_revoluteJoint:
  87.                _loc3_ = new b2RevoluteJoint(param1 as b2RevoluteJointDef);
  88.                break;
  89.             case e_pulleyJoint:
  90.                _loc3_ = new b2PulleyJoint(param1 as b2PulleyJointDef);
  91.                break;
  92.             case e_gearJoint:
  93.                _loc3_ = new b2GearJoint(param1 as b2GearJointDef);
  94.          }
  95.          return _loc3_;
  96.       }
  97.       
  98.       public function GetAnchor1() : b2Vec2
  99.       {
  100.          return null;
  101.       }
  102.       
  103.       public function GetAnchor2() : b2Vec2
  104.       {
  105.          return null;
  106.       }
  107.       
  108.       public function GetNext() : b2Joint
  109.       {
  110.          return m_next;
  111.       }
  112.       
  113.       public function GetType() : int
  114.       {
  115.          return m_type;
  116.       }
  117.       
  118.       public function SolveVelocityConstraints(param1:b2TimeStep) : void
  119.       {
  120.       }
  121.       
  122.       public function PrepareVelocitySolver() : void
  123.       {
  124.       }
  125.       
  126.       public function PreparePositionSolver() : void
  127.       {
  128.       }
  129.       
  130.       public function GetReactionTorque(param1:Number) : Number
  131.       {
  132.          return 0;
  133.       }
  134.       
  135.       public function GetUserData() : *
  136.       {
  137.          return m_userData;
  138.       }
  139.       
  140.       public function GetReactionForce(param1:Number) : b2Vec2
  141.       {
  142.          return null;
  143.       }
  144.       
  145.       public function SolvePositionConstraints() : Boolean
  146.       {
  147.          return false;
  148.       }
  149.       
  150.       public function GetBody1() : b2Body
  151.       {
  152.          return m_body1;
  153.       }
  154.       
  155.       public function GetBody2() : b2Body
  156.       {
  157.          return m_body2;
  158.       }
  159.    }
  160. }
  161.