|
Atoms Crowd
4.1.0
|
10 #include <Atoms/Globals.h>
11 #include <Atoms/AgentGroup.h>
12 #include <Atoms/SimulationEvent.h>
13 #include <Atoms/Physx/AtomsPhysx.h>
64 void initDynamics(
double scale = 1.0,
bool debug =
false);
126 void moveSimulationEvent(AtomsPtr<SimulationEvent>& simEvent,
unsigned int position,
short type = SimulationEvent::kNative | SimulationEvent::kScript);
129 void moveSimulationEvent(
const std::string& name,
unsigned int position,
short type = SimulationEvent::kNative | SimulationEvent::kScript);
135 std::vector<std::string>
animationClipEventNames(
short type = SimulationEvent::kAnimClipNative | SimulationEvent::kAnimClipScript)
const;
138 std::vector<std::string>
agentTypeEventNames(
short type = SimulationEvent::kAgentTypeNative | SimulationEvent::kAgentTypeScript)
const;
149 void setDynamicEnabled(
bool value);
157 std::vector<AtomsPtr<AgentGroup>> m_agentGroups;
159 std::vector<AtomsPtr<AgentGroup>> m_agentGroupsOrder;
161 std::list<AtomsPtr<SimulationEvent>> m_events;
167 mutable std::recursive_mutex m_mutex;
170 bool m_dynamicEnabled;
void clear()
Remove all the events and agent groups from this simulation.
void removeSimulationEvent(const std::string &name)
Removes a simulation event.
AtomsPtr< SimulationEvent > simulationEvent(const std::string &name)
Gets the simulation event with the given name.
void resetSimulation()
Reset simulation.
AgentsSimulation()
Constructor.
void endSimulation()
End simulation.
std::vector< std::string > agentTypeEventNames(short type=SimulationEvent::kAgentTypeNative|SimulationEvent::kAgentTypeScript) const
Gets all agent type events.
void removeSimulationEvent(AtomsPtr< SimulationEvent > &simEvent)
Removes a simulation event.
unsigned int numAgentGroups()
Get number of agent groups.
Agent simulation.
Definition: AgentsSimulation.h:24
AtomsPtr< AgentGroup > agentGroup(unsigned int i)
Gets an agent group.
~AgentsSimulation()
Destructor.
void initSimulation()
Init simulation.
std::vector< std::string > agentGroupNames() const
Gets all agent group names.
void computeFrame()
Compute frame.
void removeAgentGroup(AtomsPtr< AgentGroup > &aGroup)
Removes an agent group.
Atoms namespace.
Definition: Agent.h:28
void endFrame()
End frame.
void moveSimulationEvent(AtomsPtr< SimulationEvent > &simEvent, unsigned int position, short type=SimulationEvent::kNative|SimulationEvent::kScript)
Moves the simulation event.
void addSimulationEvent(AtomsPtr< SimulationEvent > &simEvent, bool replace=true)
Adds a simulation event.
std::vector< std::string > animationClipEventNames(short type=SimulationEvent::kAnimClipNative|SimulationEvent::kAnimClipScript) const
Gets all animation clip events.
void moveSimulationEvent(const std::string &name, unsigned int position, short type=SimulationEvent::kNative|SimulationEvent::kScript)
Moves the simulation event.
std::vector< std::string > simulationEventNames(short type=SimulationEvent::kAll) const
Gets all simulation events.
Definition: AtomsPhysx.h:40
void computeDynamics()
Compute dynamics.
bool isDynamicEnabled() const
Return if the physx solver is enabled.
void addAnimationClipEvent(AtomsPtr< SimulationEvent > &simEvent, bool replace=true)
Adds a simulation event.
void addAgentTypeEvent(AtomsPtr< SimulationEvent > &simEvent, bool replace=true)
Adds a simulation event.
void addAgentGroup(AtomsPtr< AgentGroup > &aGroup)
Adds an agent group.
void initFrame()
Init Frame.