// Copyright (C) 2014 Jérôme Leclercq // This file is part of the "Nazara Engine - Mathematics module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_PLANE_HPP #define NAZARA_PLANE_HPP #include #include template class NzPlane { public: NzPlane() = default; NzPlane(T normalX, T normalY, T normalZ, T Distance); NzPlane(const T plane[4]); NzPlane(const NzVector3& Normal, T Distance); NzPlane(const NzVector3& Normal, const NzVector3& point); NzPlane(const NzVector3& point1, const NzVector3& point2, const NzVector3& point3); template explicit NzPlane(const NzPlane& plane); NzPlane(const NzPlane& plane) = default; ~NzPlane() = default; T Distance(const NzVector3& point) const; T Distance(T x, T y, T z) const; NzPlane& Set(T normalX, T normalY, T normalZ, T Distance); NzPlane& Set(const T plane[4]); NzPlane& Set(const NzPlane& plane); NzPlane& Set(const NzVector3& Normal, T Distance); NzPlane& Set(const NzVector3& Normal, const NzVector3& point); NzPlane& Set(const NzVector3& point1, const NzVector3& point2, const NzVector3& point3); template NzPlane& Set(const NzPlane& plane); NzString ToString() const; static NzPlane Lerp(const NzPlane& from, const NzPlane& to, T interpolation); static NzPlane XY(); static NzPlane XZ(); static NzPlane YZ(); NzVector3 normal; T distance; }; template std::ostream& operator<<(std::ostream& out, const NzPlane& plane); typedef NzPlane NzPlaned; typedef NzPlane NzPlanef; #include #endif // NAZARA_PLANE_HPP