nwnlibd.geometry

Undocumented in source.

Members

Functions

distance
double distance(vec2f[2] line, vec2f point)
Undocumented in source. Be warned that the author may not have intended to support it.
getAltitudeOnPlane
float getAltitudeOnPlane(vec3f[3] triangle, vec2f point)
Undocumented in source. Be warned that the author may not have intended to support it.
getAltitudeOnPlane
float getAltitudeOnPlane(vec3f normal, vec3f pointOnPlane, vec2f point)
Undocumented in source. Be warned that the author may not have intended to support it.
getLineIntersection
auto getLineIntersection(Vector!(T, 2)[2] lineA, Vector!(T, 2)[2] lineB)
Undocumented in source. Be warned that the author may not have intended to support it.
getSegmentIntersection
auto getSegmentIntersection(Vector!(T, 2)[2] segA, Vector!(T, 2)[2] segB)
Undocumented in source. Be warned that the author may not have intended to support it.
isPointInsidePolygon
bool isPointInsidePolygon(vec2f point, vec2f[] polygon)
Undocumented in source. Be warned that the author may not have intended to support it.
isPointLeftOfLine
bool isPointLeftOfLine(vec2f point, vec2f[2] line)
Undocumented in source. Be warned that the author may not have intended to support it.
isPolygonComplex
bool isPolygonComplex(vec2f[] polygon)

Returns true if the polygon is complex (self intersecting) Simple bruteforce method, O(n²) complexity

isTriangleClockwise
bool isTriangleClockwise(vec2f[3] tri)
Undocumented in source. Be warned that the author may not have intended to support it.
signedArea
double signedArea(vec2f a, vec2f b, vec2f c)
Undocumented in source. Be warned that the author may not have intended to support it.
toVec2f
vec2f toVec2f(vec3f vector)
Undocumented in source. Be warned that the author may not have intended to support it.
toVec3f
vec3f toVec3f(vec2f vector)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Chains
struct Chains(T)

Useful for assembling a multi-vertex line from 2-point segments

Meta