Recast Navigation
Navigation-mesh Toolset for Games
Sample_TempObstacles.cpp File Reference
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <float.h>
#include <new>
#include "SDL.h"
#include "SDL_opengl.h"
#include <GL/glu.h>
#include "imgui.h"
#include "InputGeom.h"
#include "Sample.h"
#include "Sample_TempObstacles.h"
#include "Recast.h"
#include "RecastDebugDraw.h"
#include "DetourAssert.h"
#include "DetourNavMesh.h"
#include "DetourNavMeshBuilder.h"
#include "DetourDebugDraw.h"
#include "DetourCommon.h"
#include "DetourTileCache.h"
#include "NavMeshTesterTool.h"
#include "OffMeshConnectionTool.h"
#include "ConvexVolumeTool.h"
#include "CrowdTool.h"
#include "RecastAlloc.h"
#include "RecastAssert.h"
#include "fastlz.h"

Classes

struct  FastLZCompressor
 
struct  LinearAllocator
 
struct  MeshProcess
 
struct  TileCacheData
 
struct  RasterizationContext
 
class  TempObstacleHilightTool
 
class  TempObstacleCreateTool
 
struct  TileCacheSetHeader
 
struct  TileCacheTileHeader
 

Enumerations

enum  DrawDetailType { DRAWDETAIL_AREAS , DRAWDETAIL_REGIONS , DRAWDETAIL_CONTOURS , DRAWDETAIL_MESH }
 

Functions

static bool isectSegAABB (const float *sp, const float *sq, const float *amin, const float *amax, float &tmin, float &tmax)
 
static int calcLayerBufferSize (const int gridWidth, const int gridHeight)
 
void drawTiles (duDebugDraw *dd, dtTileCache *tc)
 
void drawDetail (duDebugDraw *dd, dtTileCache *tc, const int tx, const int ty, int type)
 
void drawDetailOverlay (const dtTileCache *tc, const int tx, const int ty, double *proj, double *model, int *view)
 
dtObstacleRef hitTestObstacle (const dtTileCache *tc, const float *sp, const float *sq)
 
void drawObstacles (duDebugDraw *dd, const dtTileCache *tc)
 

Variables

static const int EXPECTED_LAYERS_PER_TILE = 4
 
static const int MAX_LAYERS = 32
 
static const int TILECACHESET_MAGIC = 'T'<<24 | 'S'<<16 | 'E'<<8 | 'T'
 
static const int TILECACHESET_VERSION = 1
 

Enumeration Type Documentation

◆ DrawDetailType

Enumerator
DRAWDETAIL_AREAS 
DRAWDETAIL_REGIONS 
DRAWDETAIL_CONTOURS 
DRAWDETAIL_MESH 

Function Documentation

◆ calcLayerBufferSize()

static int calcLayerBufferSize ( const int  gridWidth,
const int  gridHeight 
)
static

◆ drawDetail()

void drawDetail ( duDebugDraw dd,
dtTileCache tc,
const int  tx,
const int  ty,
int  type 
)

◆ drawDetailOverlay()

void drawDetailOverlay ( const dtTileCache tc,
const int  tx,
const int  ty,
double *  proj,
double *  model,
int *  view 
)

◆ drawObstacles()

void drawObstacles ( duDebugDraw dd,
const dtTileCache tc 
)

◆ drawTiles()

void drawTiles ( duDebugDraw dd,
dtTileCache tc 
)

◆ hitTestObstacle()

dtObstacleRef hitTestObstacle ( const dtTileCache tc,
const float *  sp,
const float *  sq 
)

◆ isectSegAABB()

static bool isectSegAABB ( const float *  sp,
const float *  sq,
const float *  amin,
const float *  amax,
float &  tmin,
float &  tmax 
)
static

Variable Documentation

◆ EXPECTED_LAYERS_PER_TILE

const int EXPECTED_LAYERS_PER_TILE = 4
static

◆ MAX_LAYERS

const int MAX_LAYERS = 32
static

◆ TILECACHESET_MAGIC

const int TILECACHESET_MAGIC = 'T'<<24 | 'S'<<16 | 'E'<<8 | 'T'
static

◆ TILECACHESET_VERSION

const int TILECACHESET_VERSION = 1
static