|
Aviatrix3D 2.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.aviatrix3d.rendering.BoundingVolume
org.j3d.aviatrix3d.BoundingBox
public class BoundingBox
Bounds described as an axis-aligned bounding volume.
| Field Summary |
|---|
| Fields inherited from class org.j3d.aviatrix3d.rendering.BoundingVolume |
|---|
BOX_BOUNDS, FRUSTUM_ALLIN, FRUSTUM_ALLOUT, FRUSTUM_PARTIAL, GEOMETRY_BOUNDS, NULL_BOUNDS, SPHERE_BOUNDS |
| Constructor Summary | |
|---|---|
BoundingBox()
The default constructor with the sphere radius as one and center at the origin. |
|
BoundingBox(float[] min,
float[] max)
Construct a bounding box with minimum and maximum positions. |
|
| Method Summary | |
|---|---|
boolean |
checkIntersectionBox(float[] minExtents,
float[] maxExtents)
Check for the given AA box intersecting this bounds. |
boolean |
checkIntersectionCone(float[] vertex,
float[] direction,
float angle)
Check for the given cone intersecting this bounds. |
boolean |
checkIntersectionCylinder(float[] center,
float[] direction,
float radius,
float height)
Check for the given cylinder segment intersecting this bounds. |
int |
checkIntersectionFrustum(javax.vecmath.Vector4f[] planes,
javax.vecmath.Matrix4d mat)
Check whether this volume intersects with the view frustum. |
int |
checkIntersectionFrustum(javax.vecmath.Vector4f[] planes,
javax.vecmath.Matrix4f mat)
Check whether this volume intersects with the view frustum. |
boolean |
checkIntersectionPoint(float[] pos)
Check for the given point lieing inside this bounds. |
boolean |
checkIntersectionRay(float[] pos,
float[] dir)
Check for the given ray intersecting this bounds. |
boolean |
checkIntersectionSegment(float[] start,
float[] end)
Check for the given line segment intersecting this bounds. |
boolean |
checkIntersectionSphere(float[] center,
float radius)
Check for the given sphere intersecting this bounds. |
boolean |
checkIntersectionTriangle(float[] v0,
float[] v1,
float[] v2)
Check for the given triangle intersecting this bounds. |
void |
getCenter(float[] center)
Get the center of the bounding volume. |
void |
getExtents(float[] min,
float[] max)
Get the maximum extents of the bounding volume. |
void |
getMaximum(float[] pos)
Get the maximum bounds position of the box. |
void |
getMinimum(float[] pos)
Get the minimum bounds position of the box. |
void |
getSize(float[] size)
Get the size of the bounding volume. |
int |
getType()
The type of bounds this object represents. |
void |
setBounds(float[] min,
float[] max)
Set both of the bounds of the box. |
void |
setMaximum(float[] pos)
Set the maximum bounds for the box. |
void |
setMaximum(float x,
float y,
float z)
Set the maximum bounds for the box. |
void |
setMinimum(float[] pos)
Set the minimum bounds for the box. |
void |
setMinimum(float x,
float y,
float z)
Set the minimum bounds for the box. |
java.lang.String |
toString()
Generate a string representation of this box. |
void |
transform(javax.vecmath.Matrix4d mat)
Transform the current postion by the given transformation matrix. |
void |
transform(javax.vecmath.Matrix4f mat)
Transform the current postion by the given transformation matrix. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BoundingBox()
public BoundingBox(float[] min,
float[] max)
min - The minimum position of the boundsmax - The maximum position of the bounds| Method Detail |
|---|
public int getType()
getType in class BoundingVolume
public void getExtents(float[] min,
float[] max)
getExtents in class BoundingVolumemin - The minimum position of the boundsmax - The maximum position of the boundspublic void getCenter(float[] center)
getCenter in class BoundingVolumecenter - The center of the bounds will be copied herepublic void getSize(float[] size)
size - The size of the bounds will be copied herepublic boolean checkIntersectionPoint(float[] pos)
checkIntersectionPoint in class BoundingVolumepos - The location of the point to test against
public boolean checkIntersectionRay(float[] pos,
float[] dir)
checkIntersectionRay in class BoundingVolumepos - The start location of the raydir - The direction vector of the ray
public boolean checkIntersectionSphere(float[] center,
float radius)
checkIntersectionSphere in class BoundingVolumecenter - The location of the sphere's centerradius - The radius of the sphere
public boolean checkIntersectionTriangle(float[] v0,
float[] v1,
float[] v2)
checkIntersectionTriangle in class BoundingVolumev0 - The first vertex of the trianglev1 - The second vertex of the trianglev2 - The third vertex of the triangle
public boolean checkIntersectionCylinder(float[] center,
float[] direction,
float radius,
float height)
checkIntersectionCylinder in class BoundingVolumecenter - The location of the cylinder's centerdirection - A unit vector indicating the axial directionradius - The radius of the cylinderheight - The half-height of the cylinder from the center point
public boolean checkIntersectionCone(float[] vertex,
float[] direction,
float angle)
checkIntersectionCone in class BoundingVolumevertex - The location of the cone's vertexdirection - A unit vector indicating the axial directionangle - The spread angle of the cone
public boolean checkIntersectionBox(float[] minExtents,
float[] maxExtents)
checkIntersectionBox in class BoundingVolumeminExtents - The minimum extent value on each axismaxExtents - The maximum extent value on each axis
public int checkIntersectionFrustum(javax.vecmath.Vector4f[] planes,
javax.vecmath.Matrix4d mat)
checkIntersectionFrustum in class BoundingVolumeplanes - The 6 planes of the frustummat - The vworld to local transformation matrix
public int checkIntersectionFrustum(javax.vecmath.Vector4f[] planes,
javax.vecmath.Matrix4f mat)
checkIntersectionFrustum in class BoundingVolumeplanes - The 6 planes of the frustummat - The vworld to local transformation matrix
public boolean checkIntersectionSegment(float[] start,
float[] end)
checkIntersectionSegment in class BoundingVolumestart - The start location of the segmentend - The start location of the segment
public void transform(javax.vecmath.Matrix4d mat)
transform in class BoundingVolumemat - The matrix to transform this bounds bypublic void transform(javax.vecmath.Matrix4f mat)
transform in class BoundingVolumemat - The matrix to transform this bounds by
public void setBounds(float[] min,
float[] max)
min - The minimum position of the boundsmax - The maximum position of the boundspublic void setMinimum(float[] pos)
pos - The new position of the box to be used
public void setMinimum(float x,
float y,
float z)
x - The x component of the minimum positiony - The y component of the minimum positionz - The z component of the minimum positionpublic void getMinimum(float[] pos)
pos - The position to copy the values intopublic void setMaximum(float[] pos)
pos - The new position of the center of the sphere to be used
public void setMaximum(float x,
float y,
float z)
x - The x component of the minimum positiony - The y component of the minimum positionz - The z component of the minimum positionpublic void getMaximum(float[] pos)
pos - The position to copy the values axtopublic java.lang.String toString()
toString in class java.lang.Object
|
Aviatrix3D 2.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||