Re: [Algorithms] Sphere to Triangle overlap check
Brought to you by:
vexxed72
From: Jon W. <jw...@gm...> - 2010-07-28 12:20:44
|
Generally, you first compute whether the triangle plane culls the sphere. If not, then you can calculate point-to-triangle distance between the projection of the sphere center to the triangle plane and the triangle (edges). One way of doing this is to calculate the projection of the center of the sphere as a barycentric combination of two of the triangle base edges. There are two good references for collision information: 1) Christer Ericson's book "Real-time Collision Detection" 2) Wild Magic, Dave Eberly's game library also used as a basis for his books Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Wed, Jul 28, 2010 at 4:34 AM, Zafar Qamar <zaf...@co...>wrote: > Hi, > This is a very old question but I can't seem to find a good answer for it > and I've searched the net for quite a while. > > I need a precise way of checking if a sphere and a given triangle have > _any_ overlap. > Specifically, the case I'm struggling with is when the sphere just overlaps > one of the edges. > Also, I need to cater for when the sphere is completely inside the > triangle, and vice-versa > > Help please? Or a decent internet link would be much appreciated > > Cheers > Zaf > > > ********************************************************************************** > Disclaimer > > The information and attached documentation in this e-mail is intended for > the use of the addressee only and is confidential. If you are not the > intended recipient please delete it and notify us immediately by telephoning > or e-mailing the sender. Please note that without Codemasters’ prior written > consent any form of distribution, copying or use of this communication or > the information in it is strictly prohibited and may be unlawful. > > Attachments to this e-mail may contain software viruses. You are advised to > take all reasonable precautions to minimise this risk and to carry out a > virus check on any documents before they are opened. > > Any offer contained in this communication is subject to Codemasters’ > standard terms & conditions and must be signed by both parties. Except as > expressly provided otherwise all information and attached documentation in > this e-mail is subject to contract and Codemasters’ board approval. > Any views or opinions expressed are solely those of the author and do not > necessarily represent those of Codemasters. > > This footnote also confirms that this email message has been swept by > SurfControl for the presence of computer viruses. > > ********************************************************************************** > > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |