20131023 intersection

Download 20131023 intersection

Post on 01-Jul-2015

3.244 views

Category:

Health & Medicine

0 download

Embed Size (px)

TRANSCRIPT

  • 1.

2. 140 1000 MeshCollider iPad2 30 3. (BB)(Ray) Ray [TomasMller1997] BB 4. Ray Bounds IntersectRay(Ray) Ray 5. Ray Ray P Transform.InverseTransformDirecHon() Ray.direcHon Ray Ray: Vector3rayOrigin=transform.InverseTransformPoint(ray.origin); Vector3rayDirecHon=transform.worldToLocalMatrix*(Vector4)ray.direcHon; 6. Ray(contd) Fast,MinimumStorageRay/TriangleIntersecHon [TomasMller1997]ODRay t P P = O + tDP (u,v) P = (1 u v)V0 + uV1 + vV2 V1O Du tP V0vV2 7. Ray(contd) P (u,v) P = (1 u v)V0 + uV1 + vV2ODRay t P P = O + tD(1 u v)V0 + uV1 + vV2 = O + tD ! t $ # & [D,V1 V0 ,V2 V0 ]# u & = O V0 # v & " % 8. Ray(contd) ! t $ # & [D,V1 V0 ,V2 V0 ]# u & = O V0 # v & " % ! t $ # & 1 # u & = D, E , E 1 2 # v & " %! T, E , E 1 2 # # D,T, E2 # # D, E1,T "$ & & & & % t:Ray (u,v): 9. Ray(contd) ! t $ # & 1 # u & = D, E , E 1 2 # v & " %! T, E , E 1 2 # # D,T, E2 # # D, E1,T "$ & & & & %A, B, C = (A C) B = (C B) A ! QE $ ! t $ 2 # & # & 1 # u & = P E # P T & 1 # QD & # v & " % " % {P = (D E2 ),Q = T E1 } t:Ray (u,v): 10. Ray(contd) ! QE $ ! t $ 2 # & # & 1 # u & = P E # P T & 1 # QD & # v & " % " % 0Ray ()()0 u 1,0 v 1,0 u + v 1, t t:Ray (u,v): P=DxE2 Q=TxE1