【
#include"Octree。h"
#include"MinHeap。h"
void*CaptureLowestEnergyEntity(Octree*octree,Vector3selfPosition,floatradius){
MinHeapresultHeap;
MinHeapInit(&resultHeap,100);
AABBsearchBox=buildAABBFromSphere(selfPosition,radius);
OctreeSearch(octree,searchBox,&resultHeap);
void*lowestEnergyEntity=MinHeapExtractMin(&resultHeap);
returnlowestEnergyEntity;