Пример #1
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();
        }
Пример #2
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 );
        }