1     /**
2      * ...
3      * @author Matthew Casperson
4      */
5
6     package ;
7     import flash.Lib;
8     import fr.seraf.wow.primitive.WOWPlane;
9     import sandy.primitive.Plane3D;
10    import sandy.materials.Appearance;
11    import sandy.materials.attributes.LightAttributes;
12    import sandy.materials.attributes.MaterialAttributes;
13    import sandy.materials.attributes.LineAttributes;
14    import sandy.materials.ColorMaterial;
15    import sandy.materials.Material;
16
17    class PlanePhysicsObject extends PhysicsObject
18    {
19       public function new(engineManager:EngineManager)
20       {
21          var plane:Plane3D = new Plane3D(null, 100.0, 100.0, 1, 1, Plane3D.ZX_ALIGNED, null);
22            var materialAttr:MaterialAttributes = new  MaterialAttributes(
23             [new  LineAttributes( 0.5 , 0x2111BB , 0.4 ) ,
24             new  LightAttributes( true , 0.1)]);
25            var material:Material = new ColorMaterial( 0xFFCC33 , 1 , materialAttr );
26            material.lightingEnable = true;
27            var app:Appearance = new  Appearance( material );
28            plane.appearance = app;
29            plane.useSingleContainer = false;
30
31          var wowPlane:WOWPlane = new WOWPlane(0, -25, 200, 180, 0, 0);
32            wowPlane.fixed = true;
33
34          super(engineManager, plane, wowPlane);
35       }
36    }

Top