Package xj3d.filter.node
Class Material
java.lang.Object
xj3d.filter.node.BaseEncodable
xj3d.filter.node.Material
- All Implemented Interfaces:
Encodable
,IAppearanceChild
,IMaterial
Wrapper for the X3D Material node.
- Version:
- $Revision: 1.5 $
- Author:
- Rex Melton
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat
Field valuefloat[]
Field valuefloat[]
Field valuefloat
Field valuefloat[]
Field valuefloat
Field valueFields inherited from class xj3d.filter.node.BaseEncodable
bch, defName, fieldReader, handler, HANDLER_BINARY, HANDLER_NULL, HANDLER_STRING, handlerType, nodeName, sch, useName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the node fields to their initial valuesclone
(boolean full) Create and return a copy of this object.boolean
deepEquals
(Encodable enc) Compares this appearance to another and checks if all fields are the same and that all children fields are the same.void
encode()
Push the node contents to the ContentHandler.void
Set the value of the named field.void
Set the value of the named field.Methods inherited from class xj3d.filter.node.BaseEncodable
copy, getDefName, getMetadata, getNodeName, getUseName, setContentHandler, setDefName, setFieldReader, setMetadata, setUseName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xj3d.filter.node.Encodable
getDefName, getNodeName, getUseName, setContentHandler, setDefName, setFieldReader, setUseName
-
Field Details
-
ambientIntensity
public float ambientIntensityField value -
diffuseColor
public float[] diffuseColorField value -
emissiveColor
public float[] emissiveColorField value -
shininess
public float shininessField value -
specularColor
public float[] specularColorField value -
transparency
public float transparencyField value
-
-
Constructor Details
-
Material
public Material()Constructor -
Material
-
-
Method Details
-
clear
public void clear()Clear the node fields to their initial values- Specified by:
clear
in interfaceEncodable
- Overrides:
clear
in classBaseEncodable
-
encode
public void encode()Push the node contents to the ContentHandler.- Specified by:
encode
in interfaceEncodable
- Overrides:
encode
in classBaseEncodable
-
setValue
-
setValue
Set the value of the named field.- Specified by:
setValue
in interfaceEncodable
- Overrides:
setValue
in classBaseEncodable
- Parameters:
name
- The name of the field to set.value
- The value of the field.len
- The number of values in the array.
-
clone
Create and return a copy of this object.- Specified by:
clone
in interfaceEncodable
- Overrides:
clone
in classBaseEncodable
- Parameters:
full
- true if the clone should contain a copy of the complete contents of this node and it's children, false returns a new instance of this node type.- Returns:
- a copy of this.
-
deepEquals
Description copied from class:BaseEncodable
Compares this appearance to another and checks if all fields are the same and that all children fields are the same.- Specified by:
deepEquals
in interfaceEncodable
- Overrides:
deepEquals
in classBaseEncodable
- Returns:
-