Klamp't  0.8.1
Public Member Functions | Public Attributes | List of all members
XmlWorld Class Reference

Public Member Functions

bool Load (const string &fn)
 
bool Load (TiXmlElement *e, string path=string())
 
bool GetWorld (RobotWorld &world)
 
TiXmlElement * GetElement (const string &name)
 
TiXmlElement * GetElement (const string &name, int index)
 
TiXmlElement * GetRobot (int index)
 
TiXmlElement * GetRigidObject (int index)
 
TiXmlElement * GetTerrain (int index)
 
bool Save (RobotWorld &world, const string &fn, string itempath=string())
 

Public Attributes

TiXmlDocument doc
 
TiXmlElement * elem
 
string path
 
Vector3 goals [10]
 
int goalCount
 

Member Function Documentation

bool XmlWorld::Save ( RobotWorld world,
const string &  fn,
string  itempath = string() 
)

The save function saves an XML file to fn and saves all robots, rigid objects, and terrains to .rob, .obj, and .env files to the folder [itempath]/. If itempath is not provided, then the path [path]/[worldfile]/ will be used, where fn is of the form "[path]/[worldfile].xml"


The documentation for this class was generated from the following file: