|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.geom.Cylinder
public class Cylinder
Represents a geometric cylinder. Cylinder
s are immutable.
Constructor Summary | |
---|---|
Cylinder(Vec4 bottomCenter,
Vec4 topCenter,
double cylinderRadius)
Create a Cylinder from two points and a radius. |
Method Summary | |
---|---|
Vec4 |
getAxisUnitDirection()
|
Vec4 |
getBottomCenter()
|
Vec4 |
getCenter()
|
double |
getCylinderHeight()
|
double |
getCylinderRadius()
|
double |
getDiameter()
|
double |
getHeight()
Obtain the height of this Cylinder . |
double |
getRadius()
|
Vec4 |
getTopCenter()
|
Intersection[] |
intersect(Line line)
Obtain the intersections of this extent with line . |
boolean |
intersects(Frustum frustum)
Tests whether or not this Extent intersects frustum . |
boolean |
intersects(Line line)
Calculate whether or not line intersects this Extent . |
boolean |
intersects(Plane plane)
Calculate whether or not this Extent is intersected by plane . |
void |
render(DrawContext dc)
Causes this Renderable to render itself using the DrawContext provided. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Cylinder(Vec4 bottomCenter, Vec4 topCenter, double cylinderRadius)
Cylinder
from two points and a radius. Does not accept null arguments.
bottomCenter
- represents the centrepoint of the base disc of the Cylinder
topCenter
- represents the centrepoint of the top disc of the Cylinder
cylinderRadius
- the radius of the Cylinder
java.lang.IllegalArgumentException
- if either the top or bottom point is nullMethod Detail |
---|
public Vec4 getAxisUnitDirection()
public Vec4 getBottomCenter()
public Vec4 getCenter()
getCenter
in interface Extent
public double getCylinderHeight()
public double getCylinderRadius()
public double getDiameter()
getDiameter
in interface Extent
public final double getHeight()
Cylinder
.
Cylinder
public double getRadius()
getRadius
in interface Extent
public Vec4 getTopCenter()
public Intersection[] intersect(Line line)
Extent
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.
intersect
in interface Extent
line
- the Line
with which to intersect this Extent
line
enters or leave this
Extent
public boolean intersects(Frustum frustum)
Extent
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.
intersects
in interface Extent
frustum
- the Frustum
with which to test for intersection
public boolean intersects(Line line)
Extent
line
intersects this Extent
. This method may be faster than
checking the size of the arary 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.
intersects
in interface Extent
line
- the Line
with which to test for intersection
public boolean intersects(Plane plane)
Extent
Extent
is intersected by plane
.
intersects
in interface Extent
plane
- the Plane
with which to test for intersection
plane
is found to intersect this Extent
public void render(DrawContext dc)
Renderable
Renderable
to render itself using the DrawContext
provided. The
DrawContext
provides the elevation model, openGl instance, globe and other information required for
drawing. It is recommended that the DrawContext
is non-null as most implementations do not support
null DrawContext
s.
render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
public java.lang.String toString()
toString
in class java.lang.Object
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |