Generating a heightmap 2004-02-24 - By Barry Swan
Back Best bet for simple inclusion is probably bounding sphere checks, then there's simply no way for it but to check vertices. All you can hope to do is narrow down as quickly as possible. Even then it's non-trivial though, assuming you want the absolute highest point. I'd probably not do that, and stick to the highest (nearest) vertex in a tile. I say 'nearest' because as you rightly point out, if objects cross tile boundaries you end up with some interesting scenarios.
You can do it at differing detail / accuracy levels: - A fully fledged edge / line intersection with your tile boundaries - Simplified version of above that simply takes highest vertex in tile or along edge that crosses boundaries - Very simply 'if object is in tile then take it's highest point regardless' - Even simpler bounding sphere (for max height)
If you have a heightmapped terrain (not sure - you simply said it was an infinite plane) then you can't use bounding sphere for that particular scenario, but then again a heightmapped terrain already lends itself to much simpler height checks so no problems there.
Barry gerbil@(protected)
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
|
|