AABB
AlignmentBehavior
ArriveBehavior
AStar
BFS
BoundingSphere
BVH
BVHNode
Cell
CellSpacePartitioning
CohesionBehavior
CompositeGoal
ConvexHull
Corridor
CostTable
DFS
Dijkstra
Edge
EntityManager
EvadeBehavior
EventDispatcher
Behavior
FollowPathBehavior
FuzzyAND
FuzzyCompositeTerm
FuzzyFAIRLY
FuzzyModule
FuzzyOR
FuzzyRule
FuzzySet
FuzzyTerm
FuzzyVariable
FuzzyVERY
GameEntity
Goal
GoalEvaluator
Graph
GraphUtils
HalfEdge
HeuristicPolicyDijkstra
HeuristicPolicyEuclid
HeuristicPolicyEuclidSquared
HeuristicPolicyManhattan
InterposeBehavior
LeftSCurveFuzzySet
LeftShoulderFuzzySet
LineSegment
Logger
MathUtils
Matrix3
Matrix4
MemoryRecord
MemorySystem
MeshGeometry
MessageDispatcher
MovingEntity
NavEdge
NavMesh
NavMeshLoader
NavNode
Node
NormalDistFuzzySet
OBB
ObstacleAvoidanceBehavior
OffsetPursuitBehavior
OnPathBehavior
Path
Plane
Polygon
Polyhedron
PriorityQueue
PursuitBehavior
Quaternion
Ray
RectangleTriggerRegion
Regular
RightSCurveFuzzySet
RightShoulderFuzzySet
SAT
SeekBehavior
SeparationBehavior
SingletonFuzzySet
Smoother
SphericalTriggerRegion
State
StateMachine
SteeringBehavior
SteeringManager
Task
TaskQueue
Telegram
Think
Time
TriangularFuzzySet
Trigger
TriggerRegion
Vector3
Vehicle
Version
WanderBehavior

removeEntityFromPartition

该方法用于从单元空间分割数据结构中移除实体。

参数

  • entity:要移除的实体对象。

示例

// 创建一个单元空间分割对象
var partition = new CellSpacePartitioning();

// 创建一个实体对象
var entity = {id: 1, position: {x: 100, y: 100}, radius: 10};

// 将实体添加到单元空间分割对象
partition.addEntityToPartition(entity);

// 移除实体
partition.removeEntityFromPartition(entity);

注意事项

  • 如果要从单元空间分割数据结构中移除实体,请使用该方法。
  • 使用该方法将从单元空间分割数据结构中删除与实体相关联的所有信息,包括其所在的单元格、所在的组、所在的空间区域等。
  • 如果尝试从单元空间分割数据结构中删除不存在的实体,则该方法不会执行任何操作。

参考文献