Re: [Algorithms] octree and HSR
Brought to you by:
vexxed72
From: Dave E. <eb...@ma...> - 2000-08-31 12:49:35
|
From: "A. Jeffrey Cahyono" <Alb...@te...> > > 4. How can I check if the view frustrum and a cube intersect? (or if the cube is inside > the view frustrum) > This is easy once you've created the view frustum. > Just test the eight corners of the cube against the six frustum plane like this. <snip of code> I do not believe your code handles the case when the eight corners of the box are outside the frustum, but the box still intersects the frustum (or completely contains the frustum). If you can guarantee that your bounding boxes are small enough relative to the frustum (for example a rectangular face can never be large enough to contain the near face of the frustum), then not a problem. -- Dave Eberly eb...@ma... http://www.magic-software.com |