Package com.jme3.shader
Class VariableMapping
java.lang.Object
com.jme3.shader.VariableMapping
Represents a mapping between 2 shader node variables or a left shader node variable and a value expression.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a VariableMapping.VariableMapping(ShaderNodeVariable leftVariable, String leftSwizzling, ShaderNodeVariable rightVariable, String rightSwizzling, String condition) Creates a VariableMapping. -
Method Summary
Modifier and TypeMethodDescriptionprotected VariableMappingclone()Gets the condition.Gets the left swizzle.Gets the left variable.Gets the right expression.Gets the right swizzle.Gets the right variable.voidread(JmeImporter im) jme serialization (not used)voidsetCondition(String condition) Sets the condition.voidsetLeftSwizzling(String leftSwizzling) Sets the left swizzle.voidsetLeftVariable(ShaderNodeVariable leftVariable) Sets the left variable.voidsetRightExpression(String rightExpression) Sets the right expression.voidsetRightSwizzling(String rightSwizzling) Sets the right swizzle.voidsetRightVariable(ShaderNodeVariable rightVariable) Sets the right variable.toString()voidwrite(JmeExporter ex) jme serialization (not used)
-
Constructor Details
-
VariableMapping
public VariableMapping()Creates a VariableMapping. -
VariableMapping
public VariableMapping(ShaderNodeVariable leftVariable, String leftSwizzling, ShaderNodeVariable rightVariable, String rightSwizzling, String condition) Creates a VariableMapping.- Parameters:
leftVariable- the left hand side variable of the expressionleftSwizzling- the swizzling of the left variablerightVariable- the right hand side variable of the expressionrightSwizzling- the swizzling of the right variablecondition- the condition for this mapping
-
-
Method Details
-
getLeftVariable
Gets the left variable.- Returns:
- the left variable.
-
setLeftVariable
Sets the left variable.- Parameters:
leftVariable- the left variable.
-
getRightVariable
Gets the right variable.- Returns:
- the right variable or null.
-
setRightVariable
Sets the right variable.- Parameters:
rightVariable- the right variable.
-
getRightExpression
Gets the right expression.- Returns:
- the right expression or null.
-
setRightExpression
Sets the right expression.- Parameters:
rightExpression- the right expression.
-
getCondition
Gets the condition.- Returns:
- the condition
-
setCondition
Sets the condition.- Parameters:
condition- the condition or null.
-
getLeftSwizzling
Gets the left swizzle.- Returns:
- the left swizzle or empty string.
-
setLeftSwizzling
Sets the left swizzle.- Parameters:
leftSwizzling- the left swizzle.
-
getRightSwizzling
Gets the right swizzle.- Returns:
- the right swizzle or empty string.
-
setRightSwizzling
Sets the right swizzle.- Parameters:
rightSwizzling- the right swizzle.
-
write
jme serialization (not used)- Specified by:
writein interfaceSavable- Parameters:
ex- the exporter- Throws:
IOException- from the exporter
-
read
jme serialization (not used)- Specified by:
readin interfaceSavable- Parameters:
im- the importer- Throws:
IOException- from the importer
-
toString
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-