public class DefaultTechniqueModel extends AbstractNamedModelElement implements TechniqueModel
TechniqueModel| Constructor and Description |
|---|
DefaultTechniqueModel()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(java.lang.String attributeName,
java.lang.String parameterName)
Add the given attribute to this technique
|
void |
addParameter(java.lang.String parameterName,
TechniqueParametersModel techniqueParametersModel)
Add the given parameter to this technique
|
void |
addUniform(java.lang.String uniformName,
java.lang.String parameterName)
Add the given uniform to this technique
|
TechniqueParametersModel |
getAttributeParameters(java.lang.String attributeName)
Returns the
TechniqueParametersModel for the attribute
with the given name, or null if no such parameter
exists. |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns an unmodifiable map that maps attribute names to
parameter names
|
java.util.Map<java.lang.String,TechniqueParametersModel> |
getParameters()
Returns an unmodifiable map that maps parameter names to
TechniqueParametersModel instances |
ProgramModel |
getProgramModel()
Returns the
ProgramModel that is used for implementing this
technique |
TechniqueStatesModel |
getTechniqueStatesModel()
Returns the
TechniqueStatesModel, or null if the
default technique states should be used. |
TechniqueParametersModel |
getUniformParameters(java.lang.String uniformName)
Returns the
TechniqueParametersModel for the uniform
with the given name, or null if no such parameter
exists. |
java.util.Map<java.lang.String,java.lang.String> |
getUniforms()
Returns an unmodifiable map that maps uniform names to
parameter names
|
void |
setProgramModel(ProgramModel programModel)
Set the
ProgramModel |
void |
setTechniqueStatesModel(TechniqueStatesModel techniqueStatesModel)
Set the
TechniqueStatesModel |
getName, setNameaddExtension, getExtensions, getExtras, removeExtension, setExtensions, setExtrasclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNamegetExtensions, getExtraspublic void setProgramModel(ProgramModel programModel)
ProgramModelprogramModel - The ProgramModelpublic ProgramModel getProgramModel()
TechniqueModelProgramModel that is used for implementing this
techniquegetProgramModel in interface TechniqueModelProgramModelpublic java.util.Map<java.lang.String,TechniqueParametersModel> getParameters()
TechniqueModelTechniqueParametersModel instancesgetParameters in interface TechniqueModelpublic void addAttribute(java.lang.String attributeName,
java.lang.String parameterName)
attributeName - The attribute nameparameterName - The parameter namepublic void addParameter(java.lang.String parameterName,
TechniqueParametersModel techniqueParametersModel)
parameterName - The parameter nametechniqueParametersModel - The TechniqueParametersModelpublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
TechniqueModelgetAttributes in interface TechniqueModelpublic TechniqueParametersModel getAttributeParameters(java.lang.String attributeName)
TechniqueModelTechniqueParametersModel for the attribute
with the given name, or null if no such parameter
exists. This is a convenience function and equivalent to
techniqueModel.getParameters().get(
techniqueModel.getAttributes().get(attributeName));
,
handling null-cases accordingly.getAttributeParameters in interface TechniqueModelattributeName - The attribute nameTechniqueParametersModelpublic void addUniform(java.lang.String uniformName,
java.lang.String parameterName)
uniformName - The uniform nameparameterName - The parameter namepublic java.util.Map<java.lang.String,java.lang.String> getUniforms()
TechniqueModelgetUniforms in interface TechniqueModelpublic TechniqueParametersModel getUniformParameters(java.lang.String uniformName)
TechniqueModelTechniqueParametersModel for the uniform
with the given name, or null if no such parameter
exists. This is a convenience function and equivalent to
techniqueModel.getParameters().get(
techniqueModel.getUniforms().get(uniformName));
,
handling null-cases accordingly.getUniformParameters in interface TechniqueModeluniformName - The uniform nameTechniqueParametersModelpublic void setTechniqueStatesModel(TechniqueStatesModel techniqueStatesModel)
TechniqueStatesModeltechniqueStatesModel - The TechniqueStatesModelpublic TechniqueStatesModel getTechniqueStatesModel()
TechniqueModelTechniqueStatesModel, or null if the
default technique states should be used.getTechniqueStatesModel in interface TechniqueModelTechniqueStatesModelCopyright © 2022. All Rights Reserved.