Lumino.Math
D:/Proj/Lumino.Math/include/Lumino/Math/Plane.h
00001 
00002 #ifndef LUMINO_MATH_PLANE_H
00003 #define LUMINO_MATH_PLANE_H
00004 
00005 #include "Common.h"
00006 #include "Vector3.h"
00007 
00008 namespace Lumino
00009 {
00010 
00014 class LUMINO_EXPORT Plane
00015 {
00016 public:
00017 
00018     Vector3 Normal;     
00019     float   D;          
00020 
00021 public:
00022 
00026     Plane();
00027 
00035     Plane(float a, float b, float c, float d);
00036     
00042     Plane(const Vector3& point, const Vector3& normal);
00043 
00050     Plane(const Vector3& point1, const Vector3& point2, const Vector3& point3);
00051 
00052 public:
00053 
00058     void Normalize();
00059 
00066     bool CheckInside(const Vector3& point) const;
00067 
00075     bool CheckInside(const Vector3& point, float radius) const;
00076 
00084     bool Intersects(const Vector3& start, const Vector3& end, Vector3* point) const;
00085 
00091     void Transform(const Matrix& mat);
00092 
00099     void Print(const char* format = NULL, FILE* stream = NULL) const;
00100 
00101 public:
00102 
00109     static Plane Normalize(const Plane& plane);
00110 
00116     static float Dot(const Plane& plane, const Vector4& vec);
00117 
00124     static float DotCoord(const Plane& plane, const Vector3& vec);
00125 
00131     static float DotNormal(const Plane& plane, const Vector3& vec);
00132 
00139     static Plane Transform(const Plane& plane, const Matrix& mat);
00140 
00141 };
00142 
00143 } // namespace Lumino
00144 
00145 #include "Plane.inl"
00146 
00147 #endif // LUMINO_MATH_PLANE_H
 All Classes Functions Variables Friends