Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BSP ¶
type BSP struct { EntityInfo string Textures []*Texture Planes []*Plane Nodes []*Node Leaves []*Leaf LeafFaces []*LeafFace // LeafBrushes stores lists of brush indices, with one list per leaf. There are a total of length / sizeof(leafbrush) records in the lump, where length is the size of the lump itself, as specified in the lump directory. LeafBrushes []*LeafBrush // Models describes rigid groups of world geometry. The first model correponds to the base portion of the map while the remaining models correspond to movable portions of the map, such as the map's doors, platforms, and buttons. Each model has a list of faces and list of brushes; these are especially important for the movable parts of the map, which (unlike the base portion of the map) do not have BSP trees associated with them. There are a total of length / sizeof(models) records in the lump, where length is the size of the lump itself, as specified in the lump directory. Models []*Model // Brushes stores a set of brushes, which are in turn used for collision detection. Each brush describes a convex volume as defined by its surrounding surfaces. There are a total of length / sizeof(brushes) records in the lump, where length is the size of the lump itself, as specified in the lump directory. Brushes []*Brush // BrushSides stores descriptions of brush bounding surfaces. There are a total of length / sizeof(brushsides) records in the lump, where length is the size of the lump itself, as specified in the lump directory. BrushSides []*BrushSide // Vertexes stores lists of vertex offsets, used to describe generalized triangle meshes. There are a total of length / sizeof(meshvert) records in the lump, where length is the size of the lump itself, as specified in the lump directory. Vertexes []*Vertex // MeshVertexOffsets stores lists of vertex offsets, used to describe generalized triangle meshes. There are a total of length / sizeof(meshvert) records in the lump, where length is the size of the lump itself, as specified in the lump directory. MeshVertexOffsets []*MeshVertexOffset // Effects stores references to volumetric shaders (typically fog) which affect the rendering of a particular group of faces. There are a total of length / sizeof(effect) records in the lump, where length is the size of the lump itself, as specified in the lump directory. Effects []*Effect // Faces stores information used to render the surfaces of the map. There are a total of length / sizeof(faces) records in the lump, where length is the size of the lump itself, as specified in the lump directory. Faces []*Face // Lightmaps stores the light map textures used make surface lighting look more realistic. There are a total of length / sizeof(lightmap) records in the lump, where length is the size of the lump itself, as specified in the lump directory. Lightmaps []*Lightmap // LightVolumes stores a uniform grid of lighting information used to illuminate non-map objects. There are a total of length / sizeof(lightvol) records in the lump, where length is the size of the lump itself, as specified in the lump directory. LightVolumes []*LightVolume // VisInfo stores bit vectors that provide cluster-to-cluster visibility information. There is exactly one visdata record, with a length equal to that specified in the lump directory. VisInfo []*VisData // contains filtered or unexported fields }
BSP is a binary space partition
type Face ¶
type Face struct { TextureID int32 EffectID int32 //1=polygon, 2=patch, 3=mesh, 4=billboard TypeID int32 // index of first vertex VertexID int32 VertexCount int32 MeshVertexID int32 MeshVertexCount int32 LightMapID int32 LightMapStart [2]int32 LightMapSize [2]int32 LightMapOrigin math32.Vector3 LightMapVectors [2]math32.Vector3 Normal math32.Vector3 Size math32.Vector2 }
type Leaf ¶
Leaf of the map's BSP tree. Each leaf is a convex region that contains, among other things, a cluster index (for determining the other leafs potentially visible from within the leaf), a list of faces (for rendering), and a list of brushes (for collision detection). There are a total of length / sizeof(leaf) records in the lump, where length is the size of the lump itself, as specified in the lump directory.
type LeafFace ¶
type LeafFace struct {
FaceID int32
}
LeafFace stores leaf references, with one list per leaf. There are a total of length / sizeof(leafface) records in the lump, where length is the size of the lump itself, as specified in the lump directory. leafface
type LightVolume ¶
type MeshVertexOffset ¶
type MeshVertexOffset struct {
OffsetID int32
}
type Model ¶
type Model struct { // Bounding box min coord. Mins [3]int32 // Bounding box max coord. Maxs [3]int32 // First face for model. FaceID int32 FaceCount int32 BrushID int32 BrushCount int32 }
Model describes rigid groups of world geometry. The first model correponds to the base portion of the map while the remaining models correspond to movable portions of the map, such as the map's doors, platforms, and buttons. Each model has a list of faces and list of brushes; these are especially important for the movable parts of the map, which (unlike the base portion of the map) do not have BSP trees associated with them. There are a total of length / sizeof(models) records in the lump, where length is the size of the lump itself, as specified in the lump directory.
type Node ¶
Node in the map's BSP tree. The BSP tree is used primarily as a spatial subdivision scheme, dividing the world into convex regions called leafs. The first node in the lump is the tree's root node. There are a total of length / sizeof(node) records in the lump, where length is the size of the lump itself, as specified in the lump directory.
type Plane ¶
Plane referenced by nodes and brushsides. There are a total of length / sizeof(plane) records in the lump, where length is the size of the lump itself, as specified in the lump directory.
type Texture ¶
Texture stores information about surfaces and volumes, which are in turn associated with faces, brushes, and brushsides. There are a total of length / sizeof(texture) records in the lump, where length is the size of the lump itself, as specified in the lump directory.