Class BSPTree
java.lang.Object
net.mtrop.doom.bsp.BSPTree
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a node to this map.voidaddSegment(BSPSegment segment) Adds a segment to this map.voidaddSubsector(BSPSubsector subsector) Adds a subsector to this map.getNode(int i) Gets the node at a specific index.intgetNodes()getSegment(int i) Gets the segment at a specific index.intgetSubsector(int i) Gets the subsector at a specific index.intvoidReplaces the list of nodes in the map.voidsetSegments(Iterable<BSPSegment> segments) Replaces the list of segments in the map.voidsetSubsectors(Iterable<BSPSubsector> subsectors) Replaces the list of subsectors in the map.
-
Constructor Details
-
BSPTree
public BSPTree()
-
-
Method Details
-
getSegments
- Returns:
- the underlying list of segments.
-
setSegments
Replaces the list of segments in the map. Input objects are copied to the underlying list.- Parameters:
segments- the new list of segments.
-
addSegment
Adds a segment to this map.- Parameters:
segment- the segment to add.
-
getSegmentCount
public int getSegmentCount()- Returns:
- the amount of segments in this map.
-
getSegment
Gets the segment at a specific index.- Parameters:
i- the desired index.- Returns:
- the segment at the index, or null if the index is out of range.
-
getSubsectors
- Returns:
- the underlying list of subsectors.
-
setSubsectors
Replaces the list of subsectors in the map. Input objects are copied to the underlying list.- Parameters:
subsectors- the new list of subsectors.
-
addSubsector
Adds a subsector to this map.- Parameters:
subsector- the subsector to add.
-
getSubsectorCount
public int getSubsectorCount()- Returns:
- the amount of subsectors in this map.
-
getSubsector
Gets the subsector at a specific index.- Parameters:
i- the desired index.- Returns:
- the subsector at the index, or null if the index is out of range.
-
getNodes
-
setNodes
-
addNode
-
getNodeCount
public int getNodeCount()- Returns:
- the amount of nodes in this map.
-
getNode
Gets the node at a specific index.- Parameters:
i- the desired index.- Returns:
- the node at the index, or null if the index is out of range.
-