home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / Beez.swf / scripts / Box2D / Collision / b2ContactID.as < prev    next >
Encoding:
Text File  |  2008-09-03  |  1008 b   |  45 lines

  1. package Box2D.Collision
  2. {
  3.    public class b2ContactID
  4.    {
  5.        
  6.       
  7.       public var _key:uint;
  8.       
  9.       public var features:Features;
  10.       
  11.       public function b2ContactID()
  12.       {
  13.          features = new Features();
  14.          super();
  15.          features._m_id = this;
  16.       }
  17.       
  18.       public function Set(id:b2ContactID) : void
  19.       {
  20.          key = id._key;
  21.       }
  22.       
  23.       public function Copy() : b2ContactID
  24.       {
  25.          var id:b2ContactID = new b2ContactID();
  26.          id.key = key;
  27.          return id;
  28.       }
  29.       
  30.       public function set key(value:uint) : void
  31.       {
  32.          _key = value;
  33.          features._referenceEdge = _key & 255;
  34.          features._incidentEdge = (_key & 65280) >> 8 & 255;
  35.          features._incidentVertex = (_key & 16711680) >> 16 & 255;
  36.          features._flip = (_key & 4278190080) >> 24 & 255;
  37.       }
  38.       
  39.       public function get key() : uint
  40.       {
  41.          return _key;
  42.       }
  43.    }
  44. }
  45.