|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Space
org.odejava.QuadTreeSpace
public class QuadTreeSpace
A quad-tree based space for collision detection. QuadTrees are located at a fixed point in space and cannot change after being created.
Created 16.12.2003 (dd.mm.yyyy)
| Field Summary | |
|---|---|
protected float[] |
center
The center of the space |
protected int |
depth
The depth of the quad tree to generate for this space. |
protected float[] |
extents
The extents of the space |
| Fields inherited from class org.odejava.Space |
|---|
deleted, geomList, geomMap, parentId, spaceId, SPACEID_ZERO |
| Constructor Summary | |
|---|---|
QuadTreeSpace(float[] center,
float[] extents,
int depth)
Create a QuadTree space that does not have a parent. |
|
QuadTreeSpace(Space parent,
float[] center,
float[] extents,
int depth)
Create a QuadTree space that may optionally belong to a parent space. |
|
| Method Summary | |
|---|---|
void |
getCenter(float[] result)
Get the center of the space and copy it into the user-provided array. |
float |
getDepth()
Get the depth of the quadtree. |
void |
getExtents(float[] result)
Get the extents of the space and copy it into the user-provided array. |
| Methods inherited from class org.odejava.Space |
|---|
add, addBodyGeoms, addGeom, containsGeom, delete, getChildCleanupMode, getGeom, getGeomMap, getGeoms, getId, getID, getNativeAddr, getSpaceFromNativeAddr, getUserData, isEnabled, remove, renameGeom, setChildCleanupMode, setEnabled, setUserData, updateNativeAddr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float[] center
protected float[] extents
protected int depth
| Constructor Detail |
|---|
public QuadTreeSpace(float[] center,
float[] extents,
int depth)
center - The location of the space's center in world coordsextents - The size of the space's extents in world coordsdepth - The number of subdivisions of the quad tree to make
public QuadTreeSpace(Space parent,
float[] center,
float[] extents,
int depth)
center - The location of the space's center in world coordsextents - The size of the space's extents in world coordsdepth - The number of subdivisions of the quad tree to makeparent - A reference to the parent space, or null| Method Detail |
|---|
public void getCenter(float[] result)
result - An array to copy the center intopublic void getExtents(float[] result)
result - An array to copy the center intopublic float getDepth()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||