open class HotspotMaterial : Material
Author
dennis.ippel
HotspotMaterial(useTexture: Boolean) HotspotMaterial(useTexture: Boolean, discardAlpha: Boolean) |
var mCustomFragmentShader: FragmentShader! |
|
var mCustomVertexShader: VertexShader! |
|
var mLights: MutableList<ALight!>!
The lights that affect the material. Lights shouldn't be managed by any other class than |
|
val mNormalFloats: FloatArray!
Contains the normal matrix. The normal matrix is used in the shaders to transform the normal into eye space. |
|
var mNormalMatrix: Matrix4!
Scratch normal matrix. The normal matrix is used in the shaders to transform the normal into eye space. |
|
var mOwnerIdentity: String!
This texture's unique owner identity String. This is usually the fully qualified name of the |
|
var mPlugins: MutableList<IMaterialPlugin!>!
A list of material plugins that are used by this material. A material plugin is basically a class that contains a vertex shader fragment and a fragment shader fragment. Material plugins can be used for custom shader effects. |
|
var mTextureHandles: MutableMap<String!, Int!>! |
|
var mTextureList: ArrayList<ATexture!>!
The list of textures that are assigned by this materials. |
open fun getProgress(): Float |
|
open fun setBorderThickness(borderThickness: Float): Unit |
|
open fun setCircleCenter(center: Vector2!): Unit |
|
open fun setCircleRadius(circleRadius: Float): Unit |
|
open fun setProgress(progress: Float): Unit |
|
open fun setProgressColor(color: Int): Unit |
|
open fun setTextureRotationSpeed(textureRotationSpeed: Float): Unit |
|
open fun setTrackColor(color: Int): Unit |
open fun addPlugin(plugin: IMaterialPlugin!): Unit
Add a material plugin. A material plugin is basically a class that contains a vertex shader fragment and a fragment shader fragment. Material plugins can be used for custom shader effects. |
|
open fun addTexture(texture: ATexture!): Unit
Adds a texture to this material. Throws and error if the maximum number of textures was reached. |
|
open fun applyParams(): Unit
Applies parameters that should be set on the shaders. These are parameters like time, color, buffer handles, etc. |
|
open fun bindTextureByName(index: Int, texture: ATexture!): Unit open fun bindTextureByName(name: String!, index: Int, texture: ATexture!): Unit |
|
open fun bindTextures(): Unit
Binds the textures to an OpenGL texturing target. Called every frame by |
|
open fun copyTexturesTo(material: Material!): Unit
Copies this material's textures to another material. |
|
open fun createShaders(): Unit
Takes all material parameters and creates the vertex shader and fragment shader and then compiles the program. This method should only be called on initialization or when parameters have changed. |
|
open fun enableLighting(value: Boolean): Unit
Indicates whether lighting should be used or not. This must be set to true when using a |
|
open fun enableTime(value: Boolean): Unit
Indicates that the time shader parameter should be used. This is used when creating shaders that should change during the course of time. This is used to accomplish effects like animated vertices, vertex colors, plasma effects, etc. The time needs to be manually updated using the |
|
open fun getAmbientColor(): Int
Returns this material's ambient color. Ambient color is the color of an object where it is in shadow. |
|
open fun getColor(): Int
Returns this material's diffuse color. |
|
open fun getColorInfluence(): Float
Indicates the color influence. Use .5 for 50% color influence, .75 for 75% color influence, etc. |
|
open fun getDiffuseMethod(): IDiffuseMethod!
The diffuse method specifies the reflection of light from a surface such that an incident ray is reflected at many angles rather than at just one angle as in the case of specular reflection. This can be set using the setDiffuseMethod() method:
|
|
open fun getInverseViewMatrix(): FloatArray!
Returns the inverse view matrix. The inverse view matrix is used to transform reflections. |
|
open fun getModelViewMatrix(): FloatArray!
Returns the model view matrix. The model view matrix is used to transform vertices to eye coordinates. |
|
open fun getOwnerIdentity(): String! |
|
open fun getPlugin(pluginClass: Class<*>!): IMaterialPlugin!
Get a material plugin by using its class type. A material plugin is basically a class that contains a vertex shader fragment and a fragment shader fragment. Material plugins can be used for custom shader effects. |
|
open fun getSpecularMethod(): ISpecularMethod!
The specular method specifies the mirror-like reflection of light (or of other kinds of wave) from a surface, in which light from a single incoming direction (a ray) is reflected into a single outgoing direction. This can be set using the setSpecularMethod() method:
|
|
open fun getTextureList(): ArrayList<ATexture!>!
Gets a list of textures bound to this material. |
|
open fun getTime(): Float
Sets the time value that is used in the shaders to create animated effects. |
|
open fun lightingEnabled(): Boolean
Indicates whether lighting should be used or not. This must be set to true when using a |
|
open fun onPreFragmentShaderInitialize(fragmentShader: FragmentShader): Unit
Called prior to |
|
open fun onPreVertexShaderInitialize(vertexShader: VertexShader): Unit
Called prior to |
|
open fun removePlugin(plugin: IMaterialPlugin!): Unit
Remove a material plugin. A material plugin is basically a class that contains a vertex shader fragment and a fragment shader fragment. Material plugins can be used for custom shader effects. |
|
open fun removeTexture(texture: ATexture!): Unit
Removes a texture from this material. |
|
open fun setAmbientColor(color: Int): Unit open fun setAmbientColor(color: FloatArray!): Unit
This material's ambient color. Ambient color is the color of an object where it is in shadow. |
|
open fun setAmbientIntensity(r: Double, g: Double, b: Double): Unit open fun setAmbientIntensity(r: Float, g: Float, b: Float): Unit
This material's ambient intensity for the r, g, b channels. |
|
open fun setColor(color: Int): Unit open fun setColor(color: FloatArray!): Unit
The material's diffuse color. This can be overwritten by |
|
open fun setColorInfluence(influence: Float): Unit
The color influence indicates how big the influence of the color is. This should be used in conjunction with |
|
open fun setCurrentObject(currentObject: Object3D!): Unit |
|
open fun setDiffuseMethod(diffuseMethod: IDiffuseMethod!): Unit
The diffuse method specifies the reflection of light from a surface such that an incident ray is reflected at many angles rather than at just one angle as in the case of specular reflection. This can be set using the setDiffuseMethod() method:
|
|
open fun setInverseViewMatrix(inverseViewMatrix: Matrix4!): Unit
Sets the inverse view matrix. The inverse view matrix is used to transform reflections |
|
open fun setLights(lights: MutableList<ALight!>!): Unit
The lights that affect the material. Lights shouldn't be managed by any other class than |
|
open fun setModelMatrix(modelMatrix: Matrix4!): Unit
Sets the model matrix. The model matrix holds the object's local coordinates. |
|
open fun setModelViewMatrix(modelViewMatrix: Matrix4!): Unit
Sets the model view matrix. The model view matrix is used to transform vertices to eye coordinates |
|
open fun setMVPMatrix(mvpMatrix: Matrix4!): Unit
Sets the model view projection matrix. The model view projection matrix is used to transform vertices to screen coordinates. |
|
open fun setNormals(normalBufferHandle: Int): Unit open fun setNormals(bufferInfo: BufferInfo!): Unit
Set the normal buffer handle. This is passed to |
|
open fun setOwnerIdentity(identity: String!): Unit |
|
open fun setSpecularMethod(specularMethod: ISpecularMethod!): Unit
The specular method specifies the mirror-like reflection of light (or of other kinds of wave) from a surface, in which light from a single incoming direction (a ray) is reflected into a single outgoing direction. This can be set using the setSpecularMethod() method:
|
|
open fun setTextureCoords(textureCoordBufferHandle: Int): Unit open fun setTextureCoords(bufferInfo: BufferInfo!): Unit
Set the texture coordinates buffer handle. This is passed to |
|
open fun setTextureHandleForName(name: String): Unit |
|
open fun setTime(time: Float): Unit
Sets the time value that is used in the shaders to create animated effects. |
|
open fun setVertexColors(vertexColorBufferHandle: Int): Unit open fun setVertexColors(bufferInfo: BufferInfo!): Unit
Set the vertex color buffer handle. This is passed to |
|
open fun setVertices(vertexBufferHandle: Int): Unit open fun setVertices(bufferInfo: BufferInfo!): Unit
Set the vertex buffer handle. This is passed to |
|
open fun timeEnabled(): Boolean
Indicates that the time shader parameter should be used. This is used when creating shaders that should change during the course of time. This is used to accomplish effects like animated vertices, vertex colors, plasma effects, etc. The time needs to be manually updated using the |
|
open fun unbindTextures(): Unit
Unbinds the texture from an OpenGL texturing target. |
|
open fun unsetCurrentObject(currentObject: Object3D!): Unit |
|
open fun useProgram(): Unit
Tells the OpenGL context to use this program. This should be called every frame. |
|
open fun useVertexColors(value: Boolean): Unit
Indicates that this material should use a color value for every vertex. These colors are contained in a separate color buffer. |
|
open fun usingVertexColors(): Boolean
Indicates that this material should use a color value for every vertex. These colors are contained in a separate color buffer. |