|
Flight Club |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--flightclub.client.Cloud
This class implements a cumulus cloud being fed by a thermal. The wind makes things slope:
.--.
cloud / |
.----.
/ /
thermal / wind ->
/ /
--------------
Inside the inner class Shape3d we work in spherical polars. Four
quadrants are defined as follows:
2 | 1
|
---.--->y
|
3 | 0
x
| Field Summary | |
static int |
CLOUDBASE
|
| Constructor Summary | |
Cloud(ModelViewer modelViewer,
float x,
float y)
Creates a cloud with the default size. |
|
Cloud(ModelViewer modelViewer,
float x,
float y,
int size)
Creates a cloud. |
|
| Method Summary | |
void |
destroyMe()
Destroys refences to this cloud and its child objects so it will be garbage collected. |
protected void |
finalize()
|
void |
freeze()
|
float[] |
getEye()
|
float[] |
getFocus()
|
float |
getLift(float x,
float y,
float z)
Returns lift at a point. |
boolean |
isUnder(float x,
float y,
float z)
Returns true if the point is 'under' the cloud. |
boolean |
noLift()
Returns true is this cloud still has a thermal under it. |
void |
setWind(float wind_x,
float wind_y)
The thermal slope is a function of the wind. |
void |
tick(float t,
float dt)
|
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CLOUDBASE
| Constructor Detail |
public Cloud(ModelViewer modelViewer,
float x,
float y,
int size)
public Cloud(ModelViewer modelViewer,
float x,
float y)
| Method Detail |
public void destroyMe()
public boolean isUnder(float x,
float y,
float z)
public void tick(float t,
float dt)
tick in interface ClockObserverpublic boolean noLift()
public float[] getFocus()
getFocus in interface CameraSubjectpublic float[] getEye()
getEye in interface CameraSubject
public final float getLift(float x,
float y,
float z)
^ lift
.---|---.
/ | \
/ | \
.---------.---------.--->r
0
public void setWind(float wind_x,
float wind_y)
.--.
/ |
.----.
/
/ wind ->
/
--------------
In nil wind a thermal rises vertically and we have zero slope.
public void freeze()
protected void finalize()
finalize in class java.lang.Object
|
Dan Burton <danb@dircon.co.uk> | latest update: 20 Sep 2002; | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||