Пример #1
0
 /// <summary>
 /// Creates a new empty geometry.
 /// </summary>
 public Geometry(SceneFlags sceneFlags, TraversalFlags traversalFlags = TraversalFlags.Single)
 {
     RTC.Register();
     this.sceneFlags     = sceneFlags;
     this.traversalFlags = traversalFlags;
     scenePtr            = RTC.NewScene(sceneFlags, traversalFlags);
 }
Пример #2
0
 /// <summary>
 /// Creates a new empty geometry.
 /// </summary>
 public Geometry(Device device, SceneFlags sceneFlags, TraversalFlags traversalFlags = TraversalFlags.Single)
 {
     this.device         = device;
     this.sceneFlags     = sceneFlags;
     this.traversalFlags = traversalFlags;
     scenePtr            = RTC.NewScene(device.DevicePtr, sceneFlags, traversalFlags);
 }
Пример #3
0
        /// <summary>
        /// Instantiates a new scene with the given scene and algorithm flags.
        /// </summary>
        /// <param name="sceneFlags">The scene flags to use.</param>
        /// <param name="algorithmFlags">The algorithm flags to use.</param>
        public Scene(SceneFlags sceneFlags = SceneFlags.Dynamic
                     | SceneFlags.Coherent,
                     AlgorithmFlags algorithmFlags = AlgorithmFlags.Intersect1
                     | AlgorithmFlags.Intersect4)
        {
            if (!sceneFlags.HasFlag(SceneFlags.Dynamic))
            {
                sceneFlags |= SceneFlags.Dynamic;
            }

            this.sceneFlags     = sceneFlags;
            this.algorithmFlags = algorithmFlags;
            this.nativePtr      = RTC.NewScene(SceneFlags,
                                               AlgorithmFlags);
        }