Exemplo n.º 1
0
        // CANYONSHOOTER BEGIN
        public override ShapeData Clone()
        {
            PlaneShapeData n = new PlaneShapeData(new Plane(Abcd[0], Abcd[1], Abcd[2], Abcd[3]));

            DeepCopy(n);

            return(n);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Helper function for creating a static Solid with a Plane Shape.
        /// </summary>
        /// <param name="a"></param>
        /// <param name="b"></param>
        /// <param name="c"></param>
        /// <param name="d"></param>
        /// <param name="m"></param>
        /// <returns></returns>
        public virtual Solid CreatePlane(float a, float b, float c, float d, Material m)
        {
            // Create the plane's Solid and make it static.
            Solid plane = CreateSolid();

            plane.Static = true;

            Plane p = new Plane(a, b, c, d);

            // Setup the plane's Shape data.
            PlaneShapeData planeData = new PlaneShapeData(p);

            planeData.Material = m;
            //planeData.abcd[0] = a;
            //planeData.abcd[1] = b;
            //planeData.abcd[2] = c;
            //planeData.abcd[3] = d;

            // Add the Shape to the Solid.
            plane.AddShape(planeData);

            return(plane);
        }