|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.view.AbstractView
public abstract class AbstractView
Field Summary |
---|
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
changeSupport |
Fields inherited from interface gov.nasa.worldwind.View |
---|
VIEW_STOPPED |
Constructor Summary | |
---|---|
AbstractView()
|
Method Summary | |
---|---|
void |
apply(DrawContext dc)
Calculates and applies this View's internal state to the graphics context in
the specified dc . |
void |
applyStateIterator(ViewStateIterator viewStateIterator)
Iterates over View state changes in ViewStateIterator and applies them to the
View . |
protected abstract void |
doApply(DrawContext dc)
|
protected void |
flagHadCollisions()
|
boolean |
hadCollisions()
Returns whether or not a collision has occurred since the last call to hadCollisions . |
boolean |
hasStateIterator()
Returns true when View is actively iterating over an instance of ViewStateIterator . |
boolean |
isDetectCollisions()
Returns whether the this View will detect collisions with other objects,
such as the surface geometry. |
void |
popReferenceCenter(DrawContext dc)
Removes the model-view matrix on top of the matrix stack, and restores the original matrix. |
Matrix |
pushReferenceCenter(DrawContext dc,
Vec4 referenceCenter)
Defines and applies a new model-view matrix in which the world origin is located at referenceCenter . |
void |
setDetectCollisions(boolean detectCollisions)
Sets whether or not this View will detect collisions with other objects,
such as the surface geometry. |
void |
stopMovement()
Stops any movement associated with this View . |
void |
stopStateIterators()
Immediately stops all active iteration over ViewStateIterator . |
Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
---|
propertyChange |
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
Methods inherited from interface java.beans.PropertyChangeListener |
---|
propertyChange |
Methods inherited from interface gov.nasa.worldwind.Restorable |
---|
getRestorableState, restoreState |
Constructor Detail |
---|
public AbstractView()
Method Detail |
---|
public void apply(DrawContext dc)
View
View's
internal state to the graphics context in
the specified dc
.
All subsequently rendered objects use this new state. Upon return, the OpenGL graphics context reflects the
values of this view, as do any computed values of the view, such as the modelview matrix, projection matrix and
viewing frustum.
apply
in interface View
dc
- the current World Wind DrawContext on which View
will apply its state.public void applyStateIterator(ViewStateIterator viewStateIterator)
View
View
state changes in ViewStateIterator
and applies them to the
View
. The View
will automatically refresh and request state from
viewStateIterator
until the iteration is complete, or View
has been stopped by invoking
View.stopStateIterators()
.
applyStateIterator
in interface View
viewStateIterator
- the ViewStateIterator
to iterate over.protected abstract void doApply(DrawContext dc)
protected void flagHadCollisions()
public boolean hadCollisions()
View
hadCollisions
.
If View.isDetectCollisions()
is false, collisions will not be detected and
hadCollisions
will always return false.
hadCollisions
in interface View
true
if a collision has occurred since the last call; false
otherwise.public boolean hasStateIterator()
View
View
is actively iterating over an instance of ViewStateIterator
.
hasStateIterator
in interface View
ViewStateIterator
; false otherwise.public boolean isDetectCollisions()
View
View
will detect collisions with other objects,
such as the surface geometry. If true, implementations may also automatically
resolve any detected collisions.
isDetectCollisions
in interface View
true
If this View
will detect collisions; false
otherwise.public void popReferenceCenter(DrawContext dc)
View
popReferenceCenter
in interface View
dc
- the current World Wind drawing context on which the original matrix will be restored.public Matrix pushReferenceCenter(DrawContext dc, Vec4 referenceCenter)
View
referenceCenter
.
Geometry rendered after a call to pushReferenceCenter
should be transformed with respect to
referenceCenter
, rather than the canonical origin (0, 0, 0). Calls to
pushReferenceCenter
must be followed by View.popReferenceCenter(gov.nasa.worldwind.render.DrawContext)
after rendering is complete.
Note that calls to View.getModelviewMatrix()
will not return reference-center model-view matrix, but the
original matrix.
pushReferenceCenter
in interface View
dc
- the current World Wind drawing context on which new model-view state will be applied.referenceCenter
- the location to become the new world origin.
referenceCenter
, or null if this method failed.public void setDetectCollisions(boolean detectCollisions)
View
View
will detect collisions with other objects,
such as the surface geometry. If detectCollisions
is true, implementations may also automatically
resolve any detected collisions.
setDetectCollisions
in interface View
detectCollisions
- If true
, this View
will resolve collisions; otherwise this
View
will ignore collisions.public void stopMovement()
View
View
. This will stop any currently active
ViewStateIterators
on this View
.
stopMovement
in interface View
public void stopStateIterators()
View
ViewStateIterator
.
stopStateIterators
in interface View
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |