|
Re: navmesh/pathfinding plugin
[Re: Wjbender]
#422123
05/02/13 19:05
05/02/13 19:05
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
OP
User
|
OP
User
Joined: Mar 2012
Posts: 927
cyberspace
|
current function and implementation status --
//////////////////////////////////////
//////////////////////////////////////
//************************************
// TYPES
//
typedef void* Nav_Thread;
#define tilemesh 2
//////////////////////////////////////
//////////////////////////////////////
//************************************
// HELPER/DEBUG FUNCTIONS
my_polygon* get_polygons ();
my_triangle* get_triangles (my_polygon* polygon);
int get_polycount ();
float ceiling (float val);
void save_debugmesh (char* filename);
void save_merged (void* mesh , char* filename);
void calc_bbox (ENTITY *ent , int chunk , var *min , var *max);
VECTOR* vec_edge (VECTOR *from);
VECTOR* nav_random_points (int points);
VECTOR* nearest_navpoint (VECTOR* from);
VECTOR* random_point_around (VECTOR* from , float radius);
//////////////////////////////////////
//////////////////////////////////////
//************************************
// BUILD PARAM FUNCTIONS
//
typedef struct custombuild
{
float CellSize;
float CellHeight;
float AgentHeight;
float AgentRadius;
float AgentMaxClimb;
float AgentMaxSlope;
float RegionMinSize;
float RegionMergeSize;
float EdgeMaxLen;
float EdgeMaxError;
float VertsPerPoly;
float DetailSampleDist;
float DetailSampleMaxError;
int monotonePartitioning;
float TileSize;
int navtype;
int buildalltiles;
}custombuild;
custombuild* create_custombuild ();
custombuild* load_custombuild (char* filename);
void remove_custombuild (custombuild* mybuild);
int export_custombuild (char* filename , custombuild *step);
//////////////////////////////////////
//////////////////////////////////////
//************************************
// NAVBUILDER OBJECT FUNCTIONS
//
int is_valid_navbuilder ();
void create_navbuilder ();
void destroy_navbuilder ();
Nav_Thread init_navbuilder (custombuild* step);
//////////////////////////////////////
//////////////////////////////////////
//************************************
// STANDARD PATH-FINDING FUNCTIONS
//
VECTOR* findpath (VECTOR *from , VECTOR* to , int *num_points);
//////////////////////////////////////
//////////////////////////////////////
//************************************
// CROWD/AGENT FUNCTIONS
//
-------BUSY
//////////////////////////////////////
//////////////////////////////////////
//************************************
// INPUT GEOMETRY FUNCTIONS
//
void mesh_from_level_blocks (ENTITY* level , int chunks);
void* mesh_from_level_blocks_chunk (ENTITY* level , int chunks);
void transform_mesh_ent (void* mesh , ENTITY* ent);
void transform_mesh_arg (void* mesh , ANGLE* angle , VECTOR* scale , VECTOR* pos);
void* mesh_from_ent (ENTITY* ent);
void mesh_from_hmp (ENTITY* ent , int chunks);
void* mesh_from_hmp_chunk (ENTITY* ent , int chunk);
void* mesh_from_obj_file (char* filename);
void* mesh_from_buffers (D3DVERTEX* vbuffer , short* tbuffer , int verts , int tris);
int get_vertcount (void* mesh);
int get_tricount (void* mesh);
int* get_tbuffer (void* mesh);
float* get_vbuffer (void* mesh);
void save_mesh (void* mesh ,char* filename);
void* load_mesh (char* filename);
//////////////////////////////////////
//////////////////////////////////////
//************************************
// TILE MANIPULATION FUNCTIONS
//
void remove_all_tiles ();
void remove_tile (VECTOR* pos);
void save_all_tiles (char* filename);
void load_all_tiles (char* filename);
void remove_tiles_bbox (VECTOR* bmin , VECTOR* bmax);
void remove_tiles_ent_box (ENTITY *ent , int chunk);
Nav_Thread build_all_tiles ();
Nav_Thread build_tile (VECTOR* pos);
Nav_Thread build_tiles_bbox (VECTOR* bmin , VECTOR* bmax);
Nav_Thread build_tiles_ent_box (ENTITY *ent , int chunk);
//build from multible entity boxes in a list all at once
void clear_temp_entlist();
Nav_Thread build_tiles_box_entlist();
void rem_temp_entlist (ENTITY* ent , int chunk);
void add_temp_entlist (ENTITY* ent , int chunk);
//build from multible positions in a list all at once
void clear_temp_pntlist ();
Nav_Thread build_tiles_pntlist ();
void rem_temp_pntlist (VECTOR* pnt , int id);
void add_temp_pntlist (VECTOR* pnt , int id);
//////////////////////////////////////
//////////////////////////////////////
//************************************
// INPUT GEOMETRY LIST FUNCTIONS
//
void clear_meshlist ();
void add_meshlist (void* mesh);
void rem_meshlist (void* mesh);
void rem_meshlist_ent (ENTITY* ent , int chunk);
void* get_meshlist_ent (ENTITY* ent , int chunk);
//////////////////////////////////////
//////////////////////////////////////
//************************************
// THREAD STATUS (DONE/BUSY)
//
int thread_alive (void* thandle);
Compulsive compiler
|
|
|
Re: navmesh/pathfinding plugin
[Re: Wjbender]
#422752
05/16/13 07:23
05/16/13 07:23
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
what should I click to download it? alway further windows appearing for signing up or registering or other blabla...
about your impression: my pathfinder uses navmesh-like areas (consisting of various amount of tiles), where I do the high level pathfinding for groups, and short low level pathfindings are done on tile level for units. so in theory I could use a navmesh too, which would have benefits in case of e.g complex castles, if I can adapt its features to my needs, basically a very effective collision avoidance is a must, and (what seems to be more difficult) dealing with various unit sizes also should be solved. but if I can generate tiles from navmesh areas, the thing would work in the very same way as currently, except that my areas are processed by a terrain analysis to realize strategic positions, that should be reworked totally.
|
|
|
|