x
Yes
No
Do you want to visit DriveHQ English website?
Inicio
Características
Precios
Prueba gratuita
Software cliente
Acerca de nosotros
Servidor de archivos
|
Solución de copias de seguridad
|
Servidor FTP
|
Servidor de correo electrónico
|
Alojamiento web
|
Software cliente
Servidor de archivos
Solución de copia de seguridad
Servidor FTP
Servidor de correo electrónico
Alojamiento web
Software cliente
Map.h - Hosted on DriveHQ Cloud IT Platform
Arriba
Subir
Descargar
Compartir
Publicar
Nueva carpeta
Nuevo archivo
Copiar
Cortar
Eliminar
Pegar
Clasificación
Actualizar
Ruta de la carpeta: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\Map.h
Girar
Efecto
Propiedad
Historial
#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
Dirección de la página
Dirección del archivo
Anterior
28/45
Siguiente
Descargar
( 2 KB )
Comments
Total ratings:
0
Average rating:
No clasificado
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.