x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
Map.h - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\Map.h
旋转
特效
属性
历史版本
#pragma once //#include "Character.h" #include "DataTypes.h" namespace GameFactory{ //#define Vector3 Vec3 class Map{//tolua_export private: Matrix
* heightStatic;//height of raycast to static object Matrix
* connectX;//answer cell(x,y) connect with cell(x+1,y) Matrix
* connectY;//answer cell(x,y) connect with cell(x,y+1) int sizeX,sizeY,totalSize; float mapSizeX,mapSizeY; static float NegativeHeight; void initHeight(); void initCellConnection(); float heuristicDistance(int x,int y,Vec3 to); static Map* theMap; public: Map(float mapSizeX, float mapSizeY); ~Map(); inline static Map* GetInstance(){assert(theMap!=NULL);return theMap;};//tolua_export bool IsAccessible(Vec3 pos);//tolua_export bool IsAccessible(int posX,int posY);//tolua_export Vec3 GetPosition(int x,int y);//tolua_export void GetCell(Vec3 pos, int &x, int &y); //tolua_export void InitPathFindingParameters(Vec2Queue* wayPoints, Vec3Queue* smoothWP, DistanceMap* distanceMap, Vec3* from, OpenListPriority* openList, CloseList* closeList, Vec2Queue* visitedPos,Matrix
* isCovered); //wayPoints return by MakePath does not include the from Point! bool MakePath(Vec3 from, Vec3 to, Vec2Queue &wayPoints, DistanceMap &distanceMap, OpenListPriority &openList, CloseList &closeList);//distanceMap and closeList should be in the same size bool ComputeDistanceMapStep(Vec3 to, DistanceMap &distanceMap, OpenListPriority &openList, CloseList &closeList);//distanceMap and closeList should be in the same size bool MakePathStep(Vec3 from, Vec2 &curPos, DistanceMap &distanceMap, Vec2Queue &wayPoints); bool ComputeDistanceMapStep(Vec3 from, int range, DistanceMap &distanceMap, OpenListPriority &openList, CloseList &closeList, Vec2Queue &visitedPos,Matrix
&isCovered); //void ComputeDistanceMapTo(DistanceMap &distanceMap, OpenListPriority &openList, CloseList &closeList, // CloseList &closeListTo); void InitMakeSmoothPath(Vec3 from, Vec3 &refPos, Vec3 &prePos); bool MakeSmoothPathStep(Vec3 &refPos, Vec3 &prePos, Vec3 to, Vec2Queue &wayPoints,Vec3Queue &smoothWp); void GetNeighbors(int x,int y, Vec2Queue &ret); inline int SizeX(){return sizeX;}//tolua_export inline int SizeY(){return sizeY;}//tolua_export inline bool IsConnectX(int x,int y){return connectX->get(x,y);};//tolua_export inline bool IsConnectY(int x,int y){return connectY->get(x,y);};//tolua_export static float WalkableHeight;//tolua_export static float GridSize;//tolua_export static float FootHeight;//tolua_export static int InfiniteDistance;//tolua_export static int MaximumSearchDistance;//tolua_export };//tolua_export }
Map.h
网页地址
文件地址
上一页
28/45
下一页
下载
( 2 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.