Documentation ¶
Index ¶
- Constants
- func DtBuildTileCacheContours(layer *DtTileCacheLayer, walkableClimb int, maxError float32, ...) detour.DtStatus
- func DtBuildTileCachePolyMesh(lcset *DtTileCacheContourSet, mesh *DtTileCachePolyMesh) detour.DtStatus
- func DtBuildTileCacheRegions(layer *DtTileCacheLayer, walkableClimb int) detour.DtStatus
- type DetourTitleCacheData
- type DetourTitleCacheLayerData
- type DtCompressedTileRef
- type DtObstacleRef
- type DtTileCache
- func (d *DtTileCache) AddObstacle(pos []float32, radius, height float32, result *DtObstacleRef) detour.DtStatus
- func (d *DtTileCache) AddTile(data *DetourTitleCacheLayerData, flags int, result *DtCompressedTileRef) detour.DtStatus
- func (d *DtTileCache) BuildNavMeshTilesAt(tx, ty int, navmesh detour.IDtNavMesh) detour.DtStatus
- func (d *DtTileCache) CalcTightTileBounds(header *DtTileCacheLayerHeader, bmin, bmax []float32)
- func (d *DtTileCache) GetCompressor() DtTileCacheCompressor
- func (d *DtTileCache) GetObstacle(i int) *DtTileCacheObstacle
- func (d *DtTileCache) GetObstacleBounds(ob *DtTileCacheObstacle, bmin, bmax []float32)
- func (d *DtTileCache) GetObstacleCount() int
- func (d *DtTileCache) GetObstacleRef(ob *DtTileCacheObstacle) DtObstacleRef
- func (d *DtTileCache) GetParams() *DtTileCacheParams
- func (d *DtTileCache) GetTile(i int) *dtCompressedTile
- func (d *DtTileCache) GetTileByRef(ref DtCompressedTileRef) *dtCompressedTile
- func (d *DtTileCache) GetTileCount() int
- func (d *DtTileCache) GetTilesAt(tx, ty int, tiles []DtCompressedTileRef, maxTiles int) int
- func (d *DtTileCache) Init(params *DtTileCacheParams, tcomp DtTileCacheCompressor, ...) detour.DtStatus
- func (d *DtTileCache) RemoveObstacle(ref DtObstacleRef) detour.DtStatus
- func (d *DtTileCache) Update(dt float32, navmesh detour.IDtNavMesh, upToDates ...*bool) detour.DtStatus
- type DtTileCacheCompressor
- type DtTileCacheContour
- type DtTileCacheContourSet
- type DtTileCacheLayer
- type DtTileCacheLayerHeader
- type DtTileCacheMeshProcess
- type DtTileCacheObstacle
- type DtTileCacheParams
- type DtTileCachePolyMesh
- type NavMeshTileBuildContext
- type ObstacleRequest
Constants ¶
View Source
const ( DT_OBSTACLE_EMPTY = iota DT_OBSTACLE_PROCESSING DT_OBSTACLE_PROCESSED DT_OBSTACLE_REMOVING )
View Source
const ( DT_OBSTACLE_CYLINDER = iota DT_OBSTACLE_BOX // AABB DT_OBSTACLE_ORIENTED_BOX // OBB )
View Source
const ( TileCache_MAX_UPDATE = 64 TileCache_MAX_REQUESTS = 64 )
View Source
const ( REQUEST_ADD = iota REQUEST_REMOVE )
View Source
const ( MAX_REQUESTS = 64 MAX_UPDATE = 64 )
View Source
const DT_COMPRESSEDTILE_FREE_DATA = 0x01 ///< Navmesh owns the tile memory and should free it.
View Source
const DT_LAYER_MAX_NEIS = 16
View Source
const DT_MAX_TOUCHED_TILES = 8
View Source
const DT_TILECACHE_MAGIC = 'D'<<24 | 'T'<<16 | 'L'<<8 | 'R' ///< 'DTLR';
View Source
const DT_TILECACHE_NULL_AREA = 0
View Source
const DT_TILECACHE_NULL_IDX = 0xffff
View Source
const DT_TILECACHE_VERSION = 1
View Source
const DT_TILECACHE_WALKABLE_AREA = 63
View Source
const MAX_REM_EDGES = 48 // TODO: make this an expression.
View Source
const MAX_VERTS_PER_POLY = 6 // TODO: use the DT_VERTS_PER_POLYGON
View Source
const VERTEX_BUCKET_COUNT2 = (1 << 8)
Variables ¶
This section is empty.
Functions ¶
func DtBuildTileCacheContours ¶
func DtBuildTileCacheContours( layer *DtTileCacheLayer, walkableClimb int, maxError float32, lcset *DtTileCacheContourSet) detour.DtStatus
TODO: move this somewhere else, once the layer meshing is done.
func DtBuildTileCachePolyMesh ¶
func DtBuildTileCachePolyMesh( lcset *DtTileCacheContourSet, mesh *DtTileCachePolyMesh) detour.DtStatus
func DtBuildTileCacheRegions ¶
func DtBuildTileCacheRegions( layer *DtTileCacheLayer, walkableClimb int) detour.DtStatus
Types ¶
type DetourTitleCacheData ¶
type DetourTitleCacheData struct { }
type DetourTitleCacheLayerData ¶
type DetourTitleCacheLayerData struct { Header *DtTileCacheLayerHeader Comp DtTileCacheCompressor //压缩器 Heights []int Areas []int Cons []int Regs []int RegCount int }
func DtBuildTileCacheLayer ¶
func DtBuildTileCacheLayer(comp DtTileCacheCompressor, header *DtTileCacheLayerHeader, heights []int, areas []int, cons []int, ) *DetourTitleCacheLayerData
type DtCompressedTileRef ¶
type DtCompressedTileRef int
type DtObstacleRef ¶
type DtObstacleRef int
type DtTileCache ¶
type DtTileCache struct {
// contains filtered or unexported fields
}
func (*DtTileCache) AddObstacle ¶
func (d *DtTileCache) AddObstacle(pos []float32, radius, height float32, result *DtObstacleRef) detour.DtStatus
func (*DtTileCache) AddTile ¶
func (d *DtTileCache) AddTile(data *DetourTitleCacheLayerData, flags int, result *DtCompressedTileRef) detour.DtStatus
func (*DtTileCache) BuildNavMeshTilesAt ¶
func (d *DtTileCache) BuildNavMeshTilesAt(tx, ty int, navmesh detour.IDtNavMesh) detour.DtStatus
func (*DtTileCache) CalcTightTileBounds ¶
func (d *DtTileCache) CalcTightTileBounds(header *DtTileCacheLayerHeader, bmin, bmax []float32)
func (*DtTileCache) GetCompressor ¶
func (d *DtTileCache) GetCompressor() DtTileCacheCompressor
func (*DtTileCache) GetObstacle ¶
func (d *DtTileCache) GetObstacle(i int) *DtTileCacheObstacle
func (*DtTileCache) GetObstacleBounds ¶
func (d *DtTileCache) GetObstacleBounds(ob *DtTileCacheObstacle, bmin, bmax []float32)
func (*DtTileCache) GetObstacleCount ¶
func (d *DtTileCache) GetObstacleCount() int
func (*DtTileCache) GetObstacleRef ¶
func (d *DtTileCache) GetObstacleRef(ob *DtTileCacheObstacle) DtObstacleRef
func (*DtTileCache) GetParams ¶
func (d *DtTileCache) GetParams() *DtTileCacheParams
func (*DtTileCache) GetTile ¶
func (d *DtTileCache) GetTile(i int) *dtCompressedTile
func (*DtTileCache) GetTileByRef ¶
func (d *DtTileCache) GetTileByRef(ref DtCompressedTileRef) *dtCompressedTile
func (*DtTileCache) GetTileCount ¶
func (d *DtTileCache) GetTileCount() int
func (*DtTileCache) GetTilesAt ¶
func (d *DtTileCache) GetTilesAt(tx, ty int, tiles []DtCompressedTileRef, maxTiles int) int
func (*DtTileCache) Init ¶
func (d *DtTileCache) Init(params *DtTileCacheParams, tcomp DtTileCacheCompressor, tmproc DtTileCacheMeshProcess) detour.DtStatus
func (*DtTileCache) RemoveObstacle ¶
func (d *DtTileCache) RemoveObstacle(ref DtObstacleRef) detour.DtStatus
func (*DtTileCache) Update ¶
func (d *DtTileCache) Update(dt float32, navmesh detour.IDtNavMesh, upToDates ...*bool) detour.DtStatus
type DtTileCacheCompressor ¶
type DtTileCacheContour ¶
type DtTileCacheContourSet ¶
type DtTileCacheContourSet struct { Nconts int Conts []*DtTileCacheContour }
type DtTileCacheLayer ¶
type DtTileCacheLayerHeader ¶
type DtTileCacheMeshProcess ¶
type DtTileCacheMeshProcess interface {
Process(params *detour.DtNavMeshCreateParams, polyAreas []int, polyFlags []int)
}
type DtTileCacheObstacle ¶
type DtTileCacheParams ¶
type DtTileCachePolyMesh ¶
type DtTileCachePolyMesh struct { Nvp int Nverts int ///< Number of vertices. Npolys int ///< Number of polygons. Verts []int ///< Vertices of the mesh, 3 elements per vertex. Polys []int ///< Polygons of the mesh, nvp*2 elements per polygon. Flags []int ///< Per polygon flags. Areas []int ///< Area ID of polygons. }
type NavMeshTileBuildContext ¶
type NavMeshTileBuildContext struct {
// contains filtered or unexported fields
}
type ObstacleRequest ¶
type ObstacleRequest struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.