NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
InterfaceCollider.h
Go to the documentation of this file.
00001 
00011 #pragma once
00012 
00013 // Standard Includes
00014 
00015 // Library Includes
00016 
00017 // Local Includes
00018 #include "../../sharedbase/ComponentInterface.h"
00019 #include "../../sharedbase/Entity_fwd.h"
00020 
00021 #include "../Types.h"
00022 
00023 // Forward Declarations
00024 
00025 // Typedefs and data structures
00026 
00027 namespace Physics {
00028   struct BoundingSphere {
00029     Vector3D center;
00030     float radius;
00031   };
00032   
00033   struct AABB {
00034     Vector3D lowestCorner;
00035     Vector3D highestCorner;
00036   };
00037 }
00038 
00039 // Classes
00040 namespace Physics {
00041   class InterfaceCollider : public ComponentInterface {
00042   public:
00043     virtual ~InterfaceCollider() {}
00044     
00045   public: // API methods
00046     virtual BoundingSphere GetBoundingSphere() const = 0;
00047     virtual AABB GetAABB() const = 0;
00048     
00049     virtual bool CollideRay(const Vector3D&, const Vector3D&) const = 0;
00050     
00051     virtual EntitySPTR GetOwnerEntity() const = 0;
00052     
00053   protected:
00054     InterfaceCollider(EntitySPTR owner, ModuleInterface* module) : ComponentInterface(owner, module) {}
00055   private:
00056     InterfaceCollider& operator=(const InterfaceCollider&); 
00057   };
00058 }