DStruct Interface
All BSP structures implement theDStruct interface, which provides serialization capabilities.
Methods
getSize()- Returns the size of the structure in bytesread(DataReader in)- Reads the structure from a data streamwrite(DataWriter out)- Writes the structure to a data stream
BspData
Central data structure containing all parsed BSP lumps as Java collections.Fields
Core Structures
DPlane
Represents a plane equation in 3D space.normal- Unit normal vector perpendicular to the planedist- Distance from world origin along the normaltype- Axial plane type (0-5 for axis-aligned, 6 for arbitrary)
DVertex
A 3D vertex position.DEdge
Defines an edge between two vertices.v[0]- First vertex indexv[1]- Second vertex index
DFace
Defines a face (polygon) in the BSP geometry.Brush Structures
DBrush
Defines a convex brush volume.BrushFlag
Enumeration of brush contents flags.Model Structures
DModel
Defines a brush model (world or entity-attached).mins/maxs- Axis-aligned bounding boxorigin- Origin point of the modelheadnode- Root node of this model’s BSP treefstface- Index of first face in the faces lumpnumface- Number of consecutive faces belonging to this model
Texture Structures
DTexInfo
Defines texture mapping for a face.SurfaceFlag
Enumeration of surface flags.Displacement Structures
DDispInfo
Defines a displacement surface (terrain).Overlay Structures
DOverlay
Defines a decal overlay on world geometry.Example Usage
Reading Face Data
Working with Brushes
Related
Entities
Entity classes and key-value handling
Lumps
BSP lump types and data structures