|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.threed.jpct.Portals
Portals handles the sectors and portals used for portal rendering. Portal rendering is a visibility algorithm (mostly) for indoor scenes. The basic idea is to connect different sectors (defined by a sector-number) with portals (n-polygons). Portal rendering can speed up rendering significantly, because it reduces overdraw by a very large amount. To get the idea better, one may have a look at some of the more detailed papers about this topic out there. Portals is always part of the World object.
World.getPortals()
,
Serialized FormField Summary | |
static int |
PORTAL_NOTDEFINITE
The portal is not definite (can be the case if more than one portal from a sector into other sectors is visible). |
static int |
SECTOR_UNDEFINED
The sector is undefined (this is sector 0). |
Method Summary | |
void |
addPortalCoord(float x,
float y,
float z)
Adds a new vertex to the portal. |
void |
addPortalCoord(SimpleVector vert)
Adds a new vertex to the portal. |
void |
completePortal()
Signals that all vertices have been added to the portal and that the attributes have been set. |
void |
setAABoundingBox(int sector,
float minx,
float miny,
float minz,
float maxx,
float maxy,
float maxz)
Sets the axis-aligned bounding box for a sector. |
void |
setPortalAttributes(int from,
int to)
Sets the attributes of the portal. |
void |
startNewPortal()
Starts a new portal definition. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PORTAL_NOTDEFINITE
public static final int SECTOR_UNDEFINED
Method Detail |
public void startNewPortal()
public void addPortalCoord(SimpleVector vert)
vert
- the new portal vertexpublic void addPortalCoord(float x, float y, float z)
x
- the x component of the new portal vertexy
- the y component of the new portal vertexz
- the z component of the new portal vertexpublic void setPortalAttributes(int from, int to)
from
- the "from-sector"to
- the "to-sector"public void completePortal()
public void setAABoundingBox(int sector, float minx, float miny, float minz, float maxx, float maxy, float maxz)
sector
- the sector's number (anything greater than zero)minx
- the minimum x-value of the bounding boxminy
- the minimum y-value of the bounding boxminz
- the minimum z-value of the bounding boxmaxx
- the maximum x-value of the bounding boxmaxy
- the maximum y-value of the bounding boxmaxz
- the maximum z-value of the bounding boxObject3D.build()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |