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 ) ); }
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(); }
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; }
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 ); }
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 ); }
internal GeometryTracer( ShapeHitCollection ShapeHits, SimpleGeometryHitCollection GeometryHits ) { Debug.Assert( ShapeHits != null ); Debug.Assert( GeometryHits != null ); this.ShapeHits = ShapeHits; this.GeometryHits = GeometryHits; }
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 ); } }
internal abstract SimpleGeometryHit Trace( Ray WorldRay, ShapeHitCollection Hits, SimpleGeometryHitCollection GeometryHits );