Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
streamnavmeshcache.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
9
//------------------------------------------------------------------------------
10
11
#include "
core/refcounted.h
"
12
#include "
resources/resourceloader.h
"
13
#include "
nflatbuffer/flatbufferinterface.h
"
14
#include "flat/navigation/navmesh.h"
15
#include "
ids/idallocator.h
"
16
17
class
dtNavMesh;
18
class
dtNavMeshQuery;
19
20
#define MAX_NAV_NODES 8192
21
22
namespace
Navigation
23
{
24
25
enum
NavigationIdType
26
{
27
NavMeshIdType
28
};
29
30
RESOURCE_ID_TYPE
(
NavMeshId
);
31
32
class
StreamNavMeshCache
:
public
Resources::ResourceLoader
33
{
34
__DeclareClass
(
StreamNavMeshCache
);
35
36
public
:
37
39
StreamNavMeshCache
();
41
virtual
~StreamNavMeshCache
();
42
44
dtNavMesh*
GetDetourMesh
(
NavMeshId
id
);
45
47
Util::Array<NavMeshId>
GetLoadedMeshes
();
48
49
private
:
50
52
ResourceLoader::ResourceInitOutput
InitializeResource
(
const
ResourceLoadJob
& job,
const
Ptr<IO::Stream>
& stream)
override
;
54
void
Unload
(
const
Resources::ResourceId
id
);
55
56
enum
57
{
58
Nav_Name
,
59
Nav_Mesh
,
60
Nav_Query
,
61
Nav_MeshInfo
62
};
63
Ids::IdAllocatorSafe
<0xff,
64
Util::StringAtom
,
65
dtNavMesh*,
66
dtNavMeshQuery*,
67
NavMeshT>
allocator
;
68
};
69
}
70
Ids::IdAllocatorSafe
Definition
idallocator.h:105
Navigation::StreamNavMeshCache::GetLoadedMeshes
Util::Array< NavMeshId > GetLoadedMeshes()
Definition
streamnavmeshcache.cc:48
Navigation::StreamNavMeshCache::InitializeResource
ResourceLoader::ResourceInitOutput InitializeResource(const ResourceLoadJob &job, const Ptr< IO::Stream > &stream) override
perform actual load, override in subclass
Definition
streamnavmeshcache.cc:63
Navigation::StreamNavMeshCache::Unload
void Unload(const Resources::ResourceId id)
unload resource
Definition
streamnavmeshcache.cc:115
Navigation::StreamNavMeshCache::~StreamNavMeshCache
virtual ~StreamNavMeshCache()
destructor
Definition
streamnavmeshcache.cc:28
Navigation::StreamNavMeshCache::GetDetourMesh
dtNavMesh * GetDetourMesh(NavMeshId id)
Definition
streamnavmeshcache.cc:37
Navigation::StreamNavMeshCache::__DeclareClass
__DeclareClass(StreamNavMeshCache)
Navigation::StreamNavMeshCache::Nav_MeshInfo
@ Nav_MeshInfo
Definition
streamnavmeshcache.h:61
Navigation::StreamNavMeshCache::Nav_Query
@ Nav_Query
Definition
streamnavmeshcache.h:60
Navigation::StreamNavMeshCache::Nav_Mesh
@ Nav_Mesh
Definition
streamnavmeshcache.h:59
Navigation::StreamNavMeshCache::Nav_Name
@ Nav_Name
Definition
streamnavmeshcache.h:58
Navigation::StreamNavMeshCache::allocator
Ids::IdAllocatorSafe< 0xff, Util::StringAtom, dtNavMesh *, dtNavMeshQuery *, NavMeshT > allocator
Definition
streamnavmeshcache.h:67
Navigation::StreamNavMeshCache::StreamNavMeshCache
StreamNavMeshCache()
constructor
Definition
streamnavmeshcache.cc:20
Ptr
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition
ptr.h:38
Resources::ResourceLoader
Definition
resourceloader.h:60
Util::Array
Nebula's dynamic array class.
Definition
array.h:61
Util::StringAtom
A StringAtom.
Definition
stringatom.h:22
flatbufferinterface.h
idallocator.h
Navigation
Navigation::Recast.
Definition
detourdebug.cc:9
Navigation::NavigationIdType
NavigationIdType
Definition
streamnavmeshcache.h:26
Navigation::NavMeshIdType
@ NavMeshIdType
Definition
streamnavmeshcache.h:27
refcounted.h
RESOURCE_ID_TYPE
#define RESOURCE_ID_TYPE(type)
Definition
resourceid.h:41
resourceloader.h
Navigation::NavMeshId
Definition
streamnavmeshcache.h:30
Resources::ResourceLoader::ResourceInitOutput
Definition
resourceloader.h:143
Resources::ResourceLoader::ResourceLoadJob
Definition
resourceloader.h:167
code
addons
navigationfeature
streamnavmeshcache.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.