Jump to content

  • Log In with Google      Sign In   
  • Create Account


Orientated bounding cube-> triangle collision checking


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Jedaye   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 August 2001 - 03:33 AM

Hi, I am thinking my way to programming an orientated bounding cubewith scenery geomery (triangles)... My initial thinking lead me to think that triangle-edges -> box planes was the correct route to take...but what about if the bounding cube intersects the middle of the triangle? My thinking at present is to make the bounding cube 12 polys and do triangle->triangle checking... Can anyone tell me I am being stupid and the correct thinking to the sollution? Thanks in advance ** Ste ~Having read a lil more i c that 'Voorhies triangle-cube intersection' solves this problem by: 1. If any edge intersects the cube, return true. 2. If the polygon interior intersects the cube, return true. 3. Return false So, is accepted as faster than 12 triangle->triangle tests? Edited by - Jedaye on August 15, 2001 11:03:42 AM

Sponsor:

#2 danz   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 August 2001 - 09:59 AM

no one even implements face to face collition , lets count face to face , shell we :
( i might have some slight mistakes about the clock-ticks )
we will start with point to face and then multiply by 3 :
int classifypoint(point v,plane p){
float f=dotproduct(v,p.n)+p.d;
if(f>0) return 2;
if(f<0) return 1;
return 0;
}

first we have dotproduct(v,u)=v[0]*u[0]+v[1]*u[1]+v[2]*u[2];
i count 3 mults and 2 sums which equals 3*3+2*3=15ct
now the sum after the dotproduct is 3ct , so we have 18ct by now
lets ignore the "if" part in the function for the time being.

so 18ct per vertex ==> 54ct per polygon
==>648ct per box

I really dont think so !!!

try treating the box as a point and then you have to use plane shifting , and i have absolutly no idea about how to do that !!!

the rubber-hound




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS