Class AgentInstance

Class Documentation

class flamegpu::AgentInstance

This class represents standalone copy of a single agent It stores all the data internally, unlike an AgentVector::Agent

Note

Not 100% on the name, might change

Public Functions

explicit AgentInstance(const AgentDescription &agent_desc)

Initialises the agent variables with their default values

AgentInstance(const AgentInstance &other)

Copy constructors

explicit AgentInstance(const AgentVector::CAgent &other)
AgentInstance(AgentInstance &&other) noexcept

Move constructor

AgentInstance &operator=(const AgentInstance &other)

Assignment operators

AgentInstance &operator=(const AgentVector::CAgent &other)
AgentInstance &operator=(AgentInstance &&other) noexcept
template<typename T>
T getVariable(const std::string &variable_name) const

Getters

template<typename T, unsigned int N>
std::array<T, N> getVariable(const std::string &variable_name) const
template<typename T>
T getVariable(const std::string &variable_name, const unsigned int &index) const
template<typename T>
void setVariable(const std::string &variable_name, const T &value)

Setters

template<typename T, unsigned int N>
void setVariable(const std::string &variable_name, const std::array<T, N> &value)
template<typename T>
void setVariable(const std::string &variable_name, const unsigned int &index, const T &value)