From Valve Developer Community
VPlane is a C++ class that represents an infinite 2D surface.
m_Distcan be negative too.
vec_t DistTo(Vector point)
- The distance between the given point and its nearest point on the plane. Positive if in front, negative if behind.
SideType GetPointSide(Vector point, vec_t epsilon = 0.01f)
DistTo()then processes the result. The optional epsilon value specifies an unsigned threshold within which the return value will be considered
SideTypeis a redefined int which has #defined values of
SideType GetPointSideExact(Vector point)
- As above, but without an epsilon and assuming 0 to be behind the plane.
- Returns a new VPlane with both
m_Normalinverted. Does not change the VPlane's own values (but
this = Flip()would).
- Returns the point on the plane nearest to the current origin.
Vector SnapPointToPlane(const Vector &point)
- Returns a new Vector representing the nearest point on the plane to the given Vector.