NavMeshArea.hpp

Go to the documentation of this file.
00001 #ifndef basic_area_NavMeshArea_hpp
00002 #define basic_area_NavMeshArea_hpp
00003 
00004 #include "basic_area.hpp"
00005 #include "BasicPre.hpp"
00006 #include "sim/area/Area.hpp"
00007 
00008 namespace se_basic {
00009 
00010     class _SeBasicExport NavMeshArea : public se_core::Area {
00011     public:
00012         typedef ComponentPtr<NavMeshArea, se_core::sct_BLOB> Ptr;
00013         enum TerrainStyle {
00014             TS_VOID = se_core::Pos::TS_VOID,
00015             TS_WALKABLE
00016         };
00017 
00018 
00019         NavMeshArea(se_core::Composite* owner, const se_core::ComponentFactory* factory, coor_tile_t w, coor_tile_t h, const NavMesh* navMesh);
00020         virtual ~NavMeshArea();
00021 
00022         short index(const se_core::Point3& coor, short oldIndex = -1) const;
00023         coor_t groundHeight(const se_core::Point3& coor, short index = -1) const;
00024 
00025         void force(const se_core::Point3& coor, se_core::Vector3& dest) const;
00026 
00027         short terrainStyle(const se_core::Point3& coor, short index = -1) const;
00028         short nextTerrainStyle(bray_t direction, const se_core::Point3& coor);
00029 
00030         bool isLineOfSight(const se_core::Pos& from, const se_core::Pos& to);
00031         coor_t farthestLineOfSight(const se_core::Pos& from, bray_t yaw, coor_t maxLen, coor_t maxOffNavMesh, se_core::Point3& dest) const;
00032         coor_t farthestLineOfSight(const se_core::Point3& fromPoint, short fromIndex, bray_t yaw, coor_t maxLen, coor_t maxOffNavMesh) const;
00033         void farthestLineOfSight(const se_core::Pos& from, const se_core::Pos& to, se_core::Point3& dest) const;
00034 
00035         void path(const se_core::Pos& from, const se_core::Pos& to, se_core::Point3& out) const;
00036         bool isNeighbour(const Area& area) const;
00037 
00038         bray_t slideAngle(const se_core::Pos& from, const se_core::Point3& to) const;
00039         bray_t wallAngle(const se_core::Pos& from, const se_core::Point3& to) const;
00040         bool doesTouchVoid(const se_core::Point3& wc, short index, coor_t radius) const;
00041 
00042         coor_double_t findNearest(const se_core::Point3& p, se_core::Point3& out) const;
00043 
00044     private:
00045         short farthestLos(const se_core::Point3& from, short fromIndex, short toIndex) const;
00046 
00047         const NavMesh* navMesh_;
00048     };
00049 
00050 }
00051 
00052 #endif

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:02 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo