Struct Plane
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
A plane of the form n.p + D = 0 A point in front of the plane gives a value above zero and a point behind it gives a value below zero
public struct Plane
- Inherited Members
- Extension Methods
Constructors
Plane(double, double, double, double)
Creates a plane with a normalized normal of length 1
public Plane(double x, double y, double z, double d)
Parameters
Fields
D
public double D
Field Value
normalX
public double normalX
Field Value
normalY
public double normalY
Field Value
normalZ
public double normalZ
Field Value
Methods
AABBisOutside(Sphere)
The box is outside when its corner closest to the inner side of the plane is still behind it: n.c + |n|.h + D below 0 where h is the radius divided by sqrt(3), half the box side on each axis This is also the scalar path when SIMD is not used (no vector support or Vector<float> is 128 bit)
public bool AABBisOutside(Sphere sphere)
Parameters
sphereSphere
Returns
distanceOfPoint(double, double, double)
Signed distance from a point to the plane, negative means the point is behind it
public double distanceOfPoint(double x, double y, double z)