KudanAR - Android  1.6.0
ARLightShader Class Reference

Inherits ARShaderProgram.

Public Member Functions

 ARLightShader (boolean hasReflection, boolean hasTexture, boolean hasAlpha, boolean hasBones, boolean hasMorph)
 
void setDiffuse (Vector3f diffuse)
 
void setAmbient (Vector3f ambient)
 
void setColour (Vector3f colour)
 
void setShininess (float shininess)
 
void setAlpha (float alpha)
 
void setReflectivity (float reflectivity)
 
void setSpecular (Vector3f specular)
 
void setUniforms ()
 
void setBones (List< Matrix4f > bones, int numberOfBones)
 
- Public Member Functions inherited from ARShaderProgram
void setShaderStrings (String vertexShaderString, String fragmentShaderString)
 
void compileShaders ()
 
void useProgram ()
 
void prepareRenderer ()
 

Static Public Member Functions

static ARLightShader getShader (boolean hasReflection, boolean hasTexture, boolean hasAlpha, boolean hasBones, boolean hasMorph)
 
- Static Public Member Functions inherited from ARShaderProgram
static int createShader (String vertexShaderSrc, String fragmentShaderSrc)
 
static void checkError ()
 

Additional Inherited Members

- Protected Attributes inherited from ARShaderProgram
int mShaderID
 

Detailed Description

A class a shader program for drawing ARLightMaterials.

Constructor & Destructor Documentation

◆ ARLightShader()

ARLightShader.ARLightShader ( boolean  hasReflection,
boolean  hasTexture,
boolean  hasAlpha,
boolean  hasBones,
boolean  hasMorph 
)

Initialises ARLightShader with settings.

Parameters
hasReflectionWhether the shader uses reflection.
hasTextureWhether the shader draws a texture.
hasAlphaWhether the shader draws an alpha layer.
hasBonesWhether the shader uses bones.
hasMorphWhether the shader uses blending.

Member Function Documentation

◆ getShader()

static ARLightShader ARLightShader.getShader ( boolean  hasReflection,
boolean  hasTexture,
boolean  hasAlpha,
boolean  hasBones,
boolean  hasMorph 
)
static

Returns the light shader.

Parameters
hasReflectionWhether the shader uses reflection.
hasTextureWhether the shader draws a texture.
hasAlphaWhether the shader draws an alpha layer.
hasBonesWhether the shader uses bones.
hasMorphWhether the shader uses blending.
Returns
ARLightShader

◆ setAlpha()

void ARLightShader.setAlpha ( float  alpha)

Sets material alpha.

Parameters
alphaas a float

◆ setAmbient()

void ARLightShader.setAmbient ( Vector3f  ambient)

Sets material ambient lighting.

Parameters
ambientlighting as a Vector3f

◆ setBones()

void ARLightShader.setBones ( List< Matrix4f >  bones,
int  numberOfBones 
)

Sets bones.

Parameters
bonesa List of Matrix4f bones
numberOfBones

◆ setColour()

void ARLightShader.setColour ( Vector3f  colour)

Sets material colour.

Parameters
colouras a Vector3f

◆ setDiffuse()

void ARLightShader.setDiffuse ( Vector3f  diffuse)

Sets material diffuse lighting.

Parameters
diffuselighting as a Vector3f

◆ setReflectivity()

void ARLightShader.setReflectivity ( float  reflectivity)

Sets material reflectivity.

Parameters
reflectivityas a float

◆ setShininess()

void ARLightShader.setShininess ( float  shininess)

Sets material shininess.

Parameters
shininessas a float

◆ setSpecular()

void ARLightShader.setSpecular ( Vector3f  specular)

Sets material specular lighting.

Parameters
specularlighting as a Vector3f

◆ setUniforms()

void ARLightShader.setUniforms ( )

Sets uniform shader values in OpenGL.


The documentation for this class was generated from the following file: