public class BoundingBoxMap
extends java.lang.Object
BoundingBox
es keyed on integer
IDs. It provides methods for adding and removing them as well as getters for
minimum and maximum x, y, and z values across all stored BoundingBoxes.Constructor and Description |
---|
BoundingBoxMap()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
com.jme3.bounding.BoundingBox |
getBoundingBox()
Gets a new
BoundingBox that contains all BoundingBoxes stored in
this BoundingBoxMap . |
com.jme3.math.Vector3f |
getMax()
Gets the maximum X, Y, and Z values in this
BoundingBoxMap . |
java.lang.Float |
getMaxX()
Gets the largest (most positive) X value in this
BoundingBoxMap . |
java.lang.Float |
getMaxY()
Gets the largest (most positive) Y value in this
BoundingBoxMap . |
java.lang.Float |
getMaxZ()
Gets the largest (most positive) Z value in this
BoundingBoxMap . |
com.jme3.math.Vector3f |
getMin()
Gets the minimum X, Y, and Z values in this
BoundingBoxMap . |
java.lang.Float |
getMinX()
Gets the smallest (most negative) X value in this
BoundingBoxMap . |
java.lang.Float |
getMinY()
Gets the smallest (most negative) Y value in this
BoundingBoxMap . |
java.lang.Float |
getMinZ()
Gets the smallest (most negative) Z value in this
BoundingBoxMap . |
boolean |
put(int id,
com.jme3.bounding.BoundingBox box)
Adds a
BoundingBox associated with an ID to this
BoundingBoxMap . |
boolean |
putAll(java.util.List<java.lang.Integer> ids,
java.util.List<com.jme3.bounding.BoundingBox> boxes)
Adds multiple
BoundingBox es associated with IDs to this
BoundingBoxMap . |
boolean |
remove(int id)
Removes the
BoundingBox associated with an ID from this
BoundingBoxMap . |
boolean |
removeAll(java.util.List<java.lang.Integer> ids)
Removes multiple
BoundingBox es associated with IDs from this
BoundingBoxMap . |
public BoundingBoxMap()
public boolean remove(int id)
BoundingBox
associated with an ID from this
BoundingBoxMap
.id
- The ID of the BoundingBox to remove.public boolean removeAll(java.util.List<java.lang.Integer> ids)
BoundingBox
es associated with IDs from this
BoundingBoxMap
.ids
- A List of IDs of the BoundingBoxes to remove.public boolean put(int id, com.jme3.bounding.BoundingBox box)
BoundingBox
associated with an ID to this
BoundingBoxMap
.id
- The ID of the BoundingBox to remove.public boolean putAll(java.util.List<java.lang.Integer> ids, java.util.List<com.jme3.bounding.BoundingBox> boxes)
BoundingBox
es associated with IDs to this
BoundingBoxMap
.ids
- A List of IDs of the BoundingBoxes to remove.public java.lang.Float getMinX()
BoundingBoxMap
.BoundingBox
es, or null
if there are no boxes.public java.lang.Float getMinY()
BoundingBoxMap
.BoundingBox
es, or null
if there are no boxes.public java.lang.Float getMinZ()
BoundingBoxMap
.BoundingBox
es, or null
if there are no boxes.public java.lang.Float getMaxX()
BoundingBoxMap
.BoundingBox
es, or null
if there are no boxes.public java.lang.Float getMaxY()
BoundingBoxMap
.BoundingBox
es, or null
if there are no boxes.public java.lang.Float getMaxZ()
BoundingBoxMap
.BoundingBox
es, or null
if there are no boxes.public com.jme3.math.Vector3f getMin()
BoundingBoxMap
.Vector3f
containing the minimum X, Y, and Z values of
all stored BoundingBox
es, or null if there are no boxes.public com.jme3.math.Vector3f getMax()
BoundingBoxMap
.Vector3f
containing the maximum X, Y, and Z values of
all stored BoundingBox
es, or null if there are no boxes.public com.jme3.bounding.BoundingBox getBoundingBox()
BoundingBox
that contains all BoundingBoxes stored in
this BoundingBoxMap
. It is defined by the minimum and maximum X,
Y, and Z values and is oriented along the three default axes.