Package com.jme3.shader
Enum Class VarType
- All Implemented Interfaces:
Serializable
,Comparable<VarType>
,Constable
Enum representing various GLSL variable types and their corresponding Java types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the GLSL type name(s) associated with this VarType.Class<?>[]
Get the java types mapped to this VarTypeboolean
Returns whether this VarType represents an image type.boolean
Check if the passed object is of a type mapped to this VarTypeboolean
Returns whether this VarType represents a texture sampler type.boolean
Returns whether this VarType uses multiple data elements (e.g.static VarType
Returns the enum constant of this class with the specified name.static VarType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Float
-
Vector2
-
Vector3
-
Vector4
-
IntArray
-
FloatArray
-
Vector2Array
-
Vector3Array
-
Vector4Array
-
Int
-
Boolean
-
Matrix3
-
Matrix4
-
Matrix3Array
-
Matrix4Array
-
TextureBuffer
-
Texture2D
-
Texture3D
-
TextureArray
-
TextureCubeMap
-
Image2D
-
Image3D
-
UniformBufferObject
-
ShaderStorageBufferObject
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isOfType
Check if the passed object is of a type mapped to this VarType- Parameters:
o
- Object to check- Returns:
- true if the object type is mapped to this VarType
-
getJavaType
Get the java types mapped to this VarType- Returns:
- an array of classes mapped to this VarType
-
isTextureType
public boolean isTextureType()Returns whether this VarType represents a texture sampler type.- Returns:
- true if this is a texture type, false otherwise
-
isImageType
public boolean isImageType()Returns whether this VarType represents an image type.- Returns:
- true if this is an image type, false otherwise
-
usesMultiData
public boolean usesMultiData()Returns whether this VarType uses multiple data elements (e.g. arrays or matrices).- Returns:
- true if this type uses multiple data elements, false otherwise
-
getGlslType
Returns the GLSL type name(s) associated with this VarType.- Returns:
- the GLSL type string (e.g. "float", "vec3", "sampler2D")
-