Navigation
API > API/Runtime > API/Runtime/Navmesh
Description
Derives the signed xz-plane area of the triangle ABC, or the relationship of line AB to point C. This section contains detailed documentation for members that don't have a source file. It reduces clutter in the main section of the header.
The vertices are projected onto the xz-plane, so the y-values are ignored.
This is a low cost function than can be used for various purposes. Its main purpose is for point/line relationship testing.
In all cases: A value of zero indicates that all vertices are collinear or represent the same point. (On the xz-plane.)
When used for point/line relationship tests, AB usually represents a line against which the C point is to be tested. In this case:
A positive value indicates that point C is to the left of line AB, looking from A toward B. A negative value indicates that point C is to the right of lineAB, looking from A toward B.
When used for evaluating a triangle:
The absolute value of the return value is two times the area of the triangle when it is projected onto the xz-plane.
A positive return value indicates:
- The vertices are wrapped in the normal Detour wrap direction.
- The triangle's 3D face normal is in the general up direction.
A negative return value indicates:
- The vertices are reverse wrapped. (Wrapped opposite the normal Detour wrap direction.)
- The triangle's 3D face normal is in the general down direction.
| Name | dtTriArea2D |
| Type | function |
| Header File | /Engine/Source/Runtime/Navmesh/Public/Detour/DetourCommon.h |
| Include Path | #include "Detour/DetourCommon.h" |
dtReal dtTriArea2D
(
const dtReal * a,
const dtReal * b,
const dtReal * c
)
The signed xz-plane area of the triangle.
Parameters
| Name | Remarks |
|---|---|
| a | Vertex A. [(x, y, z)] |
| b | Vertex B. [(x, y, z)] |
| c | Vertex C. [(x, y, z)] |