|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectShape3D
com.c5corp.c5j3d.DEM3d
com.c5corp.c5j3d.DEM3dAppearance
public class DEM3dAppearance
DEM3dAppearance extends DEM3d and creates a DEM3d object with an editable appearance. A significant feature is that a texture can be applied to the object. Furthermore, an object's texture will be automatically fit to the object's surface. If a texture is specified, the image used must have an equal width and height of 2^n pixels and should be no larger than 2048x2048 pixels.
DEM3dAppearance has been tested with 24k California DEMs, which are typically around 1 or 2 megabytes in size, and with textures derived from images up to 2048x2048 pixels in size. When testing the class' main program, it has required an allocation of 256 megabytes of memory (ex. from the command line: java -Xmx256M DEM3d ___.dem ___.gif/.jpg/.png).
Field Summary | |
---|---|
protected Appearance |
appearance
The central j3d object encapsulated by DEM3dAppearance |
Fields inherited from class com.c5corp.c5j3d.DEM3d |
---|
indexedQuadArray |
Constructor Summary | |
---|---|
DEM3dAppearance(DemTable demTable)
Constructs a DEM3dAppearance object from a DemTable. |
|
DEM3dAppearance(DemTable demTable,
java.awt.image.BufferedImage bufferedImage)
Constructs a DEM3dAppearance object with a texture from a DemTable. |
|
DEM3dAppearance(DemTable demTable,
float objectWidth,
float objectBreadth,
float objectHeight)
Constructs a DEM3dAppearance object with specified dimensions from a DemTable |
|
DEM3dAppearance(DemTable demTable,
float objectWidth,
float objectBreadth,
float objectHeight,
java.awt.image.BufferedImage bufferedImage)
Constructs a DEM3dAppearance object with a texture and specified dimensions from a DemTable |
Method Summary | |
---|---|
java.awt.image.BufferedImage |
getTexture()
Returns the object's texture. |
Color4f |
getTextureBlendColor()
returns the color for the blend texture mode. |
static void |
main(java.lang.String[] args)
Renders an example 3D object from a DEM file and applies an image as a texture. |
void |
setPolygonMode(int polygonMode)
Sets the polygon mode for the object. |
void |
setTextureBlendColor(Color4f blendColor)
Sets the color for the blend texture mode if there is a texture applied. |
void |
setTextureMode(int textureMode)
Sets the texture mode for the object if there is a texture applied. |
Methods inherited from class com.c5corp.c5j3d.DEM3d |
---|
getBreadth, getDemTable, getHeight, getHighElevationColor, getLowElevationColor, getName, getNECorner, getNWCorner, getSECorner, getSWCorner, getUTMAngle, getWidth, setColoringScheme |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Appearance appearance
Constructor Detail |
---|
public DEM3dAppearance(DemTable demTable)
demTable
- the DemTable objectpublic DEM3dAppearance(DemTable demTable, java.awt.image.BufferedImage bufferedImage)
demTable
- the DemTable objectbufferedImage
- the object's texturepublic DEM3dAppearance(DemTable demTable, float objectWidth, float objectBreadth, float objectHeight)
demTable
- the DemTable objectobjectWidth
- the object's widthobjectBreadth
- the object's breadthobjectHeight
- the object's heightpublic DEM3dAppearance(DemTable demTable, float objectWidth, float objectBreadth, float objectHeight, java.awt.image.BufferedImage bufferedImage)
demTable
- the DemTable objectobjectWidth
- the object's widthobjectBreadth
- the object's breadthobjectHeight
- the object's heightbufferedImage
- the object's textureMethod Detail |
---|
public java.awt.image.BufferedImage getTexture()
public void setPolygonMode(int polygonMode)
polygonMode
- the mode in which the object's polygons are displayed. Possible parameters are
PolygonAttributes.POLYGON_FILL (or 2), PolygonAttributes.POLYGON_LINE (or 1), and
PolygonAttributes.POLYGON_POINT (or 0). This is initially set to fill.public void setTextureBlendColor(Color4f blendColor)
blendColor
- the color for the blend texture mode. This is initially set to black.public Color4f getTextureBlendColor()
public void setTextureMode(int textureMode)
textureMode
- the mode in which the texture is displayed. Possible parameters are
TextureAttributes.MODULATE (or 2), TextureAttributes.DECAL (or 3),
TextureAttributes.BLEND (or 4), and TextureAttributes.REPLACE (or 5).
This is initially set to modulate.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |