Exemplo n.º 1
0
        internal override sealed void Trace( Ray ModelRay, ShapeHitCollection ShapeHits )
        {
            Debug.Assert( ShapeHits != null );

            ShapeHitList Hits = new ShapeHitList( ShapeHits );
            Trace( ModelRay, ref Hits );
        }
Exemplo n.º 2
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 ) );
        }
Exemplo n.º 3
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();
        }
Exemplo n.º 4
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;
            }
Exemplo n.º 5
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 );
        }
Exemplo n.º 6
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 );
        }
Exemplo n.º 7
0
            internal GeometryTracer( ShapeHitCollection ShapeHits, SimpleGeometryHitCollection GeometryHits )
            {
                Debug.Assert( ShapeHits != null );
                Debug.Assert( GeometryHits != null );

                this.ShapeHits = ShapeHits;
                this.GeometryHits = GeometryHits;
            }
Exemplo n.º 8
0
 internal GeometryHitCollection( ShapeHitCollection ShapeHits, SimpleGeometryHit SimpleHit )
 {
     this.ShapeHits = ShapeHits;
     this.SimpleHit = SimpleHit;
     this.Count = ( SimpleHit == null ) ? 0 : ShapeHits.Count - ShapeHits.Base;
 }
Exemplo n.º 9
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 );
                }
            }
Exemplo n.º 10
0
 internal abstract SimpleGeometryHit Trace( Ray WorldRay, ShapeHitCollection Hits, SimpleGeometryHitCollection GeometryHits );
Exemplo n.º 11
0
            internal ShapeHitList( ShapeHitCollection ShapeHits )
            {
                Debug.Assert( ShapeHits != null );

                this.ShapeHits = ShapeHits;
            }
Exemplo n.º 12
0
 internal abstract void Trace( Ray ModelRay, ShapeHitCollection ShapeHits );