/src/away3d/debug/data/TridentLines.as
http://github.com/away3d/away3d-core-fp11 · ActionScript · 38 lines · 31 code · 7 blank · 0 comment · 2 complexity · f3eae24658e22358030954a6a0f9f3da MD5 · raw file
- package away3d.debug.data
- {
- import away3d.entities.SegmentSet;
- import away3d.primitives.LineSegment;
-
- import flash.geom.Vector3D;
-
- public class TridentLines extends SegmentSet
- {
- public function TridentLines(vectors:Vector.<Vector.<Vector3D>>, colors:Vector.<uint>):void
- {
- super();
- build(vectors, colors);
- }
-
- private function build(vectors:Vector.<Vector.<Vector3D>>, colors:Vector.<uint>):void
- {
- var letter:Vector.<Vector3D>;
- var v0:Vector3D;
- var v1:Vector3D;
- var color:uint;
- var j:uint;
-
- for (var i:uint = 0; i < vectors.length; ++i) {
- color = colors[i];
- letter = vectors[i];
-
- for (j = 0; j < letter.length; j += 2) {
- v0 = letter[j];
- v1 = letter[j + 1];
- addSegment(new LineSegment(v0, v1, color, color, 1));
- }
- }
- }
-
- }
- }