Inheritance diagram for Doomwad::GLSeg:

GLSegs are different from normal ones in several ways. While they record starting and ending vertices, these may be normal vertices or GL vertices. Rather than having an offset along a line, the GL BSP process simply creates a new Vertex wherever needed.
Version 3.0 of the GLBSP specs has a new format for GLSegs. Essentially it uses 32 bit integers for some of the fields. The beginning of a version 3 lump is denoted with the marker "gNd3", which is stored in the constant GLSegs::V3_MARKER.
The vertex number is a little more complex. Bit 30 of a 32 bit int, or 15 of a 16 bit int is used to denote a GL vertex. This way the engine knows which vertex resource has the vertex it needs.
Right now there is only one flag defined for segs, the side number. This is identical to normal segs.
Definition at line 128 of file segs.hpp.
Public Member Functions | |
| virtual size_t | getLength (void) const throw () |
| Get the length of an element. | |
| GLSeg (uint32=0, uint32=0, uint16=0, uint16=RIGHT, uint32=0) throw () | |
| Default constructor. | |
| virtual bool | read (const Lump &lump, Lump::size_type i) throw () |
| Read this element from a Lump. | |
| virtual bool | readV1 (const Lump &lump, Lump::size_type i) throw () |
| Read this element from a Lump. | |
| virtual std::string | toString (void) const throw () |
| Convert this element to a string. | |
| virtual bool | write (Lump &lump, Lump::size_type i) const throw () |
| Write this element into a Lump. | |
| virtual bool | writeV1 (Lump &lump, Lump::size_type i) const throw () |
| Write this element into a Lump. | |
| virtual | ~GLSeg (void) throw () |
| Destructor. | |
Public Attributes | |
| uint32 | end |
| End vertex. | |
| uint16 | flags |
| Direction it faces, left or right. | |
| uint16 | linedef |
| Linedef this belongs to, 0xFFFF if none. | |
| uint32 | partner |
| Partnet seg on the other side of the Linedef. | |
| uint32 | start |
| Start vertex. | |
Static Public Attributes | |
| static const uint16 | LEFT |
| Faces left. | |
| static const size_t | LENGTH = 0x00000010 |
| Length of a single record, version 1. | |
| static const size_t | LENGTH_V3 = 0x0000000A |
| Length of a single record, version 3. | |
| static const uint16 | NO_LINEDEF |
| Does not belong to a Linedef. | |
| static const uint16 | RIGHT |
| Faces right. | |
|
||||||||||||||||||||||||
|
Default constructor. Constructs a GLSeg. Arguments are all optional.
|
|
|
Get the length of an element. Each element record type has a length. Some are fixed, in which case this function returns that length. Some records are variable-length, in which case this function returns zero.
Implements Doomwad::WadEntryElement. Definition at line 263 of file segs.cpp. References LENGTH. |
|
||||||||||||
|
Read this element from a Lump. Read one element from a Lump at the specified index.
Implements Doomwad::WadEntryElement. Definition at line 275 of file segs.cpp. References Doomwad::Lump::size(). |
|
||||||||||||
|
Read this element from a Lump. Read one element from a Lump at the specified index.
Definition at line 256 of file segs.cpp. References Doomwad::Lump::size(). |
|
|
Convert this element to a string. The format of the string will vary from class to class, but every subclass must be able to format itself as a string. IMPORTANT: this string representation is not guaranteed to preserve all data. Reading back in is not supported. This function's goal is to make the object's state user-readable, not machine-readable.
Implements Doomwad::WadEntryElement. |
|
||||||||||||
|
Write this element into a Lump. Write one element into a Lump at the specified index.
Implements Doomwad::WadEntryElement. Definition at line 268 of file segs.cpp. References Doomwad::Lump::size(). |
|
||||||||||||
|
Write this element into a Lump. Write one element into a Lump at the specified index.
Definition at line 239 of file segs.cpp. References Doomwad::Lump::size(). |
1.4.0