1 #ifndef BZ_FX_AGENT_SIMULATION_H
2 #define BZ_FX_AGENT_SIMULATION_H
4 #include <bz/collision/collision.h>
5 #include <bz/math/vector.h>
6 #include <bz/memory/arena.h>
7 #include <bz/types/identifier.h>
13 typedef struct BZAgentSimulation BZAgentSimulation
;
14 typedef BZAgentSimulation
* BZAgentSimulationID
;
16 typedef struct BZAgent BZAgent
;
17 typedef BZAgent
* BZAgentID
;
19 struct BZAgentDetails
{
26 typedef struct BZAgentDetails BZAgentDetails
;
28 #define bzAgentDefaultMass 1.0f
29 #define bzAgentDefaultMaxForce 50.0f
30 #define bzAgentDefaultMaxSpeed 100.0f
32 extern BZAgentSimulationID
bzFXCreateAgentSimulation(BZMemoryArenaID arena
, size_t maxAgents
, const char *identifierFmt
, ...);
34 extern void bzFXUpdateAgentSimulation(BZAgentSimulationID simulation
, float deltaTime
, BZCollisionSpaceID collisionSpace
, BZVector
*v
);
36 extern BZAgentID
bzFXAgentSimulationAddAgent(BZAgentSimulationID simulation
, const BZAgentDetails
*details
);
37 extern void bzFXAgentSimulationRemoveAgent(BZAgentSimulationID simulation
, BZAgentID agent
);
39 extern void bzFXAgentSimulationGetAgentDetails(BZAgentDetails
*detailsOut
, BZAgentSimulationID simulation
, BZAgentID agent
);
41 extern void bzFXAgentSimulationDrawDebug(BZAgentSimulationID simulation
);