visad.util
Class DualRes
- java.lang.Object
-
- visad.util.DualRes
-
- Direct Known Subclasses:
- ResSwitcher
public class DualRes extends java.lang.ObjectMaintains two representations for a given data reference: one at high (normal) resolution, and one at low (scaled-down) resolution. When greater rendering speed is necessary, programs can utilize the computed low-resolution data. When more detail is required, programs can switch back to the hi-resolution data.
-
-
Field Summary
Fields Modifier and Type Field and Description static booleanDEBUGDebugging flag.
-
Constructor Summary
Constructors Constructor and Description DualRes(DataReferenceImpl ref)Constructs an object to maintain both high- and low-resolution representations for the referenced data.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description DataReferenceImplgetHighResReference()Gets the DataReference corresponding to the full-resolution data.DataReferenceImplgetLowResReference()Gets the DataReference corresponding to the scaled-down data.doublegetResolutionScale()Gets the factor by which the low-resolution representation is scaled down from the high-resolution one.static FieldImplrescale(FieldImpl field, double scale)Rescales a field by the given scale factor.static FieldImplrescale(FieldImpl field, int[] lengths)Rescales a field by the given scale factor.voidsetResolutionScale(double scale)Sets the factor by which the low-resolution representation is scaled down from the high-resolution one.
-
-
-
Constructor Detail
-
DualRes
public DualRes(DataReferenceImpl ref) throws VisADException, java.rmi.RemoteException
Constructs an object to maintain both high- and low-resolution representations for the referenced data.- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
Method Detail
-
rescale
public static FieldImpl rescale(FieldImpl field, double scale) throws VisADException, java.rmi.RemoteException
Rescales a field by the given scale factor.- Throws:
VisADExceptionjava.rmi.RemoteException
-
rescale
public static FieldImpl rescale(FieldImpl field, int[] lengths) throws VisADException, java.rmi.RemoteException
Rescales a field by the given scale factor.- Throws:
VisADExceptionjava.rmi.RemoteException
-
setResolutionScale
public void setResolutionScale(double scale) throws VisADExceptionSets the factor by which the low-resolution representation is scaled down from the high-resolution one.- Throws:
VisADException
-
getResolutionScale
public double getResolutionScale()
Gets the factor by which the low-resolution representation is scaled down from the high-resolution one.
-
getHighResReference
public DataReferenceImpl getHighResReference()
Gets the DataReference corresponding to the full-resolution data.
-
getLowResReference
public DataReferenceImpl getLowResReference()
Gets the DataReference corresponding to the scaled-down data.
-
-
DMelt 3.0 © DataMelt by jWork.ORG