package { import flash.display.Graphics; public class animation_ch16_Triangle { private var pointA:animation_ch16_Point3D; private var pointB:animation_ch16_Point3D; private var pointC:animation_ch16_Point3D; private var color:uint; public function animation_ch16_Triangle(a:animation_ch16_Point3D, b:animation_ch16_Point3D, c:animation_ch16_Point3D, color:uint) { pointA = a; pointB = b; pointC = c; this.color = color; } //@ draw(s) public function draw(g:Graphics):void { g.beginFill(color, .5); g.moveTo(pointA.screenX, pointA.screenY); g.lineTo(pointB.screenX, pointB.screenY); g.lineTo(pointC.screenX, pointC.screenY); g.lineTo(pointA.screenX, pointA.screenY); g.endFill(); } } }