|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseTextureNode
org.web3d.vrml.renderer.common.nodes.BaseTexture2DNode
public abstract class BaseTexture2DNode
Base implementation of a 2D texture object.
Performs the VRML field handling for REPEAT_S and REPEAT_T.
| Field Summary | |
|---|---|
protected static int |
FIELD_REPEATS
Field Index for the common repeatS field |
protected static int |
FIELD_REPEATT
Field Index for the common repeatT field |
protected static int |
FIELD_TEXTURE_PROPERTIES
Field Index for the textureProperties field that is available from 3.2 or later specs. |
protected NIOBufferImage |
implImage
The base image for this texture |
protected static int |
LAST_TEXTURENODETYPE_INDEX
Index of the last common field for all 2D textures |
protected VRMLProtoInstance |
pTextureProperties
PROTO version of the textureProperties node |
protected static java.lang.String |
TEXPROPS_VERSION_MSG
Message when accessing the texture properties field in a file with the spec version earlier than 3.2. |
protected static java.lang.String |
TEXTURE_PROPS_NODE_MSG
Message for when the node in setValue() is not a TextureProperty |
protected static java.lang.String |
TEXTURE_PROPS_PROTO_MSG
Message for when the proto is not a TextureProperties |
protected boolean |
vfRepeatS
field SFBool repeatS TRUE |
protected boolean |
vfRepeatT
field SFBool repeatT TRUE |
protected VRMLTextureProperties2DNodeType |
vfTextureProperties
inputOutput SFNode textureProperties main field |
| Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseTextureNode |
|---|
listenerList |
| Fields inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode |
|---|
BAD_NODE_MSG, errorReporter, FIELD_METADATA, fieldLocalData, hasChanged, INIT_ONLY_WRITE_MSG, inSetup, isDEF, isStatic, LAST_NODE_INDEX, layerIds, METADATA_NODE_MSG, METADATA_PROTO_MSG, nodeName, pMetadata, refCounts, removedLayerIds, stateManager, vfMetadata, vrmlMajorVersion, vrmlMinorVersion |
| Constructor Summary | |
|---|---|
BaseTexture2DNode(java.lang.String name)
Default constructor for the node. |
|
| Method Summary | |
|---|---|
protected void |
copy(VRMLTexture2DNodeType node)
Set the fields of the grouping node that has the fields set based on the fields of the passed in node. |
VRMLFieldData |
getFieldValue(int index)
Get the value of a field. |
NIOBufferImage |
getImage()
Get the image representation of this texture. |
boolean |
getRepeatS()
Get the value of field repeatS. |
boolean |
getRepeatT()
Get the value of field repeatT. |
VRMLNodeType |
getTextureProperties()
Get node content for the textureProperties field. |
int |
getTextureType()
Get the texture type of this texture. |
void |
sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
Send a routed value from this node to the given destination node. |
void |
setTextureProperties(VRMLNodeType props)
Set node content as replacement for the textureProperties field. |
void |
setupFinished()
Notification that the construction phase of this node has finished. |
void |
setValue(int index,
boolean value)
Set the value of the field at the given index as an boolean. |
void |
setValue(int index,
VRMLNodeType child)
Set the value of the field at the given index as a node. |
| Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseTextureNode |
|---|
addTextureListener, fireTextureImageChanged, fireTextureParamsChanged, getCacheString, removeTextureListener |
| Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode |
|---|
addNodeListener, allEventsComplete, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getSecondaryType, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, updateRefCount, updateRefs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLTextureNodeType |
|---|
addTextureListener, getCacheString, removeTextureListener |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType |
|---|
addNodeListener, clearRemovedLayerIds, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount |
| Methods inherited from interface org.web3d.vrml.lang.VRMLNode |
|---|
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion |
| Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener |
|---|
allEventsComplete |
| Field Detail |
|---|
protected static final int FIELD_REPEATS
protected static final int FIELD_REPEATT
protected static final int FIELD_TEXTURE_PROPERTIES
protected static final int LAST_TEXTURENODETYPE_INDEX
protected static final java.lang.String TEXTURE_PROPS_PROTO_MSG
protected static final java.lang.String TEXTURE_PROPS_NODE_MSG
protected static final java.lang.String TEXPROPS_VERSION_MSG
protected boolean vfRepeatS
protected boolean vfRepeatT
protected VRMLProtoInstance pTextureProperties
protected VRMLTextureProperties2DNodeType vfTextureProperties
protected NIOBufferImage implImage
| Constructor Detail |
|---|
public BaseTexture2DNode(java.lang.String name)
name - The name of the type of node| Method Detail |
|---|
protected void copy(VRMLTexture2DNodeType node)
node - The grouping node to copy info frompublic int getTextureType()
getTextureType in interface VRMLTextureNodeTypepublic NIOBufferImage getImage()
getImage in interface VRMLTexture2DNodeTypepublic boolean getRepeatS()
true.
getRepeatS in interface VRMLTexture2DNodeTypepublic boolean getRepeatT()
true.
getRepeatT in interface VRMLTexture2DNodeType
public VRMLNodeType getTextureProperties()
throws InvalidFieldException
getTextureProperties in interface VRMLTexture2DNodeTypeInvalidFieldException - This field was request in a field with
spec version < 3.2
public void setTextureProperties(VRMLNodeType props)
throws InvalidFieldValueException,
InvalidFieldException
setTextureProperties in interface VRMLTexture2DNodeTypeprops - The new value for geometry. Null will act like delete
InvalidFieldValueException - The node does not match the required
type.
InvalidFieldException - This field was request in a field with
spec version < 3.2public void setupFinished()
setupFinished in interface VRMLNodeTypesetupFinished in class AbstractNode
public VRMLFieldData getFieldValue(int index)
throws InvalidFieldException
getFieldValue in interface VRMLNodeTypegetFieldValue in class AbstractNodeindex - The index of the field to change.
InvalidFieldException - The field index is not known
public void sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
sendRoute in interface VRMLNodeTypesendRoute in class AbstractNodetime - The time that this route occurred (not necessarily epoch
time. Should be treated as a relative value only)srcIndex - The index of the field in this node that the value
should be sent fromdestNode - The node reference that we will be sending the value todestIndex - The index of the field in the destination node that
the value should be sent to.
public void setValue(int index,
boolean value)
throws InvalidFieldException
setValue in interface VRMLNodeTypesetValue in class AbstractNodeindex - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not know
public void setValue(int index,
VRMLNodeType child)
throws InvalidFieldException,
InvalidFieldValueException
setValue in interface VRMLNodeTypesetValue in class AbstractNodeindex - The index of destination field to setchild - The new value to use for the node
InvalidFieldValueException - The node does not match the required
type.
InvalidFieldException - This field was request in a field with
spec version < 3.2
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||