|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.tud.dvs1.mmpgp2p.RegionTree
public class RegionTree
Diese Klasse verwaltet die Welt in einem Baum. Es wird effizienter Suchzugriff auf (x,y) Koordinaten gewährleistet.
Constructor Summary | |
---|---|
RegionTree(GameWorldInfo i,
RCPool initial)
|
Method Summary | |
---|---|
RCPool |
findRC(java.lang.Integer x,
java.lang.Integer y)
|
RCPool |
findRC(int x,
int y)
Finde die RegionControllerInfo zu der angegebenen Koordinate. |
RCPool[] |
getAllRCPools()
|
RCPool |
mergeRegion(GameWorld g)
Die angegebene Region soll mit passenden Regionen vereinigt werden. |
int |
size()
Wieviel Regionen gibt es? |
void |
splitNode(char orientation,
int x,
int y,
RCPool rc1,
RCPool rc2)
Ein Knoten (Blatt) splitten und zwei neue Knoten dranhängen. |
java.lang.String |
toHtmlDiv(int zoom)
Die Welt und ihre Regionen-Aufteilung als einen HTML-String zurückgeben, der das ganze grafisch illustriert |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RegionTree(GameWorldInfo i, RCPool initial)
Method Detail |
---|
public RCPool findRC(int x, int y) throws MmpgP2PException
MmpgP2PException
public RCPool findRC(java.lang.Integer x, java.lang.Integer y) throws MmpgP2PException
MmpgP2PException
public void splitNode(char orientation, int x, int y, RCPool rc1, RCPool rc2) throws MmpgP2PException
MmpgP2PException
public RCPool mergeRegion(GameWorld g) throws MmpgP2PException
MmpgP2PException
public RCPool[] getAllRCPools()
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toHtmlDiv(int zoom)
zoom
- Die Größe des DIVs in 1/1000 Pixel. D.H. bei zoom 1000
wäre ein Spielfeld mit Größe 2000 auch 2000 Pixel groß
dargestellt. Sinnvolle werte sind hier 1000/tilesize.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |