Skip to content

Commit 6d6d3b5

Browse files
committed
Merge pull request #7 from songchengjiang/v3
add interface
2 parents b287b50 + ff08991 commit 6d6d3b5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

recast/DetourCrowd/DetourCrowd.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,14 @@ dtCrowdAgent* dtCrowd::getEditableAgent(const int idx)
498498
return &m_agents[idx];
499499
}
500500

501+
502+
dtCrowdAgentAnimation* dtCrowd::getEditableAgentAnim(const int idx)
503+
{
504+
if (idx < 0 || idx >= m_maxAgents)
505+
return 0;
506+
return &m_agentAnims[idx];
507+
}
508+
501509
void dtCrowd::updateAgentParameters(const int idx, const dtCrowdAgentParams* params)
502510
{
503511
if (idx < 0 || idx >= m_maxAgents)

recast/DetourCrowd/DetourCrowd.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ class dtCrowd
269269
/// @return The requested agent.
270270
dtCrowdAgent* getEditableAgent(const int idx);
271271

272+
/// Gets the specified agentAnim from the pool.
273+
/// @param[in] idx The agent index. [Limits: 0 <= value < #getAgentCount()]
274+
/// @return The requested agentAnim.
275+
dtCrowdAgentAnimation* getEditableAgentAnim(const int idx);
276+
272277
/// The maximum number of agents that can be managed by the object.
273278
/// @return The maximum number of agents.
274279
int getAgentCount() const;

0 commit comments

Comments
 (0)