OBD:PLEA: Difference between revisions
Jump to navigation
Jump to search
(duh) |
m (inequation) |
||
Line 55: | Line 55: | ||
:It is possible, however, that the definition used is different, e.g. : a * x + b * y + c * z = d . | :It is possible, however, that the definition used is different, e.g. : a * x + b * y + c * z = d . | ||
::In that case, the first package of the above example defines the plane (0 * x + 0 * y + 1 * z = 612), i.e., the vertical plane z = 612. | ::In that case, the first package of the above example defines the plane (0 * x + 0 * y + 1 * z = 612), i.e., the vertical plane z = 612. | ||
;Front/back | |||
:The 4 numbers (a, b, c, d) can also serve to define whether a 3D point (x, y, z) is on the "front" side of the plane or in the "back". | |||
::"points are in front of the plane if a * x + b * y + c * z >= d" (from commented Myth source) | |||
:That would mean the plane equation is a * x + b * y + c * z = d , ''not'' a * x + b * y + c * z + d = 0 . | |||
::It's rather easy to check (just flip the "normal" of the plane equation for a known axis-aligned quad). | |||
:The oriented "plane inequation" can be used for: culling; collision. | |||
---- | ---- | ||
{{OBD_File_Footer|align=center|type=PLEA|prev=OTLF|next=PNTA|name=Plane Equation Array|family=Level|onistuff=plea}} | {{OBD_File_Footer|align=center|type=PLEA|prev=OTLF|next=PNTA|name=Plane Equation Array|family=Level|onistuff=plea}} |
Revision as of 23:37, 20 February 2007
|
|
- Plane equation
- The canonical equation for a plane in 3D is :
- a * x + b * y + c * z + d = 0
- where (a, b, c, d) are 4 real numbers. The plane is the set of points (x, y, z) verifying that equation.
- It is likely that the four floats in one of a PLEA's packages are exactly the (a, b, c, d) of the above definition.
- In that case, the first package of the above example defines the plane (0 * x + 0 * y + 1 * z + 612 = 0), i.e., the vertical plane z = -612.
- It is possible, however, that the definition used is different, e.g. : a * x + b * y + c * z = d .
- In that case, the first package of the above example defines the plane (0 * x + 0 * y + 1 * z = 612), i.e., the vertical plane z = 612.
- Front/back
- The 4 numbers (a, b, c, d) can also serve to define whether a 3D point (x, y, z) is on the "front" side of the plane or in the "back".
- "points are in front of the plane if a * x + b * y + c * z >= d" (from commented Myth source)
- That would mean the plane equation is a * x + b * y + c * z = d , not a * x + b * y + c * z + d = 0 .
- It's rather easy to check (just flip the "normal" of the plane equation for a known axis-aligned quad).
- The oriented "plane inequation" can be used for: culling; collision.
ONI BINARY DATA |
---|
OTLF << Other file types >> PNTA |
PLEA : Plane Equation Array |
Level file |