Skip to documentation
SLOP

tiny.geometry.Plane

Reference tiny.geometry Plane

Defined in tiny.geometry.

The points p with normal · p = offset.

API (5)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callstiny.geometryPlane
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/geometry/src/primitive.zig:190

zig
/// The points `p` with `normal · p = offset`. The normal is unit length, so/// `signedDistance` is a distance.pub const Plane = struct {    normal: Vec3,    offset: f32,    pub fn fromPointNormal(point: Vec3, unit_normal: Vec3) Plane {        return .{ .normal = unit_normal, .offset = unit_normal.dot(point) };    }    /// The plane through a triangle, or null for a degenerate triangle.    pub fn fromTriangle(triangle: Triangle) ?Plane {        const n = triangle.normal() orelse return null;        return fromPointNormal(triangle.a, n);    }    pub fn signedDistance(plane: Plane, p: Vec3) f32 {        return plane.normal.dot(p) - plane.offset;    }};

Source: lib/geometry/src/root.zig:20

zig
pub const Plane = primitive.Plane;
Called byCallsNo direct callstest sourcelib.geometry.src.closesttest: point to box and plane clamp an...test sourcelib.geometry.src.intersecttest: a ray meets a plane ahead of itPlanefromTrianglePlanefromPointNormal
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.geometry.src.primitivetest: a triangle reports its unit nor...PlanefromPointNormalPlanefromTriangle
Static calls · unresolved targets: 0 · external targets: 1.

Audit

Definitions4
Public names4
Members2
Version26.7.0
Revisiondaab053ee433