示例#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);
                Vector3 pos = new Vector3(state._Position.x + val.x, state._Position.y + val.y, state._Position.z + val.z);

                SphereLight newLight = new SphereLight(state._Diff,
                                                       pos,
                                                       (float)(state._Scale.y * 0.5),
                                                       2);
                newLight.CreateElement(state._Parent, pos);
            }
        }
示例#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);
                Vector3 pos = new Vector3(state._Position.x + val.x, state._Position.y + val.y, state._Position.z + val.z);

                SphereLight newLight = new SphereLight(state._Diff,
                    pos,
                    (float)(state._Scale.y * 0.5),
                    2);
                newLight.CreateElement(state._Parent, pos);
            }
        }
示例#3
0
 public void Add(SphereLight sphereLight)
 {
     SurfaceLights.Add(sphereLight);
     Add((Intersectable)sphereLight);
 }
示例#4
0
文件: Scene.cs 项目: tincann/AGR
 public void Add(SphereLight sphereLight)
 {
     SurfaceLights.Add(sphereLight);
     Add((Intersectable)sphereLight);
 }