Constructor and Description |
---|
ShaderNodeVariable(java.lang.String type,
java.lang.String name)
creates a ShaderNodeVariable
|
ShaderNodeVariable(java.lang.String type,
java.lang.String nameSpace,
java.lang.String name)
creates a ShaderNodeVariable
|
ShaderNodeVariable(java.lang.String type,
java.lang.String nameSpace,
java.lang.String name,
java.lang.String multiplicity)
creates a ShaderNodeVariable
|
ShaderNodeVariable(java.lang.String type,
java.lang.String nameSpace,
java.lang.String name,
java.lang.String multiplicity,
java.lang.String prefix)
creates a ShaderNodeVariable
|
Modifier and Type | Method and Description |
---|---|
ShaderNodeVariable |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCondition() |
java.lang.String |
getDefaultValue()
Gets the default value of this variable.
|
java.lang.String |
getMultiplicity() |
java.lang.String |
getName()
returns the name
|
java.lang.String |
getNameSpace() |
java.lang.String |
getPrefix() |
java.lang.String |
getType() |
int |
hashCode() |
boolean |
isShaderOutput() |
void |
read(JmeImporter im)
jme serialization (not used)
|
void |
setCondition(java.lang.String condition)
sets the condition
|
void |
setDefaultValue(java.lang.String defaultValue)
Sets the default value of this variable.
|
void |
setMultiplicity(java.lang.String multiplicity)
sets the number of elements of this variable making it an array
this value can be a number of can be a define
|
void |
setName(java.lang.String name)
sets the name
|
void |
setNameSpace(java.lang.String nameSpace)
sets the nameSpace (can be the name of the shaderNode or
Global,Attr,MatParam,WorldParam)
|
void |
setPrefix(java.lang.String prefix)
Sets the variable prefix (m_ or g_)
|
void |
setShaderOutput(boolean shaderOutput)
sets to true if this variable is a shader output
|
void |
setType(java.lang.String type)
sets the glsl type
|
java.lang.String |
toString() |
void |
write(JmeExporter ex)
jme serialization (not used)
|
public ShaderNodeVariable(java.lang.String type, java.lang.String name)
type
- the glsl type of the variablename
- the name of the variablepublic ShaderNodeVariable(java.lang.String type, java.lang.String nameSpace, java.lang.String name, java.lang.String multiplicity)
type
- the glsl type of the variablenameSpace
- the nameSpace (can be the name of the shaderNode or
Global,Attr,MatParam,WorldParam)name
- the name of the variablemultiplicity
- the number of element if this variable is an array. Can be an Int of a declared material parameterpublic ShaderNodeVariable(java.lang.String type, java.lang.String nameSpace, java.lang.String name, java.lang.String multiplicity, java.lang.String prefix)
type
- the glsl type of the variablenameSpace
- the nameSpace (can be the name of the shaderNode or
Global,Attr,MatParam,WorldParam)name
- the name of the variablemultiplicity
- the number of element if this variable is an array. Can be an Int of a declared material parameterprefix
- the variable prefix to append at generation times. This is mostly to add the g_ and m_ for uniformspublic ShaderNodeVariable(java.lang.String type, java.lang.String nameSpace, java.lang.String name)
type
- the glsl type of the variablenameSpace
- the nameSpace (can be the name of the shaderNode or
Global,Attr,MatParam,WorldParam)name
- the name of the variablepublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the namepublic java.lang.String getType()
public void setType(java.lang.String type)
type
- the typepublic java.lang.String getNameSpace()
public java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
prefix
- the desired prefixpublic void setNameSpace(java.lang.String nameSpace)
nameSpace
- the desired nameSpacepublic java.lang.String getDefaultValue()
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- the default value of this variable.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
public java.lang.String getCondition()
public void setCondition(java.lang.String condition)
condition
- the conditionpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isShaderOutput()
public void setShaderOutput(boolean shaderOutput)
shaderOutput
- true if this variable is a shader outputpublic java.lang.String getMultiplicity()
public void setMultiplicity(java.lang.String multiplicity)
multiplicity
- the desired expressionpublic ShaderNodeVariable clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException