Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLAppearanceNodeType

All Superinterfaces:
FrameStateListener, VRMLNode, VRMLNodeType
All Known Subinterfaces:
J3DAppearanceNodeType, OGLAppearanceNodeType

public interface VRMLAppearanceNodeType
extends VRMLNodeType

Node which represents appearance attributes of an object.

The representation is a fraction more relaxed than the standard VRML appearance node. Here we allow arbitrary material node types and the textures are any type (which may include procedural textures, environment maps and 3D texturing).

Version:
$Revision: 1.13 $
Author:
Alan Hudson

Method Summary
 VRMLNodeType getFillProperties()
          Get the current fill properties used by the appearance.
 VRMLNodeType getLineProperties()
          Get the current line properties used by the appearance.
 VRMLNodeType getMaterial()
          Get the current material used by the appearance.
 VRMLNodeType getTexture()
          Get the current texture used by the appearance.
 VRMLNodeType getTextureTransform()
          Get the current texture transform used by the appearance.
 void setCCW(boolean ccw)
          Specify whether the geometry's triangles are in counter clockwise order (the default) or clockwise.
 void setFillProperties(VRMLNodeType prop)
          Set the fill properties that should be used for this appearance.
 void setLightingEnabled(boolean enable)
          Set whether lighting will be used for this appearance.
 void setLineProperties(VRMLNodeType prop)
          Set the line properties that should be used for this appearance.
 void setLocalColor(boolean enable)
          Set whether the geometry has local colors to override the diffuse color.
 void setMaterial(VRMLNodeType newMaterial)
          Set the material that should be used for this appearance.
 void setSolid(boolean solid)
          Specify whether an object is solid.
 void setTexture(VRMLNodeType newTexture)
          Set the texture that should be used for this appearance.
 void setTextureTransform(VRMLNodeType newTransform)
          Set the texture transform that should be used for this appearance.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, getFieldValue, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, 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
 

Method Detail

setMaterial

public void setMaterial(VRMLNodeType newMaterial)
                 throws InvalidFieldValueException
Set the material that should be used for this appearance. Setting a value of null will clear the current material.

Parameters:
newMaterial - The new material instance to be used.
Throws:
InvalidFieldValueException - The node does not match the required type.

getMaterial

public VRMLNodeType getMaterial()
Get the current material used by the appearance. If none has been set this will return null.

Returns:
The currently set Material

setTexture

public void setTexture(VRMLNodeType newTexture)
                throws InvalidFieldValueException
Set the texture that should be used for this appearance. Setting a value of null will clear the current texture.

Parameters:
newTexture - The new texture instance to be used.
Throws:
InvalidFieldValueException - The node does not match the required type.

getTexture

public VRMLNodeType getTexture()
Get the current texture used by the appearance. If none has been sety this will return null.

Returns:
The currently set Texture

setTextureTransform

public void setTextureTransform(VRMLNodeType newTransform)
                         throws InvalidFieldValueException
Set the texture transform that should be used for this appearance. Setting a value of null will clear the current texture transform.

Parameters:
newTransform - The new texture transform instance to be used.
Throws:
InvalidFieldValueException - The node does not match the required type.

getTextureTransform

public VRMLNodeType getTextureTransform()
Get the current texture transform used by the appearance. If none has been sety this will return null.

Returns:
The currently set TextureTransform

setLineProperties

public void setLineProperties(VRMLNodeType prop)
                       throws InvalidFieldValueException
Set the line properties that should be used for this appearance. Setting a value of null will clear the current property setting.

Parameters:
prop - The new property instance to be used or null
Throws:
InvalidFieldValueException - The node does not match the required type.

getLineProperties

public VRMLNodeType getLineProperties()
Get the current line properties used by the appearance. If none has been set this will return null.

Returns:
The currently set LineProperties

setFillProperties

public void setFillProperties(VRMLNodeType prop)
                       throws InvalidFieldValueException
Set the fill properties that should be used for this appearance. Setting a value of null will clear the current property setting.

Parameters:
prop - The new property instance to be used or null
Throws:
InvalidFieldValueException - The node does not match the required type.

getFillProperties

public VRMLNodeType getFillProperties()
Get the current fill properties used by the appearance. If none has been set this will return null.

Returns:
The currently set FillProperties node

setSolid

public void setSolid(boolean solid)
Specify whether an object is solid. The default is true. This will determine if we do backface culling and flip backface normals. Can only be set during setup

Parameters:
solid - Whether the object is solid

setLightingEnabled

public void setLightingEnabled(boolean enable)
Set whether lighting will be used for this appearance. In general you should let the material node decide this. Needed to handle IndexedLineSets or other geometry that specifically declares lighting be turned off. This method will notify the related Material node for this Appearance.

Parameters:
enable - Whether lighting is enabled

setLocalColor

public void setLocalColor(boolean enable)
Set whether the geometry has local colors to override the diffuse color.

Parameters:
enable - Whether local color is enabled

setCCW

public void setCCW(boolean ccw)
Specify whether the geometry's triangles are in counter clockwise order (the default) or clockwise. The default is true. This will determine if we do backface culling and flip backface normals. Can only be set during setup

Parameters:
ccw - True for counter-clockwise ordering

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium