Modifier and Type | Method and Description |
---|---|
Vec4 |
getCenter()
Returns the extent's center point.
|
double |
getDiameter()
Returns the extent's diameter.
|
double |
getEffectiveRadius(Plane plane)
Computes the effective radius of the extent relative to a specified plane.
|
double |
getProjectedArea(View view)
Computes the area in square pixels of this
Extent after it is projected into the specified
view's viewport. |
double |
getRadius()
Returns the extent's radius.
|
Intersection[] |
intersect(Line line)
Computes the intersections of this extent with
line . |
boolean |
intersects(Frustum frustum)
Determines whether or not this
Extent intersects frustum . |
boolean |
intersects(Line line)
Determines whether or not
line intersects this Extent . |
boolean |
intersects(Plane plane)
Calculate whether or not this
Extent is intersected by plane . |
Vec4 getCenter()
double getDiameter()
double getEffectiveRadius(Plane plane)
plane
- the plane.double getProjectedArea(View view)
Extent
after it is projected into the specified
view's
viewport. The returned value is the screen area that this Extent
covers in the
infinite plane defined by the view's
viewport. This area is not limited to the size of the
view's
viewport, and portions of this Extent
are not clipped by the view's
frustum.
This returns Double.POSITIVE_INFINITY
if the view's
eye point is inside this
Extent
, or if any portion of this Extent
is behind the eye point. In either case, this
Extent
has no finite projection on the view
.
view
- the View
for which to compute a projected screen area.Extent
in square pixels, or
Double.POSITIVE_INFINITY
if the view's
eye point is inside this
Extent
or part of this Extent
is behind the view's
eye point.java.lang.IllegalArgumentException
- if the view
is null
.double getRadius()
Intersection[] intersect(Line line)
line
. The returned array may be either null or of
zero length if no intersections are discovered. It does not contain null elements. Tangential intersections are
marked as such. line
is considered to have infinite length in both directions.line
- the Line
with which to intersect this Extent
.line
enters or leave this
Extent
.boolean intersects(Frustum frustum)
Extent
intersects frustum
. Returns true if any part of
these two objects intersect, including the case where either object wholly contains the other, false otherwise.frustum
- the Frustum
with which to test for intersection.boolean intersects(Line line)
line
intersects this Extent
. This method may be faster than
checking the size of the array returned by intersect(Line)
. Implementing methods must ensure that
this method returns true if and only if intersect(Line)
returns a non-null array containing at least
one element.line
- the Line
with which to test for intersection.boolean intersects(Plane plane)
Extent
is intersected by plane
.plane
- the Plane
with which to test for intersection.plane
is found to intersect this Extent
.