Exemplo n.º 1
0
        public override void Execute(ref WooState state)
        {
            if (state._Objects > 0)
            {
                state._Objects--;
                Vector3 val = new Vector3(0.0, 0.5, 0.0);
                val.y *= state._Scale.y;
                val.Mul(state._Rotation);

                Sphere newSphere = new Sphere(new Vector3(state._Position.x + val.x, state._Position.y + val.y, state._Position.z + val.z),
                    new Vector3(state._Scale.x * 0.5, state._Scale.y * 0.5, state._Scale.z * 0.5), state._Rotation);
                newSphere._Material = GenerateMaterial(state);
                newSphere.CreateElement(state._Preview, state._Parent);
            }
        }
Exemplo n.º 2
0
        public override void Execute(ref WooState state)
        {
            if (state._Objects > 0)
            {
                state._Objects--;
                Vector3 val = new Vector3(0.0, 0.5, 0.0);
                val.y *= state._Scale.y;
                val.Mul(state._Rotation);

                Sphere newSphere = new Sphere(new Vector3(state._Position.x + val.x, state._Position.y + val.y, state._Position.z + val.z),
                                              new Vector3(state._Scale.x * 0.5, state._Scale.y * 0.5, state._Scale.z * 0.5), state._Rotation);
                newSphere._Material = GenerateMaterial(state);
                newSphere.CreateElement(state._Preview, state._Parent);
            }
        }