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
ConstructorDescriptionCreates a VariableMapping.VariableMapping
(ShaderNodeVariable leftVariable, String leftSwizzling, ShaderNodeVariable rightVariable, String rightSwizzling, String condition) Creates a VariableMapping. -
Method Summary
Modifier and TypeMethodDescriptionprotected VariableMapping
clone()
Gets the condition.Gets the left swizzle.Gets the left variable.Gets the right expression.Gets the right swizzle.Gets the right variable.void
read
(JmeImporter im) jme serialization (not used)void
setCondition
(String condition) Sets the condition.void
setLeftSwizzling
(String leftSwizzling) Sets the left swizzle.void
setLeftVariable
(ShaderNodeVariable leftVariable) Sets the left variable.void
setRightExpression
(String rightExpression) Sets the right expression.void
setRightSwizzling
(String rightSwizzling) Sets the right swizzle.void
setRightVariable
(ShaderNodeVariable rightVariable) Sets the right variable.toString()
void
write
(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:
write
in interfaceSavable
- Parameters:
ex
- the exporter- Throws:
IOException
- from the exporter
-
read
jme serialization (not used)- Specified by:
read
in interfaceSavable
- Parameters:
im
- the importer- Throws:
IOException
- from the importer
-
toString
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-