home *** CD-ROM | disk | FTP | other *** search
- class com.Cub
- {
- var clip;
- var nodes;
- var n0;
- var n1;
- var n2;
- var n3;
- var n4;
- var n5;
- var n6;
- var n7;
- var poly0;
- var poly1;
- var poly2;
- function Cub(_clip, _nodes)
- {
- this.clip = _clip;
- this.nodes = _nodes;
- this.create();
- }
- function create()
- {
- this.n0 = new com.Node(-50,-50,-50);
- this.n1 = new com.Node(-50,-50,50);
- this.n2 = new com.Node(50,-50,50);
- this.n3 = new com.Node(50,-50,-50);
- this.n4 = new com.Node(-50,50,-50);
- this.n5 = new com.Node(-50,50,50);
- this.n6 = new com.Node(50,50,50);
- this.n7 = new com.Node(50,50,-50);
- var _loc3_ = 0;
- while(_loc3_ < 8)
- {
- this.nodes.push(this["n" + _loc3_]);
- _loc3_ = _loc3_ + 1;
- }
- var _loc4_ = -2;
- this.poly0 = new com.Polygon(this.clip.createEmptyMovieClip("cub_mc_" + this.clip.depth,this.clip.depth++),_loc4_);
- this.poly0.addNode(this.n4);
- this.poly0.addNode(this.n5);
- this.poly0.addNode(this.n6);
- this.poly0.addNode(this.n7);
- this.poly1 = new com.Polygon(this.clip.createEmptyMovieClip("cub_mc_" + this.clip.depth,this.clip.depth++),_loc4_);
- this.poly1.addNode(this.n7);
- this.poly1.addNode(this.n6);
- this.poly1.addNode(this.n2);
- this.poly1.addNode(this.n3);
- this.poly2 = new com.Polygon(this.clip.createEmptyMovieClip("cub_mc_" + this.clip.depth,this.clip.depth++),_loc4_);
- this.poly2.addNode(this.n0);
- this.poly2.addNode(this.n4);
- this.poly2.addNode(this.n7);
- this.poly2.addNode(this.n3);
- _loc3_ = 0;
- while(_loc3_ < 3)
- {
- _global.polygons.push(this["poly" + _loc3_]);
- _loc3_ = _loc3_ + 1;
- }
- }
- }
-