From 70457fe780c9a7bcc2c4debd644c591976df0011 Mon Sep 17 00:00:00 2001 From: dhilvert Date: Thu, 19 Jan 2006 20:30:00 +0000 Subject: [PATCH] Add clip plane checks to d3::scene subspace candidate selection code. darcs-hash:20060119203026-789c2-5e6dc48a21cb220e7c41d163751f0767ddf33a19.gz --- d3/scene.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/d3/scene.h b/d3/scene.h index 199f3a9..4d454ea 100644 --- a/d3/scene.h +++ b/d3/scene.h @@ -2526,12 +2526,20 @@ public: assert(0); } + int completely_clipped(point min, point max) { + return (min[2] > front_clip + || max[2] < rear_clip) + } + /* * Find candidates for subspace creation. */ static void find_candidates(unsigned int f1, unsigned int f2, candidates *c, point min, point max, const std::vector &pt_outputs) { + if (completely_clipped(min, max)) + return; + if (!input_might_be_visible(f1, min, max) || !input_might_be_visible(f2, min, max)) return; -- 2.11.4.GIT