[ODE] Mesh -ray collision in OPCODE

Pierre Terdiman p.terdiman at wanadoo.fr
Wed Mar 19 11:39:02 2003


This is a multi-part message in MIME format.

------=_NextPart_000_00B1_01C2EE4F.1381DCA0
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

The space is irrelevant, unless I'm missing something. Usually you get =
impact point's barycentric coordinates (u,v) out of Opcode. Then you =
just have to do that :

pt =3D (1.0f - u - v)*p0 + u*p1 + v*p2;

where hit triangle is (p0, p1, p2). Those points can be in one space or =
another, it's up to you.

Pierre
  ----- Original Message -----=20
  From: Ivan Bolcina=20
  To: ode@q12.org=20
  Sent: Sunday, March 16, 2003 1:12 PM
  Subject: [ODE] Mesh -ray collision in OPCODE


  Hi. I know this is ode forum, but I cant find it anywhere else!
  Do you know how to get point of collision with Ray vs mesh collsion. I =
need to know where in space did it happen.
  =20
  thanx

------=_NextPart_000_00B1_01C2EE4F.1381DCA0
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>The space is irrelevant, unless I'm =
missing=20
something. Usually you get impact point's barycentric coordinates (u,v) =
out of=20
Opcode. Then you just have to do that :</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>pt =3D (1.0f - u - v)*p0 + u*p1 + =
v*p2;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>where&nbsp;hit triangle is (p0, p1, =
p2). Those=20
points can be in one space or another, it's up to you.<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Pierre</DIV></FONT>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:ivan.bolcina@volja.net" =
title=3Divan.bolcina@volja.net>Ivan=20
  Bolcina</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:ode@q12.org"=20
  title=3Dode@q12.org>ode@q12.org</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Sunday, March 16, 2003 =
1:12=20
PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [ODE] Mesh -ray =
collision in=20
  OPCODE</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=3D2>Hi. I know this is ode forum, but I cant find it =
anywhere=20
  else!</FONT></DIV>
  <DIV><FONT size=3D2>Do you know how to get point of collision with Ray =
vs mesh=20
  collsion. I need to know where in space did it happen.</FONT></DIV>
  <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT size=3D2>thanx</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00B1_01C2EE4F.1381DCA0--