类 | |
| struct | NeighborAccum |
| NeighborAccum public API. 更多... | |
函数 | |
| float | compactWeight (float dist, float radius) |
| Compact-support radial weight w(q)=(1-q)^2 for q in [0,1). | |
| bool | isInFieldOfView (const glm::vec3 &forward, const glm::vec3 &toNeighbor, float fovDegrees) |
| True when neighbor direction is inside a forward cone (degrees). | |
| NeighborAccum | gatherNeighbors (std::span< const AgentState > agents, int selfIndex, const glm::vec3 &forward, float sepR, float cohR, float aliR, float fovDeg, int maxSamples) |
| Gather neighborhood forces with compact weights and FOV / sample caps. | |
| glm::vec3 | markerForce (const glm::vec3 &pos, const std::vector< EnvironmentMarker > &markers, bool attract) |
| Marker force. | |
| void | integrateBoid (AgentState &out, const AgentState &in, glm::vec3 accel, float dt, float maxAccel, float maxSpeed, float maxHTurn, float maxVTurn) |
| Clamp acceleration then integrate semi-implicit Euler with turn-rate limits. | |
函数说明
◆ compactWeight()
|
inline |
Compact-support radial weight w(q)=(1-q)^2 for q in [0,1).
在文件 BoidsCommon.h 第 15 行定义.
被这些函数引用 gatherNeighbors(), markerForce() , 以及 eve::gpuagents::LifeNetworkSolver::step().
◆ gatherNeighbors()
|
inline |
Gather neighborhood forces with compact weights and FOV / sample caps.
在文件 BoidsCommon.h 第 46 行定义.
引用了 eve::gpuagents::detail::NeighborAccum::alignmentVel, eve::gpuagents::detail::NeighborAccum::aliWeightSum, eve::gpuagents::detail::NeighborAccum::cohesionPos, eve::gpuagents::detail::NeighborAccum::cohWeightSum, compactWeight(), isInFieldOfView(), position, eve::gpuagents::detail::NeighborAccum::samples, eve::gpuagents::detail::NeighborAccum::separation, eve::gpuagents::detail::NeighborAccum::sepWeightSum , 以及 w.
被这些函数引用 eve::gpuagents::BirdSolver::step() , 以及 eve::gpuagents::FishSolver::step().
◆ integrateBoid()
|
inline |
Clamp acceleration then integrate semi-implicit Euler with turn-rate limits.
在文件 BoidsCommon.h 第 90 行定义.
引用了 eve::gpuagents::AgentState::age, eve::gpuagents::AgentState::alive, eve::gpuagents::lookRotation(), eve::gpuagents::AgentState::position, eve::gpuagents::AgentState::rotation, t , 以及 eve::gpuagents::AgentState::velocity.
被这些函数引用 eve::gpuagents::FishSolver::step().
◆ isInFieldOfView()
|
inline |
True when neighbor direction is inside a forward cone (degrees).
Dot.
在文件 BoidsCommon.h 第 23 行定义.
被这些函数引用 gatherNeighbors().
◆ markerForce()
|
inline |
Marker force.
F.
在文件 BoidsCommon.h 第 76 行定义.
引用了 compactWeight(), d, f, m, markers, pos , 以及 w.
被这些函数引用 eve::gpuagents::BirdSolver::step() , 以及 eve::gpuagents::FishSolver::step().