Пример #1
0
        void Init(Scene scene)
        {
            RTC.Register();
            scenePtr = RTC.NewScene(SceneFlags.Static | SceneFlags.Coherent | SceneFlags.Incoherent | SceneFlags.Robust,
                                    TraversalFlags.Single | TraversalFlags.Packet4);

            foreach (var obj in scene.Objects)
            {
                this.AddObj(obj);
            }

            foreach (var light in scene.Lights)
            {
                if (light is IObj)
                {
                    var geomId = this.AddObj((IObj)light);
                    this.geometryIdLights.Add(geomId, (IObj)light);
                }
            }


            RTC.Commit(scenePtr);
            RTC.CheckLastError();
        }