11 #include <Atoms/LayoutGenerators/DynamicLayoutGenerator.h>
12 #include <AtomsUtils/Mesh.h>
13 #include <AtomsUtils/Image.h>
34 virtual std::vector<Atoms::AgentInitData>
generate(
double time)
41 inline void setDefaultRadius(
double radius){m_defaultRadius = radius;}
42 inline void setDensityMap(
AtomsUtils::Image* densityMap){m_densityMap = densityMap;}
43 inline void setMaxRadius(
double radius){m_maxRadius = radius;}
44 inline void setUseDensityMap(
bool state){m_useDensityMap = state;}
45 inline void setRandomizeRadius(
bool state){m_randomizeRadius = state;}
46 inline void setIterations(
int iterations){m_iterations = iterations;}
47 inline void setRandomDirection(
const AtomsMath::Vector3f &randomDirection) { m_randomDirection = randomDirection; }
48 inline void setMeshMatrix(
const AtomsMath::Matrix &matrix){m_meshMatrix = matrix;}
49 inline void setRandomSeed(
unsigned int seed){m_randomSeed = seed;}
50 inline void setEraseMap(
AtomsUtils::Image* densityMap) { m_eraseMap = densityMap; }
51 inline void setEraseThreshold(
double radius) { m_eraseThreshold = radius; }
52 inline void setUseEraseMap(
bool state) { m_useEraseMap = state; }
53 inline void useNormalAsUpVector(
bool value) { m_useNormalAsUp = value; }
54 inline void setUseNavMesh(
bool value) { m_useNavMesh = value; }
55 inline void setNavMeshName(
const std::string & value) { m_navMeshName = value; };
56 inline void setClamp(
const bool useClampVector,
const AtomsCore::Vector3 &clampVector,
const double clampAngle) { m_useClampVector = useClampVector; m_clampVector = clampVector; m_clampAngle = clampAngle;}
57 inline void setOtherSamples(
const std::vector<AtomsCore::Vector3> &otherSamples) { m_otherSamples = otherSamples; }
58 inline void setAgentMaxNum(
const int agentMaxNum) { m_agentMaxNum = agentMaxNum; }
60 inline const std::map<int, AtomsCore::Vector3> scaleOverride()
const {
AtomsUtils::Logger::warning() <<
"LayoutGenerator.scaleOverride method is deprecated.";
return std::map<int, AtomsCore::Vector3>(); };
62 inline void setScaleOverride(
const std::map<int, AtomsCore::Vector3>& value) {
AtomsUtils::Logger::warning() <<
"LayoutGenerator.setScaleOverride method is deprecated, please use setScaleAttributeCache instead."; }
64 inline void setScaleAttributeCache(
const BehaviourModuleAttributeCache<AtomsCore::Vector3>& scaleAttributeCache) { m_scaleAttributeCache = scaleAttributeCache; }
66 inline const char*
typeName()
override {
return "meshScatter"; };
74 double m_defaultRadius;
76 double m_eraseThreshold;
80 AtomsMath::Vector3 m_randomDirection;
81 AtomsMath::Vector3 m_clampVector;
82 AtomsMath::Matrix m_meshMatrix;
84 unsigned int m_randomSeed;
86 bool m_randomizeRadius;
91 bool m_useClampVector;
92 std::string m_navMeshName;
94 AtomsCore::Rand48 m_random;
96 std::vector<AtomsCore::Vector3> m_otherSamples;
Definition: DynamicLayoutGenerator.h:15
Definition: MeshScatterLayoutGenerator.h:18
virtual std::vector< Atoms::AgentInitData > generate(double time)
Generate a vector of agent init data.
const char * typeName() override
Get the type name for this generator.
Definition: MeshScatterLayoutGenerator.h:66
Image class.
Definition: Image.h:22
static LogProxy warning()
Get logger proxy warning.
Mesh class.
Definition: Mesh.h:30
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
Atoms namespace.
Definition: Agent.h:29