示例#1
0
        internal void Trace( Ray WorldRay, ShapeHitCollection ShapeHits, SimpleGeometryHitCollection GeometryHits, List<ObjectHit> ObjectHits )
        {
            Debug.Assert( ShapeHits != null );
            Debug.Assert( GeometryHits != null );
            Debug.Assert( ObjectHits != null );

            Trace( WorldRay, new GeometryTracer( ShapeHits, GeometryHits ), new ObjectHitCollection( ObjectHits ) );
        }
示例#2
0
        internal override sealed SimpleGeometryHit Trace( Ray WorldRay, ShapeHitCollection Hits, SimpleGeometryHitCollection GeometryHits )
        {
            Debug.Assert( Hits != null );
            Debug.Assert( GeometryHits != null );

            Hits.AdvanceBaseIndex();
            Trace( WorldRay, Hits );
            return ( Hits.Count == Hits.Base ) ? null : GeometryHits.Next();
        }
示例#3
0
            internal SceneTracer( ShapeHitCollection ShapeHits, SimpleGeometryHitCollection GeometryHits, List<ObjectHit> ObjectHits )
            {
                Debug.Assert( ShapeHits != null );
                Debug.Assert( GeometryHits != null );
                Debug.Assert( ObjectHits != null );

                this.ShapeHits = ShapeHits;
                this.GeometryHits = GeometryHits;
                this.ObjectHits = ObjectHits;
            }
示例#4
0
        internal override SimpleGeometryHit Trace( Ray WorldRay, ShapeHitCollection Hits, SimpleGeometryHitCollection GeometryHits )
        {
            Debug.Assert( Hits != null );
            Debug.Assert( GeometryHits != null );

            Hits.AdvanceBaseIndex();
            Ray ModelRay = WorldToModel *  WorldRay;
            Shape.Trace( ModelRay, Hits );
            return ( Hits.Count == Hits.Base ) ? null : GeometryHits.Next( ModelToWorld, ModelRay );
        }
示例#5
0
        internal void Trace( Ray WorldRay, ShapeHitCollection ShapeHits, SimpleGeometryHitCollection GeometryHits, List<ObjectHit> ObjectHits )
        {
            Debug.Assert( ShapeHits != null );
            Debug.Assert( GeometryHits != null );
            Debug.Assert( ObjectHits != null );

            ObjectHits.Clear();
            GeometryHits.Clear();
            ShapeHits.Clear();

            SceneTracer Tracer = new SceneTracer( ShapeHits, GeometryHits, ObjectHits );
            Trace( WorldRay, Tracer );
        }
示例#6
0
            internal GeometryTracer( ShapeHitCollection ShapeHits, SimpleGeometryHitCollection GeometryHits )
            {
                Debug.Assert( ShapeHits != null );
                Debug.Assert( GeometryHits != null );

                this.ShapeHits = ShapeHits;
                this.GeometryHits = GeometryHits;
            }
示例#7
0
            internal void Trace( Ray WorldRay, ShapeHitCollection ShapeHits, SimpleGeometryHitCollection GeometryHits, List<ObjectHit> ObjectHits )
            {
                Debug.Assert( ShapeHits != null );
                Debug.Assert( GeometryHits != null );
                Debug.Assert( ObjectHits != null );

                for ( int i = 0; i < Objects.Count; i++ )
                {
                    Objects[i].Trace( WorldRay, ShapeHits, GeometryHits, ObjectHits );
                }
            }
示例#8
0
 internal abstract SimpleGeometryHit Trace( Ray WorldRay, ShapeHitCollection Hits, SimpleGeometryHitCollection GeometryHits );