com.jme3.bounding
クラス BoundingVolume

java.lang.Object
  上位を拡張 com.jme3.bounding.BoundingVolume
すべての実装されたインタフェース:
Collidable, Savable, java.lang.Cloneable
直系の既知のサブクラス:
BoundingBox, BoundingSphere

public abstract class BoundingVolume
extends java.lang.Object
implements Savable, java.lang.Cloneable, Collidable

BoundingVolume defines an interface for dealing with containment of a collection of points.


入れ子のクラスの概要
static class BoundingVolume.Type
           
 
コンストラクタの概要
BoundingVolume()
           
BoundingVolume(Vector3f center)
           
 
メソッドの概要
 BoundingVolume clone()
           
abstract  BoundingVolume clone(BoundingVolume store)
          clone creates a new BoundingVolume object containing the same data as this one.
abstract  void computeFromPoints(java.nio.FloatBuffer points)
          computeFromPoints generates a bounding volume that encompasses a collection of points.
abstract  boolean contains(Vector3f point)
          determines if a given point is contained within this bounding volume.
 float distanceSquaredTo(Vector3f point)
          Find the squared distance from the center of this Bounding Volume to the given point.
 float distanceTo(Vector3f point)
          Find the distance from the center of this Bounding Volume to the given point.
abstract  float distanceToEdge(Vector3f point)
          Find the distance from the nearest edge of this Bounding Volume to the given point.
 Vector3f getCenter()
           
 Vector3f getCenter(Vector3f store)
           
 int getCheckPlane()
          Grabs the checkplane we should check first.
abstract  BoundingVolume.Type getType()
          getType returns the type of bounding volume this is.
abstract  float getVolume()
           
abstract  boolean intersects(BoundingVolume bv)
          determines if this bounding volume and a second given volume are intersecting.
abstract  boolean intersects(Ray ray)
          determines if a ray intersects this bounding volume.
abstract  boolean intersects(Vector3f point)
          Determines if a given point intersects (touches or is inside) this bounding volume.
abstract  boolean intersectsBoundingBox(BoundingBox bb)
          determines if this bounding volume and a given bounding box are intersecting.
abstract  boolean intersectsSphere(BoundingSphere bs)
          determines if this bounding volume and a given bounding sphere are intersecting.
abstract  BoundingVolume merge(BoundingVolume volume)
          merge combines two bounding volumes into a single bounding volume that contains both this bounding volume and the parameter volume.
abstract  BoundingVolume mergeLocal(BoundingVolume volume)
          mergeLocal combines two bounding volumes into a single bounding volume that contains both this bounding volume and the parameter volume.
 void read(JmeImporter e)
           
 void setCenter(Vector3f newCenter)
           
 void setCheckPlane(int value)
          Sets the index of the plane that should be first checked during rendering.
abstract  BoundingVolume transform(Matrix4f trans, BoundingVolume store)
           
 BoundingVolume transform(Transform trans)
          transform alters the location of the bounding volume by a rotation, translation and a scalar.
abstract  BoundingVolume transform(Transform trans, BoundingVolume store)
          transform alters the location of the bounding volume by a rotation, translation and a scalar.
abstract  Plane.Side whichSide(Plane plane)
          whichSide returns the side on which the bounding volume lies on a plane.
 void write(JmeExporter e)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース com.jme3.collision.Collidable から継承されたメソッド
collideWith
 

コンストラクタの詳細

BoundingVolume

public BoundingVolume()

BoundingVolume

public BoundingVolume(Vector3f center)
メソッドの詳細

getCheckPlane

public int getCheckPlane()
Grabs the checkplane we should check first.


setCheckPlane

public final void setCheckPlane(int value)
Sets the index of the plane that should be first checked during rendering.

パラメータ:
value -

getType

public abstract BoundingVolume.Type getType()
getType returns the type of bounding volume this is.


transform

public final BoundingVolume transform(Transform trans)
transform alters the location of the bounding volume by a rotation, translation and a scalar.

パラメータ:
trans - the transform to affect the bound.
戻り値:
the new bounding volume.

transform

public abstract BoundingVolume transform(Transform trans,
                                         BoundingVolume store)
transform alters the location of the bounding volume by a rotation, translation and a scalar.

パラメータ:
trans - the transform to affect the bound.
store - sphere to store result in
戻り値:
the new bounding volume.

transform

public abstract BoundingVolume transform(Matrix4f trans,
                                         BoundingVolume store)

whichSide

public abstract Plane.Side whichSide(Plane plane)
whichSide returns the side on which the bounding volume lies on a plane. Possible values are POSITIVE_SIDE, NEGATIVE_SIDE, and NO_SIDE.

パラメータ:
plane - the plane to check against this bounding volume.
戻り値:
the side on which this bounding volume lies.

computeFromPoints

public abstract void computeFromPoints(java.nio.FloatBuffer points)
computeFromPoints generates a bounding volume that encompasses a collection of points.

パラメータ:
points - the points to contain.

merge

public abstract BoundingVolume merge(BoundingVolume volume)
merge combines two bounding volumes into a single bounding volume that contains both this bounding volume and the parameter volume.

パラメータ:
volume - the volume to combine.
戻り値:
the new merged bounding volume.

mergeLocal

public abstract BoundingVolume mergeLocal(BoundingVolume volume)
mergeLocal combines two bounding volumes into a single bounding volume that contains both this bounding volume and the parameter volume. The result is stored locally.

パラメータ:
volume - the volume to combine.
戻り値:
this

clone

public abstract BoundingVolume clone(BoundingVolume store)
clone creates a new BoundingVolume object containing the same data as this one.

パラメータ:
store - where to store the cloned information. if null or wrong class, a new store is created.
戻り値:
the new BoundingVolume

getCenter

public final Vector3f getCenter()

getCenter

public final Vector3f getCenter(Vector3f store)

setCenter

public final void setCenter(Vector3f newCenter)

distanceTo

public final float distanceTo(Vector3f point)
Find the distance from the center of this Bounding Volume to the given point.

パラメータ:
point - The point to get the distance to
戻り値:
distance

distanceSquaredTo

public final float distanceSquaredTo(Vector3f point)
Find the squared distance from the center of this Bounding Volume to the given point.

パラメータ:
point - The point to get the distance to
戻り値:
distance

distanceToEdge

public abstract float distanceToEdge(Vector3f point)
Find the distance from the nearest edge of this Bounding Volume to the given point.

パラメータ:
point - The point to get the distance to
戻り値:
distance

intersects

public abstract boolean intersects(BoundingVolume bv)
determines if this bounding volume and a second given volume are intersecting. Intersecting being: one volume contains another, one volume overlaps another or one volume touches another.

パラメータ:
bv - the second volume to test against.
戻り値:
true if this volume intersects the given volume.

intersects

public abstract boolean intersects(Ray ray)
determines if a ray intersects this bounding volume.

パラメータ:
ray - the ray to test.
戻り値:
true if this volume is intersected by a given ray.

intersectsSphere

public abstract boolean intersectsSphere(BoundingSphere bs)
determines if this bounding volume and a given bounding sphere are intersecting.

パラメータ:
bs - the bounding sphere to test against.
戻り値:
true if this volume intersects the given bounding sphere.

intersectsBoundingBox

public abstract boolean intersectsBoundingBox(BoundingBox bb)
determines if this bounding volume and a given bounding box are intersecting.

パラメータ:
bb - the bounding box to test against.
戻り値:
true if this volume intersects the given bounding box.

contains

public abstract boolean contains(Vector3f point)
determines if a given point is contained within this bounding volume. If the point is on the edge of the bounding volume, this method will return false. Use intersects(Vector3f) to check for edge intersection.

パラメータ:
point - the point to check
戻り値:
true if the point lies within this bounding volume.

intersects

public abstract boolean intersects(Vector3f point)
Determines if a given point intersects (touches or is inside) this bounding volume.

パラメータ:
point - the point to check
戻り値:
true if the point lies within this bounding volume.

getVolume

public abstract float getVolume()

clone

public BoundingVolume clone()
オーバーライド:
クラス java.lang.Object 内の clone

write

public void write(JmeExporter e)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

read

public void read(JmeImporter e)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException