00001 /* 00002 * Collision plane header 00003 * 00004 * This file is part of the "SoftPixel Engine" (Copyright (c) 2008 by Lukas Hermanns) 00005 * See "SoftPixelEngine.hpp" for license information. 00006 */ 00007 00008 #ifndef __SP_COLLISION_PLANE_H__ 00009 #define __SP_COLLISION_PLANE_H__ 00010 00011 00012 #include "Base/spStandard.hpp" 00013 #include "SceneGraph/Collision/spCollisionNode.hpp" 00014 00015 00016 namespace sp 00017 { 00018 namespace scene 00019 { 00020 00021 00026 class SP_EXPORT CollisionPlane : public CollisionNode 00027 { 00028 00029 public: 00030 00031 CollisionPlane(CollisionMaterial* Material, SceneNode* Node, const dim::plane3df &Plane); 00032 ~CollisionPlane(); 00033 00034 /* Functions */ 00035 00036 s32 getSupportFlags() const; 00037 f32 getMaxMovement() const; 00038 00039 bool checkIntersection(const dim::line3df &Line, SIntersectionContact &Contact) const; 00040 bool checkIntersection(const dim::line3df &Line, bool ExcludeCorners = false) const; 00041 00042 /* Inline functions */ 00043 00044 inline void setPlane(const dim::plane3df &Plane) 00045 { 00046 Plane_ = Plane; 00047 } 00048 inline dim::plane3df getPlane() const 00049 { 00050 return Plane_; 00051 } 00052 00053 private: 00054 00055 /* Members */ 00056 00057 dim::plane3df Plane_; 00058 00059 }; 00060 00061 00062 } // /namespace scene 00063 00064 } // /namespace sp 00065 00066 00067 #endif 00068 00069 00070 00071 // ================================================================================