home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Esportes / CrossingCup.swf / scripts / __Packages / sandy / primitive / Line3D.as < prev    next >
Text File  |  2007-12-11  |  1KB  |  39 lines

  1. class sandy.primitive.Line3D extends sandy.core.Object3D implements sandy.primitive.Primitive3D
  2. {
  3.    function Line3D(deb, fin)
  4.    {
  5.       super();
  6.       if(arguments.length < 2)
  7.       {
  8.          trace("Line3D::Number of arguments to low");
  9.       }
  10.       else
  11.       {
  12.          var _loc4_ = 0;
  13.          while(_loc4_ < arguments.length)
  14.          {
  15.             this.aPoints.push(new sandy.core.data.Vertex(arguments[_loc4_].x,- arguments[_loc4_].y,arguments[_loc4_].z));
  16.             _loc4_ = _loc4_ + 1;
  17.          }
  18.          this.generate();
  19.       }
  20.    }
  21.    function generate(Void)
  22.    {
  23.       this._aFaces = [];
  24.       var _loc3_ = this.aPoints.length;
  25.       var _loc2_ = 0;
  26.       while(_loc2_ < _loc3_ - 1)
  27.       {
  28.          this.addFace(new sandy.core.face.Edge3D(this,this.aPoints[_loc2_],this.aPoints[_loc2_ + 1]));
  29.          _loc2_ = _loc2_ + 1;
  30.       }
  31.    }
  32.    function setSkin(s, bOverWrite)
  33.    {
  34.       bOverWrite = bOverWrite != undefined ? bOverWrite : false;
  35.       super.setSkin(s,bOverWrite);
  36.       return true;
  37.    }
  38. }
  39.