home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / org / papervision3d / materials / special / LineMaterial.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  1.1 KB  |  36 lines

  1. package org.papervision3d.materials.special
  2. {
  3.    import flash.display.Graphics;
  4.    import org.papervision3d.core.proto.MaterialObject3D;
  5.    import org.papervision3d.core.render.command.RenderLine;
  6.    import org.papervision3d.core.render.data.RenderSessionData;
  7.    import org.papervision3d.core.render.draw.ILineDrawer;
  8.    
  9.    public class LineMaterial extends MaterialObject3D implements ILineDrawer
  10.    {
  11.       public function LineMaterial(param1:Number = 16711680, param2:Number = 1)
  12.       {
  13.          super();
  14.          this.lineColor = param1;
  15.          this.lineAlpha = param2;
  16.       }
  17.       
  18.       public function drawLine(param1:RenderLine, param2:Graphics, param3:RenderSessionData) : void
  19.       {
  20.          param2.lineStyle(param1.size,lineColor,lineAlpha);
  21.          param2.moveTo(param1.v0.x,param1.v0.y);
  22.          if(param1.cV)
  23.          {
  24.             param2.curveTo(param1.cV.x,param1.cV.y,param1.v1.x,param1.v1.y);
  25.          }
  26.          else
  27.          {
  28.             param2.lineTo(param1.v1.x,param1.v1.y);
  29.          }
  30.          param2.moveTo(0,0);
  31.          param2.lineStyle();
  32.       }
  33.    }
  34. }
  35.  
  36.