OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::RuleGlobe Class Reference

Represents the contents of the Geoscape globe, such as world polygons, polylines, etc. More...

#include <RuleGlobe.h>

Public Member Functions

 RuleGlobe ()
 Creates a blank globe ruleset. More...
 
 ~RuleGlobe ()
 Cleans up the globe ruleset.
 
void load (const YAML::Node &node)
 Loads the globe from YAML. More...
 
std::list< Polygon * > * getPolygons ()
 Gets the list of world polygons. More...
 
std::list< Polyline * > * getPolylines ()
 Gets the list of world polylines. More...
 
void loadDat (const std::string &filename)
 Loads a set of polygons from a DAT file. More...
 
TexturegetTexture (int id) const
 Gets a specific world texture. More...
 
std::vector< std::string > getTerrains (const std::string &deployment) const
 Gets all the terrains for a specific deployment. More...
 

Detailed Description

Represents the contents of the Geoscape globe, such as world polygons, polylines, etc.

See also
Globe

Constructor & Destructor Documentation

◆ RuleGlobe()

OpenXcom::RuleGlobe::RuleGlobe ( )

Creates a blank globe ruleset.

Creates a blank ruleset for globe contents.

Member Function Documentation

◆ getPolygons()

std::list< Polygon * > * OpenXcom::RuleGlobe::getPolygons ( )

Gets the list of world polygons.

Returns the list of polygons in the globe.

Returns
Pointer to the list of polygons.

◆ getPolylines()

std::list< Polyline * > * OpenXcom::RuleGlobe::getPolylines ( )

Gets the list of world polylines.

Returns the list of polylines in the globe.

Returns
Pointer to the list of polylines.

◆ getTerrains()

std::vector< std::string > OpenXcom::RuleGlobe::getTerrains ( const std::string &  deployment) const

Gets all the terrains for a specific deployment.

Returns a list of all globe terrains associated with this deployment.

Parameters
deploymentDeployment name.
Returns
List of terrains.

◆ getTexture()

Texture * OpenXcom::RuleGlobe::getTexture ( int  id) const

Gets a specific world texture.

Returns the rules for the specified texture.

Parameters
idTexture ID.
Returns
Rules for the texture.

◆ load()

void OpenXcom::RuleGlobe::load ( const YAML::Node &  node)

Loads the globe from YAML.

Loads the globe from a YAML file.

Parameters
nodeYAML node.

◆ loadDat()

void OpenXcom::RuleGlobe::loadDat ( const std::string &  filename)

Loads a set of polygons from a DAT file.

Loads a series of map polar coordinates in X-Com format, converts them and stores them in a set of polygons.

Parameters
filenameFilename of the DAT file.
See also
http://www.ufopaedia.org/index.php?title=WORLD.DAT

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