|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.bsp2D.RoomDef
The RoomDef class represents a convex room with walls, a floor, and a ceiling. The floor may be above the ceiling, in which case the RoomDef is a "pillar" or "block" structure, rather than a "room". RoomDefs are used as a shortcut to create the actual BSPPolygons used in the 2D BSP tree.
Constructor Summary | |
RoomDef()
Creates a new RoomDef with an ambient light intensity of 0.5. |
|
RoomDef(float ambientLightIntensity)
Creates a new RoomDef with the specified ambient light intensity. |
Method Summary | |
void |
addVertex(float x,
float z,
float bottom,
float top,
Texture texture)
Adds a new wall vertex at the specified (x,z) location, with the specified texture, bottom location, and top location. |
void |
addVertex(float x,
float z,
float bottom,
float top,
Texture texture,
Rectangle3D texBounds)
Adds a new wall vertex at the specified (x,z) location, with the specified texture, texture bounds, bottom location, and top location. |
void |
addVertex(float x,
float z,
Texture texture)
Adds a new wall vertex at the specified (x,z) location, with the specified texture. |
java.util.List |
createHorizontalPolygons()
Creates and returns a list of BSPPolygons that represent the horizontal floor and ceiling of this room. |
java.util.List |
createPolygons()
Creates and returns a list of BSPPolygons that represent the walls, floor, and ceiling of this room. |
java.util.List |
createVerticalPolygons()
Creates and returns a list of BSPPolygons that represent the vertical walls of this room. |
void |
setCeil(float height,
Texture texture)
Sets the ceiling height and ceiling texture of this room. |
void |
setCeil(float height,
Texture texture,
Rectangle3D texBounds)
Sets the ceiling height, ceiling texture, and ceiling texture bounds of this room. |
void |
setFloor(float height,
Texture texture)
Sets the floor height and floor texture of this room. |
void |
setFloor(float height,
Texture texture,
Rectangle3D texBounds)
Sets the floor height, floor texture, and floor texture bounds of this room. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RoomDef()
public RoomDef(float ambientLightIntensity)
Method Detail |
public void addVertex(float x, float z, Texture texture)
public void addVertex(float x, float z, float bottom, float top, Texture texture)
public void addVertex(float x, float z, float bottom, float top, Texture texture, Rectangle3D texBounds)
public void setFloor(float height, Texture texture)
public void setFloor(float height, Texture texture, Rectangle3D texBounds)
public void setCeil(float height, Texture texture)
public void setCeil(float height, Texture texture, Rectangle3D texBounds)
public java.util.List createPolygons()
public java.util.List createVerticalPolygons()
public java.util.List createHorizontalPolygons()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |