Package com.jme3.material
Class MatParamTexture
java.lang.Object
com.jme3.material.MatParam
com.jme3.material.MatParamTexture
A material parameter that holds a reference to a texture and its required color space.
 This class extends 
MatParam to provide texture specific functionalities.- 
Field Summary
- 
Constructor SummaryConstructorsConstructorDescriptionSerialization only.MatParamTexture(VarType type, String name, Texture texture, ColorSpace colorSpace) Constructs a new MatParamTexture instance with the specified type, name, texture, and color space.
- 
Method SummaryModifier and TypeMethodDescriptionGets the required color space for this texture parameter.Retrieves the texture associated with this material parameter.voidread(JmeImporter im) voidsetColorSpace(ColorSpace colorSpace) Set toColorSpace.Linearif the texture color space has to be forced to linear instead of sRGB.voidsetTextureValue(Texture value) Sets the texture associated with this material parameter.voidwrite(JmeExporter ex) Methods inherited from class com.jme3.material.MatParamclone, equals, getName, getPrefixedName, getValue, getValueAsString, getVarType, hashCode, isTypeCheckEnabled, setTypeCheckEnabled, setValue, toString
- 
Constructor Details- 
MatParamTextureConstructs a new MatParamTexture instance with the specified type, name, texture, and color space.- Parameters:
- type- the type of the material parameter
- name- the name of the parameter
- texture- the texture associated with this parameter
- colorSpace- the required color space for the texture
 
- 
MatParamTexturepublic MatParamTexture()Serialization only. Do not use.
 
- 
- 
Method Details- 
getTextureValueRetrieves the texture associated with this material parameter.- Returns:
- the texture object
 
- 
setTextureValueSets the texture associated with this material parameter.- Parameters:
- value- the texture object to set
- Throws:
- RuntimeException- if the provided value is not a- Texture
 
- 
getColorSpaceGets the required color space for this texture parameter.- Returns:
- the required color space (ColorSpace)
 
- 
setColorSpaceSet toColorSpace.Linearif the texture color space has to be forced to linear instead of sRGB.- Parameters:
- colorSpace- the desired color space
 
- 
write- Specified by:
- writein interface- Savable
- Overrides:
- writein class- MatParam
- Throws:
- IOException
 
- 
read- Specified by:
- readin interface- Savable
- Overrides:
- readin class- MatParam
- Throws:
- IOException
 
 
-