map Module

Source code: map.py

vgio.quake.map.dumps(entities)

Serialize Entity objects to a formatted string.

Parameters

entities – A sequence of Entity objects.

Returns

A formatted string containing a Map document.

vgio.quake.map.loads(s)

Deserializes string s into Entity objects

Parameters

s – A string containing a Map document.

Returns

A sequence of Entity objects.

Raises

ParseError – If fails to parse given document

Entity Class

class vgio.quake.map.Entity

Class for representing Map Entity data

Note

Entity properties will be set as attributes.

brushes

A sequence of Brush objects.

Brush Class

class vgio.quake.map.Brush

Class for representing Brush data

planes

A sequence of Plane objects

Plane Class

class vgio.quake.map.Plane

Class for representing planes(faces) of a Brush.

points

A triple of XYZ three-tuples representing three non-collinear points contained in the plane.

texture_name

Name of the Miptexture

offset

The texture offset represented as an XY two-tuple.

rotation

The texture rotation angle in degrees.

scale

The texture scale represented as an XY two-tuple.