|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisad.DataRenderer
public abstract class DataRenderer
DataRenderer is the VisAD abstract super-class for graphics rendering algorithms. These transform Data objects into 3-D (or 2-D) depictions in a Display window.
DataRenderer is not Serializable and should not be copied between JVMs.
Field Summary | |
---|---|
protected boolean |
enabled
|
protected boolean |
pickCrawlToCursor
flag indicating whether points affected by direct manipulation should "crawl" toward the cursor instead of jumping to it immediately. |
Constructor Summary | |
---|---|
DataRenderer()
|
Method Summary | |
---|---|
void |
addException(java.lang.Exception error)
add message from BadMappingException or UnimplementedException to exceptionVector |
void |
addPoint(float[] x)
|
boolean |
checkAction()
|
float |
checkClose(double[] origin,
double[] direction)
find minimum distance from ray to spatialValues |
void |
checkDirect()
set isDirectManipulation = true if this DataRenderer supports direct manipulation for its linked Data |
void |
clearAVControls()
|
abstract void |
clearBranch()
clear scene graph component |
void |
clearExceptions()
|
abstract void |
clearScene()
clear any display list created by the most recent doAction invocation |
abstract java.lang.Object |
clone()
|
DataShadow |
computeRanges(Data data,
ShadowType type,
DataShadow shadow)
|
abstract boolean |
doAction()
transform linked Data objects into a display list, if any Data object values have changed or relevant Controls have changed; DataRenderers that assume the default implementation of DisplayImpl.doAction can determine whether re-transform is needed by: (get_all_feasible() && (get_any_changed() || get_any_transform_control())); these flags are computed by the default DataRenderer implementation of prepareAction; the return boolean is true if the transform was done successfully |
void |
drag_direct(VisADRay ray,
boolean first,
int mouseModifiers)
|
float[][] |
earthToSpatial(float[][] locs,
float[] vert)
convert (lat, lon) or (lat, lon, other) values to display (x, y, z) |
float[][] |
earthToSpatial(float[][] locs,
float[] vert,
float[][] base_spatial_locs)
|
float |
findRayManifoldIntersection(boolean first,
double[] origin,
double[] direction,
DisplayTupleType tuple,
int otherindex,
float othervalue)
|
boolean |
get_all_feasible()
|
boolean |
get_any_changed()
|
boolean |
get_any_transform_control()
|
boolean |
getBadScale(boolean anyBadMap)
|
DisplayImpl |
getDisplay()
|
CoordinateSystem |
getDisplayCoordinateSystem()
|
DisplayRenderer |
getDisplayRenderer()
|
int |
getEarthDimension()
|
Unit[] |
getEarthUnits()
|
boolean |
getEnabled()
Returns the visibility of the data being rendered by this instance. |
java.util.Vector |
getExceptionVector()
this returns a Vector of Strings from the BadMappingExceptions and UnimplementedExceptions generated during the last invocation of this DataRenderer's doAction method; there is no need to over-ride this method, but it may be invoked by DisplayRenderer; gets a clone of exceptionVector to avoid concurrent access by Display thread |
boolean |
getIsDirectManipulation()
|
int |
getLastMouseModifiers()
|
int[] |
getLatLonIndices()
|
float |
getLatLonRange()
|
DataDisplayLink |
getLink()
used for transform time-out hack |
DataDisplayLink[] |
getLinks()
return an array of links to Data objects to be rendered; Data objects are accessed by DataDisplayLink.getData() |
boolean |
getPickCrawlToCursor()
gets whether points affected by direct manipulation should "crawl" toward the cursor instead of jumping to it immediately. |
double[] |
getRanges()
|
RealVectorType |
getRealVectorTypes(int index)
|
java.lang.String |
getWhyNotDirect()
|
boolean |
isLegalTextureMap()
|
boolean |
isTransformControl(Control control,
DataDisplayLink link)
DataRenderer-specific decision about which Controls require re-transform; may be over-ridden by DataRenderer sub-classes; this decision may use some values computed by link.prepareData |
abstract ShadowType |
makeShadowFunctionType(FunctionType type,
DataDisplayLink link,
ShadowType parent)
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowFunctionType; these factories are invoked by the buildShadowType methods of the MathType subclasses, which are invoked by DataDisplayLink.prepareData, which is invoked by DataRenderer.prepareAction |
abstract ShadowType |
makeShadowRealTupleType(RealTupleType type,
DataDisplayLink link,
ShadowType parent)
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealTupleType |
abstract ShadowType |
makeShadowRealType(RealType type,
DataDisplayLink link,
ShadowType parent)
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealType |
abstract ShadowType |
makeShadowSetType(SetType type,
DataDisplayLink link,
ShadowType parent)
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowSetType |
abstract ShadowType |
makeShadowTextType(TextType type,
DataDisplayLink link,
ShadowType parent)
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTextType |
abstract ShadowType |
makeShadowTupleType(TupleType type,
DataDisplayLink link,
ShadowType parent)
factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTupleType |
DataShadow |
prepareAction(boolean go,
boolean initialize,
DataShadow shadow)
check if re-transform is needed; if initialize is true then compute ranges for RealType-s and Animation sampling |
void |
realCheckDirect()
|
void |
release_direct()
mouse button released, ending direct manipulation |
void |
removeLink(DataDisplayLink link)
WARNING! Do NOT use this routine unless you know what you are doing! |
void |
set_all_feasible(boolean b)
|
void |
setDisplay(DisplayImpl d)
|
void |
setDisplayRenderer(DisplayRenderer r)
|
void |
setEarthSpatialData(ShadowRealTupleType s_d_i,
ShadowRealTupleType s_d_o,
RealTupleType d_o,
Unit[] d_u_o,
RealTupleType d_i,
CoordinateSystem[] d_c_i,
Unit[] d_u_i)
|
void |
setEarthSpatialDisplay(CoordinateSystem coord,
DisplayTupleType t,
DisplayImpl display,
int[] indices,
float[] default_values,
double[] r)
|
void |
setIsDirectManipulation(boolean b)
|
void |
setLastMouseModifiers(int mouseModifiers)
|
void |
setLatLonIndices(int[] indices)
|
void |
setLinks(DataDisplayLink[] links)
|
abstract void |
setLinks(DataDisplayLink[] links,
DisplayImpl d)
|
void |
setPickCrawlToCursor(boolean b)
sets whether points affected by direct manipulation should "crawl" toward the cursor instead of jumping to it immediately. |
void |
setSpatialValues(float[][] spatial_values)
set spatialValues from ShadowType.doTransform |
float[][] |
spatialToEarth(float[][] spatial_locs)
convert display (x, y, z) to (lat, lon) or (lat, lon, other) values |
float[][] |
spatialToEarth(float[][] spatial_locs,
float[][] base_spatial_locs)
|
void |
stop_direct()
discontinue dragging this DataRenderer; this method is not a general disable |
void |
suppressExceptions(boolean suppress)
|
void |
toggle(boolean on)
Sets the visibility of the data being rendered by this instance. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean enabled
protected boolean pickCrawlToCursor
Constructor Detail |
---|
public DataRenderer()
Method Detail |
---|
public void clearExceptions()
public void suppressExceptions(boolean suppress)
public void addException(java.lang.Exception error)
public java.util.Vector getExceptionVector()
public boolean get_all_feasible()
public boolean get_any_changed()
public boolean get_any_transform_control()
public void set_all_feasible(boolean b)
public abstract void setLinks(DataDisplayLink[] links, DisplayImpl d) throws VisADException
VisADException
public void toggle(boolean on)
on
- Whether or not to render the data.public boolean getEnabled()
public void setLinks(DataDisplayLink[] links)
public DataDisplayLink[] getLinks()
public DisplayImpl getDisplay()
public void setDisplay(DisplayImpl d)
public DisplayRenderer getDisplayRenderer()
public void setDisplayRenderer(DisplayRenderer r)
public boolean checkAction()
public DataShadow prepareAction(boolean go, boolean initialize, DataShadow shadow) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public DataShadow computeRanges(Data data, ShadowType type, DataShadow shadow) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public abstract void clearBranch()
public abstract boolean doAction() throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public boolean getBadScale(boolean anyBadMap)
public abstract void clearScene()
public void clearAVControls()
public abstract ShadowType makeShadowFunctionType(FunctionType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public abstract ShadowType makeShadowRealTupleType(RealTupleType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public abstract ShadowType makeShadowRealType(RealType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public abstract ShadowType makeShadowSetType(SetType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public abstract ShadowType makeShadowTextType(TextType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public abstract ShadowType makeShadowTupleType(TupleType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public boolean isTransformControl(Control control, DataDisplayLink link)
public DataDisplayLink getLink()
public boolean isLegalTextureMap()
public RealVectorType getRealVectorTypes(int index)
public int[] getLatLonIndices()
public void setLatLonIndices(int[] indices)
public int getEarthDimension()
public Unit[] getEarthUnits()
public float getLatLonRange()
public float[][] earthToSpatial(float[][] locs, float[] vert) throws VisADException
VisADException
public float[][] earthToSpatial(float[][] locs, float[] vert, float[][] base_spatial_locs) throws VisADException
VisADException
public float[][] spatialToEarth(float[][] spatial_locs) throws VisADException
VisADException
public float[][] spatialToEarth(float[][] spatial_locs, float[][] base_spatial_locs) throws VisADException
VisADException
public void setEarthSpatialData(ShadowRealTupleType s_d_i, ShadowRealTupleType s_d_o, RealTupleType d_o, Unit[] d_u_o, RealTupleType d_i, CoordinateSystem[] d_c_i, Unit[] d_u_i) throws VisADException
VisADException
public double[] getRanges()
public CoordinateSystem getDisplayCoordinateSystem()
public void setEarthSpatialDisplay(CoordinateSystem coord, DisplayTupleType t, DisplayImpl display, int[] indices, float[] default_values, double[] r) throws VisADException
VisADException
public void realCheckDirect() throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public java.lang.String getWhyNotDirect()
public void setSpatialValues(float[][] spatial_values)
public float checkClose(double[] origin, double[] direction)
public void release_direct()
public void stop_direct()
public int getLastMouseModifiers()
public void setLastMouseModifiers(int mouseModifiers)
public void drag_direct(VisADRay ray, boolean first, int mouseModifiers)
public void addPoint(float[] x) throws VisADException
VisADException
public void checkDirect() throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public void setIsDirectManipulation(boolean b)
public boolean getIsDirectManipulation()
public void setPickCrawlToCursor(boolean b)
public boolean getPickCrawlToCursor()
public float findRayManifoldIntersection(boolean first, double[] origin, double[] direction, DisplayTupleType tuple, int otherindex, float othervalue) throws VisADException
VisADException
public void removeLink(DataDisplayLink link)
public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |