From: Joschka B. <jbo...@un...> - 2007-06-10 07:42:00
|
Hi Hedayat, Hedayat Vatankhah wrote: > Hi Hesham, > OK, from now, I'll (hopefully!) add new function(s) to calculate the > AABB2 or AABB3 around an agent to be used instead of a single position > in functions such as ClearPlayers functions. Just some thoughts which might make this task easier: Each agent is linked into the SceneGraph at a position "/usr/scene/AgentAspectX" in the virtual file system of the zeitgeist framework, with X being the ID of the agent. All the nodes of the agent will be below this node. The actual AgentAspect of the SoccerBot, e.g. for agent with ID 1, will then be at: /usr/scene/AgentAspect1/spaceman/body The "spaceman" is the collision space that encapsulates all the nodes of the agent, and "body" is the name that we set for the AgentAspect in the soccerbot.rsg file. If you have the AgentAspect of a certain agent and you want to get the bounding box containing all of the agents bodies, it should be sufficient to get to the collision space using GetParent and then using the GetWorldBoundingBox method (implemented in the BaseNode class, from which Space is derived). Just to be sure, you could do a UpdateHierarchy (also from BaseNode) before you get the bounding box, but I think it is not necessary. Cheers, Joschka |