Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
navagentcontext.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
8
//------------------------------------------------------------------------------
9
#include "
resources/resourceid.h
"
10
#include "
ids/id.h
"
11
#include "
ids/idallocator.h
"
12
#include "
streamnavmeshcache.h
"
13
14
namespace
Navigation
15
{
16
17
ID_32_24_8_NAMED_TYPE
(
CrowdAgentId
, instance, navmeshId, generation,
agentType
);
18
19
class
AgentContext
20
{
21
22
public
:
24
AgentContext
();
26
virtual
~AgentContext
();
27
29
static
void
Create
();
30
32
static
void
SetTarget
(
const
Navigation::CrowdAgentId
id
,
const
Math::point
& target);
33
35
static
Math::point
GetTarget
(
const
Navigation::CrowdAgentId
id
);
36
37
38
39
private
:
40
41
typedef
Ids::IdAllocator
<
42
CrowdAgentId
,
43
int,
// agentId in dtcrowds
44
NavMeshId
,
// navmesh this agent is connected to
45
Math::point
// current target point
46
>
AgentContextAllocator
;
47
static
AgentContextAllocator
agentContextAllocator
;
48
};
49
50
}
// namespace Models
Ids::IdAllocator
An ID allocator associates an id with a slice in an N number of arrays.
Definition
idallocator.h:39
Navigation::AgentContext::AgentContextAllocator
Ids::IdAllocator< CrowdAgentId, int, NavMeshId, Math::point > AgentContextAllocator
Definition
navagentcontext.h:46
Navigation::AgentContext::AgentContext
AgentContext()
constructor
Navigation::AgentContext::agentContextAllocator
static AgentContextAllocator agentContextAllocator
Definition
navagentcontext.h:47
Navigation::AgentContext::~AgentContext
virtual ~AgentContext()
destructor
Navigation::AgentContext::GetTarget
static Math::point GetTarget(const Navigation::CrowdAgentId id)
set the transform for a model
Navigation::AgentContext::Create
static void Create()
create context
Navigation::AgentContext::SetTarget
static void SetTarget(const Navigation::CrowdAgentId id, const Math::point &target)
set the target for an agent
idallocator.h
id.h
ID_32_24_8_NAMED_TYPE
#define ID_32_24_8_NAMED_TYPE(x, id32_name, id24_name, id8_name, combined_name)
Definition
id.h:46
Navigation
Navigation::Recast.
Definition
detourdebug.cc:9
Navigation::agentType
agentType
Definition
navagentcontext.h:17
resourceid.h
streamnavmeshcache.h
Math::point
Represents a 3D point in space.
Definition
point.h:22
Navigation::CrowdAgentId
Definition
navagentcontext.h:17
Navigation::NavMeshId
Definition
streamnavmeshcache.h:30
code
addons
navigationfeature
navagentcontext.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.