15 class AvoidanceCapConfig
20 AvoidanceCapConfig() { SetDefaults(); }
22 bool operator==(
const AvoidanceCapConfig& other)
const;
23 bool operator!=(
const AvoidanceCapConfig& other)
const {
return !operator==(other); }
28 bool m_capAvoidanceAngleChange;
32 bool m_capAvoidanceSpeedChange;
44 class AvoidanceContactSolverConfig
50 AvoidanceContactSolverConfig() { SetDefaults(); }
52 bool operator==(
const AvoidanceContactSolverConfig& other)
const;
53 bool operator!=(
const AvoidanceContactSolverConfig& other)
const {
return !operator==(other); }
57 bool m_enableSoftContactSolver;
61 bool m_enableBypassContactOverTime;
73 class AvoidanceUtilityFunctionConfig
78 AvoidanceUtilityFunctionConfig() { SetDefaults(); }
80 bool operator==(
const AvoidanceUtilityFunctionConfig& other)
const;
81 bool operator!=(
const AvoidanceUtilityFunctionConfig& other)
const {
return !operator==(other); }
115 bool operator!=(
const AvoidanceConfig& other)
const {
return !operator==(other); }
174 KY_INLINE
void AvoidanceCapConfig::SetDefaults()
176 m_capAvoidanceAngleChange =
true;
177 m_capAvoidanceSpeedChange =
false;
178 m_maxAngularVelocityChange = 360.0f;
179 m_maxLinearSpeedChange = 8.0f;
182 KY_INLINE
bool AvoidanceCapConfig::operator==(
const AvoidanceCapConfig& other)
const
184 return m_capAvoidanceAngleChange == other.m_capAvoidanceAngleChange
185 && m_capAvoidanceSpeedChange == other.m_capAvoidanceSpeedChange
186 && m_maxAngularVelocityChange == other.m_maxAngularVelocityChange
187 && m_maxLinearSpeedChange == other.m_maxLinearSpeedChange;
191 KY_INLINE
void AvoidanceUtilityFunctionConfig::SetDefaults()
193 m_avoidanceAngleSpan = 90.0f;
194 m_avoidanceSampleCount = 20;
196 m_avoidanceInfluence = 0.8f;
197 m_desiredVelocityInfluence = 0.15f;
198 m_previousVelocityInfluence = 0.05f;
201 KY_INLINE
bool AvoidanceUtilityFunctionConfig::operator==(
const AvoidanceUtilityFunctionConfig& other)
const
203 return m_avoidanceAngleSpan == other.m_avoidanceAngleSpan
204 && m_avoidanceSampleCount == other.m_avoidanceSampleCount
205 && m_avoidanceInfluence == other.m_avoidanceInfluence
206 && m_desiredVelocityInfluence == other.m_desiredVelocityInfluence
207 && m_previousVelocityInfluence == other.m_previousVelocityInfluence;
211 KY_INLINE
void AvoidanceContactSolverConfig::SetDefaults()
213 m_enableSoftContactSolver =
false;
214 m_enableBypassContactOverTime =
false;
215 m_contactBypassingTimeLimit = 1.0f;
216 m_contactBypassingRatio = 0.9f;
218 KY_INLINE
bool AvoidanceContactSolverConfig::operator==(
const AvoidanceContactSolverConfig& other)
const
220 return m_enableSoftContactSolver == other.m_enableSoftContactSolver
221 && m_enableBypassContactOverTime == other.m_enableBypassContactOverTime
222 && m_contactBypassingTimeLimit == other.m_contactBypassingTimeLimit
223 && m_contactBypassingRatio == other.m_contactBypassingRatio;
227 KY_INLINE
void AvoidanceConfig::SetDefaults()
245 KY_INLINE
bool AvoidanceConfig::operator==(
const AvoidanceConfig& other)
const
Set of parameters used to configure AvoidanceComputer.
Definition: avoidanceconfig.h:106
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
bool m_enableSlowingDown
If set to true, velocity candidates with reduced speed will be considered; else only velocity candida...
Definition: avoidanceconfig.h:124
AvoidanceCapConfig m_capConfig
Cap changes in the avoidance output velocity.
Definition: avoidanceconfig.h:167
KyFloat32 m_waitPassageTimeLimit
If m_enableForcePassage is true, passage will be forced after m_waitPassageTimeLimit seconds...
Definition: avoidanceconfig.h:146
KyFloat32 m_stopWaitTime
If the entity stopped, wait stopWaitTime seconds before moving again.
Definition: avoidanceconfig.h:137
KyFloat32 m_minimalTimeToCollision
If an obstacle may collide another one in m_minimalTimeToCollision seconds, take it into account for ...
Definition: avoidanceconfig.h:157
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
bool m_enableStop
If set to true, null velocity candidate will be considered; else the AvoidanceSolver will never consi...
Definition: avoidanceconfig.h:129
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
KyFloat32 m_safetyDistance
Safety distance around collider to avoid moving too close.
Definition: avoidanceconfig.h:161
AvoidanceContactSolverConfig m_contactSolverConfig
Soft-Physics Contact Solver config.
Definition: avoidanceconfig.h:170
KyFloat32 m_stopCollisionTime
If a collision cannot be avoided in less that stopCollisionTime seconds, the entity will stop...
Definition: avoidanceconfig.h:133
AvoidanceUtilityFunctionConfig m_utilityFunctionConfig
Various parameters of the utility function defining how candidate velocities for avoidance are scored...
Definition: avoidanceconfig.h:164
KyFloat32 m_forcePassageTimeLimit
If m_enableForcePassage is true, passage is forced for at most m_forcePassageTimeLimit seconds only a...
Definition: avoidanceconfig.h:150
bool m_enableForcePassage
If set to true, solutions with collisions are allowed if no other solutions are found after a while...
Definition: avoidanceconfig.h:142
float KyFloat32
float
Definition: types.h:32