|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.BoundingVolume
org.j3d.aviatrix3d.BoundingGeometry
Bounds described as an arbitrary piece of scene graph structure that is not rendered to screen
In some cases, the scene graph prefers to use simplified proxy geometry to describe the bounds of an object, rather than using the exact geometry or bounding boxes. This allows the user to provide a custom set of bounds using normal scene graph geometry, without it being rendered.
Internally, this class holds no extra data other than the geometry it represents. Requests for the information such as extents, center, etc will ask the held geometry for it's top-level bounds object and compare against that. It does not walk the contained geometry tree for further checks. It is up to the internals of the scene graph API to do that. This is a holder for non-renderable geometry, not a complete internal picker.
Field Summary |
Fields inherited from class org.j3d.aviatrix3d.BoundingVolume |
BOX_BOUNDS, FRUSTUM_ALLIN, FRUSTUM_ALLOUT, FRUSTUM_PARTIAL, GEOMETRY_BOUNDS, NULL_BOUNDS, SPHERE_BOUNDS |
Constructor Summary | |
BoundingGeometry()
The default constructor with no geometry set. |
|
BoundingGeometry(Node geom)
Construct a bounding sphere at the origin with a set radius. |
Method Summary | |
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. |
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. |
Node |
getProxyGeometry()
Get the currently used proxy geometry. |
int |
getType()
The type of bounds this object represents. |
void |
setProxyGeometry(Node geom)
Set the new geometry to use as the proxy. |
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, toString, wait, wait, wait |
Constructor Detail |
public BoundingGeometry()
public BoundingGeometry(Node geom)
geom
- The geometry to useMethod Detail |
public int getType()
getType
in class BoundingVolume
public void getExtents(float[] min, float[] max)
getExtents
in class BoundingVolume
min
- The minimum position of the boundsmax
- The maximum position of the boundspublic void getCenter(float[] center)
getCenter
in class BoundingVolume
center
- The center of the bounds will be copied herepublic boolean checkIntersectionPoint(float[] pos)
checkIntersectionPoint
in class BoundingVolume
pos
- The location of the point to test against
public boolean checkIntersectionRay(float[] pos, float[] dir)
checkIntersectionRay
in class BoundingVolume
pos
- The start location of the raydir
- The direction vector of the ray
public boolean checkIntersectionSegment(float[] start, float[] end)
checkIntersectionSegment
in class BoundingVolume
start
- The start location of the segmentend
- The start location of the segment
public int checkIntersectionFrustum(javax.vecmath.Vector4f[] planes, javax.vecmath.Matrix4d mat)
checkIntersectionFrustum
in class BoundingVolume
planes
- 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 BoundingVolume
planes
- The 6 planes of the frustummat
- The vworld to local transformation matrix
public void transform(javax.vecmath.Matrix4d mat)
transform
in class BoundingVolume
mat
- The matrix to transform this bounds bypublic void transform(javax.vecmath.Matrix4f mat)
transform
in class BoundingVolume
mat
- The matrix to transform this bounds bypublic void setProxyGeometry(Node geom)
geom
- The new geometry instance to use or nullpublic Node getProxyGeometry()
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |