Template Struct Plane

Struct Documentation

template<typename BaseVecT>
struct Plane

A plane.

A plane represented by a normal and a position vector.

Public Functions

inline Plane()
BaseVecT project(const BaseVecT &other) const

Projects the given point onto the plane and returns the projection point.

float distance(const BaseVecT &other) const

Calculates the distance between the plane and the given point.

Returns:

This can be < 0, == 0 or > 0 the cases mean: < 0: The point lies between the plane and the origin == 0: The point lies in the plane > 0: The point lies behind the plane, oberserved from the origin

Line<BaseVecT> intersect(const Plane<BaseVecT> &other) const

Calculates the intersection between this and other.

Public Members

Normal<typename BaseVecT::CoordType> normal
BaseVecT pos