summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bimg/3rdparty/nvtt/nvmath/plane.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bimg/3rdparty/nvtt/nvmath/plane.h')
-rw-r--r--3rdparty/bimg/3rdparty/nvtt/nvmath/plane.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/3rdparty/bimg/3rdparty/nvtt/nvmath/plane.h b/3rdparty/bimg/3rdparty/nvtt/nvmath/plane.h
new file mode 100644
index 00000000000..eb544b137c5
--- /dev/null
+++ b/3rdparty/bimg/3rdparty/nvtt/nvmath/plane.h
@@ -0,0 +1,40 @@
+// This code is in the public domain -- Ignacio Castaņo <castano@gmail.com>
+
+#ifndef NV_MATH_PLANE_H
+#define NV_MATH_PLANE_H
+
+#include "nvmath.h"
+#include "vector.h"
+
+namespace nv
+{
+ class Matrix;
+
+ class NVMATH_CLASS Plane
+ {
+ public:
+ Plane();
+ Plane(float x, float y, float z, float w);
+ Plane(const Vector4 & v);
+ Plane(const Vector3 & v, float d);
+ Plane(const Vector3 & normal, const Vector3 & point);
+ Plane(const Vector3 & v0, const Vector3 & v1, const Vector3 & v2);
+
+ const Plane & operator=(const Plane & v);
+
+ Vector3 vector() const;
+ float offset() const;
+
+ void operator*=(float s);
+
+ Vector4 v;
+ };
+
+ Plane transformPlane(const Matrix &, const Plane &);
+
+ Vector3 planeIntersection(const Plane & a, const Plane & b, const Plane & c);
+
+
+} // nv namespace
+
+#endif // NV_MATH_PLANE_H