View Full Version : Fastest way to determin which side of a triangle
01-02-2002, 12:52 PM
I have a real dump question... Here goes:
What is the fastest way to determine if a point lies on one side or the other of a triangle (for shadow volume backface culling)?
Any help would be appreciated...
01-02-2002, 01:08 PM
I would use following:
build two vector from the triangles
cross product a x b = n
(be aware of order)
build vector from p to one triangle vertex
dot product c with n
switch(c dot n)
p lies on plane containing triangle
case < 0:
p lies on the side the normal is not pointg to
p lies on the side normal is pointing to
i hope its correct and useful
01-02-2002, 01:19 PM
Cool. Exactly what I was looking for. I've already got the surface normal, so I don't know why I didn't see this one.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.