View Full Version : Plane description and Half Life
01-01-2004, 12:03 PM
Hello to everybody!
Can someone help me out with the math behind the computation of the 3 points required to describe a plane given face vertices and a normal?
I need this to write an exporter for my opengl application to Half Life .map file format...
Thanks in advance!
I'm not sure I understand. You have the vertices of the face (ie. the corners of your triangle) and the normal and you want to calculate points to describe the plane of that triangle? They're the points of your triangle!
Or are you trying to calculate the normal for your face (given the three points)?
01-06-2004, 02:02 AM
Yes, but it's not a triangle, usually it has 4 or more vertices... which ones should i take? in which order? why? And why if i export it using face vertices half life editor doesnt open it well? (i think because i cannot use face vertices..)
Btw, thanks for the reply man!
01-06-2004, 02:33 AM
Better to read the docs : http://collective.valve-erc.com/index.php?go=map_format
"[The three points] must be in a clockwise order when facing the outside of the plane - that is, the side that points outwards from the brush, and these points must lie on the surface of the plane. They must also be different from one another, and not lie on a line - they must form three corners of a triangle when joined up. (Three vertices of the face being represented by this plane will often suffice.)"
I think you can take the tree first non-colinear points of a polygon.
A good description of what you will probably need : http://extension.ws/hlfix/technical.html
[This message has been edited by ZbuffeR (edited 01-06-2004).]
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.