visad.bom
Class TextureFillRendererJ3D
- java.lang.Object
-
- visad.DataRenderer
-
- visad.java3d.RendererJ3D
-
- visad.java3d.DefaultRendererJ3D
-
- visad.bom.TextureFillRendererJ3D
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class TextureFillRendererJ3D extends DefaultRendererJ3D
TextureFillRendererJ3D is the VisAD class for rendering Sets (usually Irregular2DSets) filled with a cross hatch pattern via texture mapping
-
-
Constructor Summary
Constructors Constructor and Description TextureFillRendererJ3D()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()javax.media.j3d.BranchGroupdoTransform()create a BranchGroup scene graph for Data in links[0]floatgetScale()booleangetSmooth()int[]getTexture()intgetTextureHeight()intgetTextureWidth()static booleanisRendererUsable(MathType type, ScalarMap[] maps)determine whether the given MathType and collection of ScalarMaps meets the criteria to use TextureFillRendererJ3D.static booleanisSetType(MathType type)determine whether the given MathType is usable with TextureFillRendererJ3Dstatic voidmain(java.lang.String[] args)run 'java visad.bom.TextureFillRendererJ3D smooth'ShadowTypemakeShadowSetType(SetType type, DataDisplayLink link, ShadowType parent)factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowSetType; ShadowType trees are constructed that 'shadow' the MathType trees of Data to be depicted, via recursive calls to buildShadowType() methods of MathType sub-classes, to DataRenderer.makeShadow*Type() methods, to Shadow*Type constructors, then back to buildShadowType() methods; the recursive call chain is initiated by DataDisplayLink.prepareData() calls to buildShadowType() methods of MathType sub-classes;voidsetScale(float s)texture pattern will repreat 2 * s times across boxvoidsetSmooth(boolean s)set s = true to smooth texturevoidsetTexture(int w, int h, int[] t)define texture pattern as a w * h rectangle of ints (RGB values); note w and h must be powers of 2, and t.length must be w * h-
Methods inherited from class visad.java3d.DefaultRendererJ3D
addSwitch, clearScene, getLink, setLinks
-
Methods inherited from class visad.java3d.RendererJ3D
clearBranch, doAction, flush, getBranch, makeShadowFunctionType, makeShadowRealTupleType, makeShadowRealType, makeShadowTextType, makeShadowTupleType, setBranchEarly, toggle
-
Methods inherited from class visad.DataRenderer
addException, addPoint, checkAction, checkClose, checkDirect, clearAVControls, clearExceptions, computeRanges, constrainDragPoint, drag_direct, earthToSpatial, earthToSpatial, findRayManifoldIntersection, get_all_feasible, get_any_changed, get_any_transform_control, getBadScale, getDisplay, getDisplayCoordinateSystem, getDisplayRenderer, getEarthDimension, getEarthUnits, getEnabled, getExceptionVector, getIsDirectManipulation, getLastMouseModifiers, getLatLonIndices, getLatLonRange, getLinks, getPickCrawlToCursor, getPolygonOffset, getPolygonOffsetFactor, getProjectionControlListeners, getRanges, getRealVectorTypes, getWhyNotDirect, hasPolygonOffset, isLegalTextureMap, isTransformControl, prepareAction, realCheckDirect, release_direct, removeLink, set_all_feasible, setDisplay, setDisplayRenderer, setEarthSpatialData, setEarthSpatialDisplay, setHasPolygonOffset, setIsDirectManipulation, setLastMouseModifiers, setLatLonIndices, setLinks, setPickCrawlToCursor, setPolygonOffset, setPolygonOffsetFactor, setSpatialValues, spatialToEarth, spatialToEarth, stop_direct, suppressExceptions
-
-
-
-
Method Detail
-
setScale
public void setScale(float s)
texture pattern will repreat 2 * s times across box
-
getScale
public float getScale()
-
setTexture
public void setTexture(int w, int h, int[] t) throws VisADExceptiondefine texture pattern as a w * h rectangle of ints (RGB values); note w and h must be powers of 2, and t.length must be w * h- Throws:
VisADException
-
getTextureWidth
public int getTextureWidth()
-
getTextureHeight
public int getTextureHeight()
-
getTexture
public int[] getTexture()
-
setSmooth
public void setSmooth(boolean s)
set s = true to smooth texture
-
getSmooth
public boolean getSmooth()
-
isSetType
public static boolean isSetType(MathType type)
determine whether the given MathType is usable with TextureFillRendererJ3D
-
isRendererUsable
public static boolean isRendererUsable(MathType type, ScalarMap[] maps) throws VisADException
determine whether the given MathType and collection of ScalarMaps meets the criteria to use TextureFillRendererJ3D. Throw a VisADException if ImageRenderer cannot be used, otherwise return true.- Throws:
VisADException
-
makeShadowSetType
public ShadowType makeShadowSetType(SetType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
Description copied from class:DataRendererfactory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowSetType; ShadowType trees are constructed that 'shadow' the MathType trees of Data to be depicted, via recursive calls to buildShadowType() methods of MathType sub-classes, to DataRenderer.makeShadow*Type() methods, to Shadow*Type constructors, then back to buildShadowType() methods; the recursive call chain is initiated by DataDisplayLink.prepareData() calls to buildShadowType() methods of MathType sub-classes;- Overrides:
makeShadowSetTypein classRendererJ3D- Parameters:
type- FunctionType that returned ShadowType will shadowlink- DataDisplayLink linking Data to be depictedparent- parent in ShadowType tree structure- Returns:
- constructed ShadowType
- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
doTransform
public javax.media.j3d.BranchGroup doTransform() throws VisADException, java.rmi.RemoteExceptionDescription copied from class:DefaultRendererJ3Dcreate a BranchGroup scene graph for Data in links[0]- Overrides:
doTransformin classDefaultRendererJ3D- Throws:
VisADExceptionjava.rmi.RemoteException
-
clone
public java.lang.Object clone()
- Overrides:
clonein classDefaultRendererJ3D- Returns:
- a copy of this DataRenderer
-
main
public static void main(java.lang.String[] args) throws VisADException, java.rmi.RemoteException, java.io.IOExceptionrun 'java visad.bom.TextureFillRendererJ3D smooth'- Throws:
VisADExceptionjava.rmi.RemoteExceptionjava.io.IOException
-
-
DMelt 3.0 © DataMelt by jWork.ORG