|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.IndexedObject
javax.media.j3d.SceneGraphObjectRetained
javax.media.j3d.NodeComponentRetained
javax.media.j3d.TextureRetained
abstract class TextureRetained
The Texture object is a component object of an Appearance object that defines the texture properties used when texture mapping is enabled. Texture object is an abstract class and all texture objects must be created as either a Texture2D object or a Texture3D object.
Field Summary | |
---|---|
(package private) float |
anisotropicFilterDegree
|
(package private) int |
anisotropicFilterMode
|
(package private) static int |
BASE_LEVEL_CHANGED
|
(package private) int |
baseLevel
|
(package private) Color4f |
boundaryColor
|
(package private) int |
boundaryModeS
|
(package private) int |
boundaryModeT
|
(package private) int |
boundaryWidth
|
(package private) static int |
COLOR_CHANGED
|
(package private) boolean |
enable
|
(package private) static int |
ENABLE_CHANGED
|
(package private) float[] |
filter4FuncPts
|
(package private) int |
format
|
(package private) int |
height
|
(package private) static int |
IMAGE_CHANGED
|
(package private) ImageComponentRetained[][] |
images
|
(package private) static int |
IMAGES_CHANGED
|
(package private) java.util.ArrayList[][] |
imageUpdateInfo
|
(package private) int[] |
imageUpdatePruneMask
|
(package private) boolean |
isAlphaNeedUpdate
|
(package private) int |
isDirty
|
(package private) static int |
LOD_OFFSET_CHANGED
|
(package private) Point3f |
lodOffset
|
(package private) static int |
MAG_FILTER
|
(package private) int |
magFilter
|
(package private) static int |
MAX_LEVEL_CHANGED
|
(package private) static int |
MAX_LOD_CHANGED
|
(package private) int |
maximumLevel
|
(package private) float |
maximumLod
|
(package private) int |
maxLevels
|
private int |
maxMipMapLevels
|
(package private) static int |
MIN_FILTER
|
(package private) static int |
MIN_LOD_CHANGED
|
(package private) int |
minFilter
|
(package private) float |
minimumLod
|
(package private) int |
mipmapMode
|
(package private) int |
numFaces
|
(package private) int |
numSharpenTextureFuncPts
|
(package private) int |
objectId
|
(package private) int |
resourceCreationMask
|
(package private) int |
resourceInReloadList
|
(package private) java.lang.Object |
resourceLock
|
(package private) int |
resourceLodUpdatedMask
|
(package private) int |
resourceUpdatedMask
|
(package private) float[] |
sharpenTextureFuncPts
|
(package private) static int |
STATE_CHANGED
|
private int |
texTimestamp
|
private java.util.HashMap<RenderBin,java.lang.Integer> |
textureBinRefCount
|
(package private) static int |
UPDATE_IMAGE
|
private boolean |
useAsRaster
|
(package private) boolean |
userSpecifiedEnable
|
(package private) int |
width
|
private boolean |
widthOrHeightIsNPOT
|
Fields inherited from class javax.media.j3d.NodeComponentRetained |
---|
changedFrequent, compChanged, duplicateOnCloneTree, mirror, refCnt, refCount, users |
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained |
---|
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source |
Fields inherited from class javax.media.j3d.IndexedObject |
---|
listIdx |
Constructor Summary | |
---|---|
TextureRetained()
|
Method Summary | |
---|---|
(package private) void |
addImageUpdateInfo(int level,
int face,
ImageComponentUpdateInfo arg)
addImageUpdateInfo(int level) is to update a particular level. |
(package private) void |
bindTexture(Canvas3D cv)
|
(package private) void |
bindTexture(Context ctx,
int objectId,
boolean enable)
|
(package private) void |
checkImageSize(int level,
ImageComponent image)
|
(package private) void |
checkSizes(ImageComponentRetained[] images)
|
(package private) void |
clearLive(int refCount)
|
(package private) void |
createMirrorObject()
|
(package private) void |
decTextureBinRefCount(TextureBin tb)
|
(package private) void |
freeTextureId(int id)
|
(package private) float |
getAnisotropicFilterDegree()
|
(package private) int |
getAnisotropicFilterMode()
|
(package private) int |
getBaseLevel()
|
(package private) void |
getBoundaryColor(Color4f boundaryColor)
Retrieves the texture boundary color for this texture object. |
(package private) int |
getBoundaryModeS()
Retrieves the boundary mode for the S coordinate. |
(package private) int |
getBoundaryModeT()
Retrieves the boundary mode for the T coordinate. |
(package private) int |
getBoundaryWidth()
Retrieves the boundary width. |
(package private) boolean |
getEnable()
Retrieves the state of the texture enable flag. |
(package private) float[] |
getFilter4Func()
|
(package private) void |
getFilter4Func(float[] weights)
|
(package private) int |
getFilter4FuncPointsCount()
|
(package private) int |
getFormat()
|
(package private) int |
getHeight()
|
(package private) ImageComponent |
getImage(int level)
Gets a specified mipmap level. |
(package private) ImageComponent[] |
getImages()
|
(package private) void |
getLodOffset(Tuple3f offset)
|
(package private) int |
getMagFilter()
Retrieves the magnification filter. |
(package private) int |
getMaximumLevel()
|
(package private) float |
getMaximumLOD()
|
(package private) int |
getMinFilter()
Retrieves the minification filter. |
(package private) float |
getMinimumLOD()
|
(package private) int |
getMipMapMode()
Retrieves current mipmap mode. |
(package private) float[] |
getSharpenTextureFunc()
internal method only -- returns internal function points |
(package private) void |
getSharpenTextureFunc(float[] lod,
float[] pts)
Copies the array of sharpen texture LOD function points into the specified arrays |
(package private) void |
getSharpenTextureFunc(Point2f[] pts)
|
(package private) int |
getSharpenTextureFuncPointsCount()
Get number of points in the sharpen texture LOD function |
(package private) int |
getTextureBinRefCount(TextureBin tb)
|
(package private) int |
getTextureId()
|
(package private) int |
getWidth()
|
(package private) void |
handleFrequencyChange(int bit)
|
(package private) void |
incTextureBinRefCount(TextureBin tb)
|
(package private) void |
initAnisotropicFilterDegree(float degree)
|
(package private) void |
initAnisotropicFilterMode(int mode)
Set Anisotropic Filter |
(package private) void |
initBaseLevel(int level)
|
(package private) void |
initBoundaryColor(Color4f boundaryColor)
Sets the texture boundary color for this texture object. |
(package private) void |
initBoundaryColor(float r,
float g,
float b,
float a)
Sets the texture boundary color for this texture object. |
(package private) void |
initBoundaryModeS(int boundaryModeS)
Sets the boundary mode for the S coordinate in this texture object. |
(package private) void |
initBoundaryModeT(int boundaryModeT)
Sets the boundary mode for the T coordinate in this texture object. |
(package private) void |
initEnable(boolean state)
Enables or disables texture mapping for this appearance component object. |
(package private) void |
initFilter4Func(float[] weights)
|
(package private) void |
initialize(int format,
int width,
int widLevels,
int height,
int heiLevels,
int mipmapMode,
int boundaryWidth)
|
(package private) void |
initImage(int level,
ImageComponent image)
Sets a specified mipmap level. |
(package private) void |
initImages(ImageComponent[] images)
|
(package private) void |
initLodOffset(float s,
float t,
float r)
|
(package private) void |
initMagFilter(int magFilter)
Sets the magnification filter function. |
(package private) void |
initMaximumLevel(int level)
|
(package private) void |
initMaximumLOD(float lod)
|
(package private) void |
initMinFilter(int minFilter)
Sets the minification filter function. |
(package private) void |
initMinimumLOD(float lod)
|
(package private) void |
initMipMapMode(int mipmapMode)
Sets mipmap mode for texture mapping for this texture object. |
(package private) void |
initMirrorObject()
Initializes a mirror object, point the mirror object to the retained object if the object is not editable |
(package private) void |
initSharpenTextureFunc(float[] pts)
|
(package private) void |
initSharpenTextureFunc(float[] lod,
float[] pts)
Set Sharpen Texture function |
(package private) void |
initSharpenTextureFunc(Point2f[] pts)
|
private boolean |
isEnabled(Canvas3D cv)
|
private static boolean |
isPowerOfTwo(int val)
|
(package private) boolean |
isUseAsRaster()
|
(package private) void |
notifyImageComponentImageChanged(ImageComponentRetained image,
ImageComponentUpdateInfo value)
|
(package private) int |
numMipMapLevels()
|
(package private) void |
pruneImageUpdateInfo()
Go through the image update info list and remove those that are already done by all the resources |
(package private) void |
reloadTexture(Canvas3D cv)
|
(package private) void |
reloadTextureImage(Canvas3D cv,
int face,
int level,
ImageComponentRetained image,
int numLevels)
reloadTextureImage is used to load a particular level of image This method needs to take care of RenderedImage as well as BufferedImage |
(package private) void |
reloadTextureSharedContext(Canvas3D cv)
reloadTextureSharedContext is called to reload texture on a shared context. |
(package private) void |
reloadTextureSubImage(Canvas3D cv,
int face,
int level,
ImageComponentUpdateInfo info,
ImageComponentRetained image)
update a subregion of the texture image This method needs to take care of RenderedImage as well as BufferedImage |
(package private) void |
sendMessage(int attrMask,
java.lang.Object attr)
|
(package private) void |
setBaseLevel(int level)
|
(package private) void |
setEnable(boolean state)
Enables or disables texture mapping for this appearance component object and sends a message notifying the interested structures of the change. |
(package private) void |
setImage(int level,
ImageComponent image)
|
(package private) void |
setImages(ImageComponent[] images)
|
(package private) void |
setLive(boolean backgroundGroup,
int refCount)
|
(package private) void |
setLodOffset(float s,
float t,
float r)
|
(package private) void |
setMaximumLevel(int level)
|
(package private) void |
setMaximumLOD(float lod)
|
(package private) void |
setMinimumLOD(float lod)
|
private void |
setTextureBinRefCount(TextureBin tb,
int refCount)
|
(package private) void |
setUseAsRaster(boolean useAsRaster)
|
(package private) void |
updateMirrorObject(int component,
java.lang.Object value)
Update the "component" field of the mirror object with the given "value" |
(package private) void |
updateNative(Canvas3D cv)
updateNative is called while traversing the RenderBin to update the texture state |
(package private) void |
updateResourceCreationMask()
|
(package private) void |
updateTexture(Canvas3D cv,
int resourceBit)
|
(package private) void |
updateTextureAnisotropicFilter(Context ctx,
float degree)
|
(package private) void |
updateTextureBoundary(Canvas3D cv)
|
(package private) void |
updateTextureBoundary(Context ctx,
int boundaryModeS,
int boundaryModeT,
float boundaryRed,
float boundaryGreen,
float boundaryBlue,
float boundaryAlpha)
|
(package private) void |
updateTextureDimensions(Canvas3D cv)
load level 0 explicitly with null pointer to enable mipmapping when level 0 is not the base level |
(package private) void |
updateTextureFields(Canvas3D cv)
|
(package private) void |
updateTextureFilter4Func(Context ctx,
int numFilter4FuncPts,
float[] filter4FuncPts)
|
(package private) void |
updateTextureFilterModes(Context ctx,
int minFilter,
int magFilter)
|
(package private) void |
updateTextureImage(Canvas3D cv,
int face,
int numLevels,
int level,
int textureFormat,
int imageFormat,
int width,
int height,
int boundaryWidth,
int imageDataType,
java.lang.Object data)
|
(package private) void |
updateTextureLOD(Canvas3D cv)
|
(package private) void |
updateTextureLodOffset(Context ctx,
float lodOffsetX,
float lodOffsetY,
float lodOffsetZ)
|
(package private) void |
updateTextureLodRange(Context ctx,
int baseLevel,
int maximumLevel,
float minimumLod,
float maximumLod)
|
(package private) void |
updateTextureSharpenFunc(Context ctx,
int numSharpenTextureFuncPts,
float[] sharpenTextureFuncPts)
|
(package private) void |
updateTextureSubImage(Canvas3D cv,
int face,
int level,
int xoffset,
int yoffset,
int textureFormat,
int imageFormat,
int imgXOffset,
int imgYOffset,
int tilew,
int width,
int height,
int imageDataType,
java.lang.Object data)
|
(package private) boolean |
useAutoMipMapGeneration(Canvas3D cv)
|
(package private) void |
validate()
|
Methods inherited from class javax.media.j3d.NodeComponentRetained |
---|
addAMirrorUser, addUser, clone, copyMirrorUsers, decRefCnt, doSetLive, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, notifyUsers, removeAMirrorUser, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, setFrequencyChangeMask, setInImmCtx |
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained |
---|
clearLive, clearLive, compile, doSetLive, doSetLive, getSource, getVirtualUniverse, isInSetLive, isStatic, markAsLive, merge, mergeTransform, setCompiled, setLive, setLive, setSource, traverse |
Methods inherited from class javax.media.j3d.IndexedObject |
---|
getIdxUsed, incIdxUsed |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int ENABLE_CHANGED
static final int COLOR_CHANGED
static final int IMAGE_CHANGED
static final int STATE_CHANGED
static final int UPDATE_IMAGE
static final int IMAGES_CHANGED
static final int BASE_LEVEL_CHANGED
static final int MAX_LEVEL_CHANGED
static final int MIN_LOD_CHANGED
static final int MAX_LOD_CHANGED
static final int LOD_OFFSET_CHANGED
static final int MIN_FILTER
static final int MAG_FILTER
int boundaryWidth
int boundaryModeS
int boundaryModeT
int minFilter
int magFilter
int isDirty
Color4f boundaryColor
int objectId
int mipmapMode
int format
int width
int height
private boolean widthOrHeightIsNPOT
ImageComponentRetained[][] images
int maxLevels
private int maxMipMapLevels
int numFaces
int baseLevel
int maximumLevel
float minimumLod
float maximumLod
Point3f lodOffset
private boolean useAsRaster
boolean enable
boolean userSpecifiedEnable
boolean isAlphaNeedUpdate
int numSharpenTextureFuncPts
float[] sharpenTextureFuncPts
float[] filter4FuncPts
int anisotropicFilterMode
float anisotropicFilterDegree
int resourceCreationMask
int resourceUpdatedMask
int resourceLodUpdatedMask
int resourceInReloadList
java.util.ArrayList[][] imageUpdateInfo
int[] imageUpdatePruneMask
private java.util.HashMap<RenderBin,java.lang.Integer> textureBinRefCount
private int texTimestamp
java.lang.Object resourceLock
Constructor Detail |
---|
TextureRetained()
Method Detail |
---|
private static boolean isPowerOfTwo(int val)
void initialize(int format, int width, int widLevels, int height, int heiLevels, int mipmapMode, int boundaryWidth)
final int getFormat()
final int getWidth()
final int getHeight()
final int numMipMapLevels()
final void initBoundaryModeS(int boundaryModeS)
boundaryModeS
- the boundary mode for the S coordinate,
one of: CLAMP or WRAP.
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.final int getBoundaryModeS()
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.final void initBoundaryModeT(int boundaryModeT)
boundaryModeT
- the boundary mode for the T coordinate,
one of: CLAMP or WRAP.
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.final int getBoundaryModeT()
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.final int getBoundaryWidth()
final void initMinFilter(int minFilter)
minFilter
- the minification filter, one of:
FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
MULTI_LEVEL_POINT, MULTI_LEVEL_LINEAR.
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.final int getMinFilter()
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.final void initMagFilter(int magFilter)
magFilter
- the magnification filter, one of:
FASTEST, NICEST, BASE_LEVEL_POINT, or BASE_LEVEL_LINEAR.
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.final int getMagFilter()
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.void initImage(int level, ImageComponent image)
level
- mipmap level to set: 0 is the base levelimage
- pixel array object containing the texture image
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.
java.lang.IllegalArgumentException
- if an ImageComponent3D
is used in a Texture2D or ImageComponent2D in Texture3D
power of 2 OR invalid format/mipmapMode is specified.final void checkImageSize(int level, ImageComponent image)
final void checkSizes(ImageComponentRetained[] images)
final void setImage(int level, ImageComponent image)
void initImages(ImageComponent[] images)
final void setImages(ImageComponent[] images)
final ImageComponent getImage(int level)
level
- mipmap level to get: 0 is the base level
RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.final ImageComponent[] getImages()
final void initMipMapMode(int mipmapMode)
mipMapMode
- the new mipmap mode for this object. One of:
BASE_LEVEL or MULTI_LEVEL_MIPMAP.
RestrictedAccessException
- if the method is calledfinal int getMipMapMode()
RestrictedAccessException
- if the method is calledfinal void initEnable(boolean state)
state
- true or false to enable or disable texture mappingfinal void setEnable(boolean state)
state
- true or false to enable or disable texture mappingfinal boolean getEnable()
final void initBaseLevel(int level)
final void setBaseLevel(int level)
final int getBaseLevel()
final void initMaximumLevel(int level)
final void setMaximumLevel(int level)
final int getMaximumLevel()
final void initMinimumLOD(float lod)
final void setMinimumLOD(float lod)
final float getMinimumLOD()
final void initMaximumLOD(float lod)
final void setMaximumLOD(float lod)
final float getMaximumLOD()
final void initLodOffset(float s, float t, float r)
final void setLodOffset(float s, float t, float r)
final void getLodOffset(Tuple3f offset)
final void initBoundaryColor(Color4f boundaryColor)
boundaryColor
- the new texture boundary color.final void initBoundaryColor(float r, float g, float b, float a)
r
- the red component of the color.g
- the green component of the color.b
- the blue component of the color.a
- the alpha component of the color.final void getBoundaryColor(Color4f boundaryColor)
boundaryColor
- the vector that will receive the
current texture boundary color.final void initAnisotropicFilterMode(int mode)
final int getAnisotropicFilterMode()
final void initAnisotropicFilterDegree(float degree)
final float getAnisotropicFilterDegree()
final void initSharpenTextureFunc(float[] lod, float[] pts)
final void initSharpenTextureFunc(Point2f[] pts)
final void initSharpenTextureFunc(float[] pts)
final int getSharpenTextureFuncPointsCount()
final void getSharpenTextureFunc(float[] lod, float[] pts)
final void getSharpenTextureFunc(Point2f[] pts)
final void initFilter4Func(float[] weights)
final int getFilter4FuncPointsCount()
final void getFilter4Func(float[] weights)
final float[] getSharpenTextureFunc()
final float[] getFilter4Func()
void setLive(boolean backgroundGroup, int refCount)
setLive
in class NodeComponentRetained
void clearLive(int refCount)
clearLive
in class NodeComponentRetained
void bindTexture(Context ctx, int objectId, boolean enable)
void updateTextureBoundary(Context ctx, int boundaryModeS, int boundaryModeT, float boundaryRed, float boundaryGreen, float boundaryBlue, float boundaryAlpha)
void updateTextureFilterModes(Context ctx, int minFilter, int magFilter)
void updateTextureSharpenFunc(Context ctx, int numSharpenTextureFuncPts, float[] sharpenTextureFuncPts)
void updateTextureFilter4Func(Context ctx, int numFilter4FuncPts, float[] filter4FuncPts)
void updateTextureAnisotropicFilter(Context ctx, float degree)
void updateTextureLodRange(Context ctx, int baseLevel, int maximumLevel, float minimumLod, float maximumLod)
void updateTextureLodOffset(Context ctx, float lodOffsetX, float lodOffsetY, float lodOffsetZ)
int getTextureId()
void freeTextureId(int id)
private boolean isEnabled(Canvas3D cv)
void bindTexture(Canvas3D cv)
void updateTextureDimensions(Canvas3D cv)
void updateTextureLOD(Canvas3D cv)
void updateTextureBoundary(Canvas3D cv)
void updateTextureFields(Canvas3D cv)
void updateTextureImage(Canvas3D cv, int face, int numLevels, int level, int textureFormat, int imageFormat, int width, int height, int boundaryWidth, int imageDataType, java.lang.Object data)
void updateTextureSubImage(Canvas3D cv, int face, int level, int xoffset, int yoffset, int textureFormat, int imageFormat, int imgXOffset, int imgYOffset, int tilew, int width, int height, int imageDataType, java.lang.Object data)
void reloadTextureImage(Canvas3D cv, int face, int level, ImageComponentRetained image, int numLevels)
void reloadTextureSubImage(Canvas3D cv, int face, int level, ImageComponentUpdateInfo info, ImageComponentRetained image)
void reloadTexture(Canvas3D cv)
void updateTexture(Canvas3D cv, int resourceBit)
void reloadTextureSharedContext(Canvas3D cv)
void updateNative(Canvas3D cv)
void createMirrorObject()
createMirrorObject
in class NodeComponentRetained
void initMirrorObject()
initMirrorObject
in class NodeComponentRetained
boolean useAutoMipMapGeneration(Canvas3D cv)
void pruneImageUpdateInfo()
void addImageUpdateInfo(int level, int face, ImageComponentUpdateInfo arg)
void validate()
void updateMirrorObject(int component, java.lang.Object value)
updateMirrorObject
in class NodeComponentRetained
void notifyImageComponentImageChanged(ImageComponentRetained image, ImageComponentUpdateInfo value)
void updateResourceCreationMask()
void incTextureBinRefCount(TextureBin tb)
void decTextureBinRefCount(TextureBin tb)
final void sendMessage(int attrMask, java.lang.Object attr)
void handleFrequencyChange(int bit)
handleFrequencyChange
in class SceneGraphObjectRetained
void setUseAsRaster(boolean useAsRaster)
boolean isUseAsRaster()
int getTextureBinRefCount(TextureBin tb)
private void setTextureBinRefCount(TextureBin tb, int refCount)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |