89 float x = 0.f,
y = 0.f;
126 void resizeField(
int width,
int height,
float cellSize,
float originX,
float originY);
128 void setBlocked(
int cx,
int cy,
bool blocked);
130 void setCellCost(
int cx,
int cy,
float cost);
132 float getCellCost(
int cx,
int cy)
const;
134 void buildFlowField(
int gx,
int gy);
136 void addFlowGoal(
int gx,
int gy);
138 void clearFlowGoals();
142 bool isFieldBuilt()
const;
144 bool isReachable(
int cx,
int cy)
const;
146 int getFieldWidth()
const;
148 int getFieldHeight()
const;
150 float getCellSize()
const;
152 float getFieldOriginX()
const;
154 float getFieldOriginY()
const;
159 float costAtWorld(
float wx,
float wy)
const;
181 int addNamedAgent(
const std::string &stableId,
float x,
float y,
float heading,
float radius);
186 bool hasNamedAgent(
const std::string &stableId)
const;
191 int getNamedAgentIndex(
const std::string &stableId)
const;
196 std::string getAgentStableId(
int index)
const;
201 bool removeNamedAgent(
const std::string &stableId);
203 bool removeAgent(
int id);
207 int getAgentCount()
const;
209 void setMaxAgents(
int maxAgents);
211 int getMaxAgents()
const;
214 bool setAgentAction(
int id,
const std::string &
action);
216 std::string getAgentAction(
int id)
const;
218 bool setAgentTarget(
int id,
float tx,
float ty);
220 bool clearAgentTarget(
int id);
222 bool setAgentSpeed(
int id,
float speed);
224 bool setAgentAccel(
int id,
float accel);
226 bool setAgentTurnRate(
int id,
float radPerSec);
228 bool setAgentRadius(
int id,
float radius);
230 bool setAgentData(
int id,
int data);
232 int getAgentData(
int id)
const;
237 int getAgentAvoidancePriority(
int id)
const;
277 bool setAgentPosition(
int id,
float x,
float y);
283 void setDefaultSpeed(
float speed);
285 void setDefaultRadius(
float radius);
287 void setDefaultTurnRate(
float radPerSec);
289 void setArriveRadius(
float radius);
291 void setSeparationRadius(
float radius);
293 void setPerceptionRadius(
float radius);
295 void setSeparationWeight(
float weight);
297 void setAlignmentWeight(
float weight);
299 void setCohesionWeight(
float weight);
301 void setWanderWeight(
float weight);
303 void setGoalWeight(
float weight);
305 void setResolveOverlaps(
bool enable);
307 void setClampToField(
bool enable);
358 std::unique_ptr<Impl> impl_;
eve::resource::CostSpec cost
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
TerrainThermalSettings settings
EVENGINE_API_FOUNDATION public API.
Move-only operation result carrying either a value or Status.
群体行为模块:连续流场寻路 + 海量单位移动/转向/行动 + Boids 鸟群。
SpawnPolicy
Placement policy for an atomic spawn batch.
Independent local interaction policy, copied into Crowd storage.
float pushability
Relative contact mobility in [0,1]; zero cannot be pushed by agents.
int mask
Both agents must accept the other's layer for interaction.
int layer
Non-negative membership bit mask; zero disables agent interaction.
bool holdPosition
Suppress locomotion and agent pushes; terrain constraints still apply.
单个单位的状态快照(脚本 getAgentState 返回值)。 action: 0=idle, 1=flow, 2=seek, 3=boids。
int avoidancePriority
Higher-priority agents yield less during overlap resolution.
Optional bounded velocity sampling for RTS local avoidance.
bool enabled
Opt in independently of legacy Boids steering.
float horizon
Positive prediction seconds, at most ten.
float margin
Non-negative extra pair clearance in world units.
int maxNeighbors
Nearest interacting neighbors considered, in [1,128].
Private crowd runtime storage. @cost Linear in agent count for SOA vectors and transient broadphase/a...
流场采样结果(脚本 flowAtWorld / flowAtCell 返回值)。
Caller-built transaction; positive budgets bound search and relaxation. @cost Linear in requested age...
int maxChecks
Combined candidate/neighbor work budget, at most ten million.
float searchSpacing
NearestFree samples concentric rings at this spacing.
float maxDistance
Maximum relocation from each requested/original position.
std::vector< SpawnRequest > agents
int maxPasses
Contact relaxation limit, at most 256.
Owning placement result, independent of compact slots and subsequent removal.
Observations from a committed spawn transaction. @cost Linear in created placement count; returned by...
std::vector< SpawnPlacement > created
One named agent to create; all fields are owned values.
AgentInteraction interaction
Owning observations of one completed advance; simulation-thread only.
int avoidanceTruncations
Agent/substep queries exceeding the configured neighbor limit.
int unresolvedWalls
Final agents violating terrain or field bounds.
std::int64_t avoidanceChecks
Candidate-neighbor predictions across all substeps.
int unresolvedContacts
Final overlapping pairs deeper than 0.001 world units.
float maxPenetration
Largest remaining pair penetration in world units.
int substeps
Number of bounded integration intervals consumed.