Dungeon Architect  17.0.0
SharpNav.Crowds.Agent Class Reference

A crowd agent is a unit that moves across the navigation mesh More...

Inheritance diagram for SharpNav.Crowds.Agent:

Public Member Functions

 Agent (int maxPath, int agentIndex)
 
void Integrate (float dt)
 Update the position after a certain time 'dt' More...
 
void Reset (int reference, Vector3 nearest)
 
void RequestMoveTargetReplan (int reference, Vector3 pos)
 Change the move target More...
 
bool RequestMoveTarget (int reference, Vector3 pos)
 Request a new move target More...
 
void RequestMoveVelocity (Vector3 vel)
 Request a new move velocity More...
 
void ResetMoveTarget ()
 Reset the move target of an agent More...
 
void UpdateAgentParameters (AgentParams parameters)
 Modify the agent parameters More...
 
bool Equals (Agent other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static bool operator== (Agent left, Agent right)
 
static bool operator!= (Agent left, Agent right)
 

Public Attributes

float topologyOptTime
 
float DesiredSpeed
 
Vector3 Disp
 
Vector3 DesiredVel
 
Vector3 NVel
 
Vector3 Vel
 
AgentParams Parameters
 
Vector3[] CornerVerts
 
int[] CornerFlags
 
int[] CornerPolys
 
int TargetRef
 
int TargetPathqRef
 
bool TargetReplan
 
float TargetReplanTime
 

Static Public Attributes

const int AgentMaxNeighbors = 6
 

Properties

int AgentIndex [get]
 
bool IsActive [get, set]
 
bool IsPartial [get, set]
 
AgentState State [get, set]
 
Vector3 Position [get, set]
 
LocalBoundary Boundary [get]
 
PathCorridor Corridor [get]
 
CrowdNeighbor[] Neighbors [get]
 
int NeighborCount [get, set]
 
TargetState TargetState [get, set]
 
Vector3 TargetPosition [get, set]
 
int CornerCount [get, set]
 

Detailed Description

A crowd agent is a unit that moves across the navigation mesh

Definition at line 21 of file Agent.cs.

Member Function Documentation

◆ Integrate()

void SharpNav.Crowds.Agent.Integrate ( float  dt)

Update the position after a certain time 'dt'

Parameters
dtTime that passed

Definition at line 226 of file Agent.cs.

◆ RequestMoveTarget()

bool SharpNav.Crowds.Agent.RequestMoveTarget ( int  reference,
Vector3  pos 
)

Request a new move target

Parameters
referenceThe polygon reference
posThe target's coordinates
Returns
True if request met, false if not

Definition at line 292 of file Agent.cs.

◆ RequestMoveTargetReplan()

void SharpNav.Crowds.Agent.RequestMoveTargetReplan ( int  reference,
Vector3  pos 
)

Change the move target

Parameters
referenceThe polygon reference
posThe target's coordinates

Definition at line 273 of file Agent.cs.

◆ RequestMoveVelocity()

void SharpNav.Crowds.Agent.RequestMoveVelocity ( Vector3  vel)

Request a new move velocity

Parameters
velThe agent's velocity

Definition at line 314 of file Agent.cs.

◆ ResetMoveTarget()

void SharpNav.Crowds.Agent.ResetMoveTarget ( )

Reset the move target of an agent

Definition at line 327 of file Agent.cs.

◆ UpdateAgentParameters()

void SharpNav.Crowds.Agent.UpdateAgentParameters ( AgentParams  parameters)

Modify the agent parameters

Parameters
parametersThe new parameters

Definition at line 341 of file Agent.cs.


The documentation for this class was generated from the following file: