KudanAR - Android  1.6.0
ARAlphaVideoTextureMaterial Class Reference

Inherits ARMaterial.

Public Member Functions

 ARAlphaVideoTextureMaterial ()
 
 ARAlphaVideoTextureMaterial (ARTextureOES texture)
 
void setTexture (ARTextureOES newTexture)
 
ARTextureOES getTexture ()
 
boolean prepareRendererWithNode (ARNode node)
 
void setUVTransform (float[]uvTransform)
 
- Public Member Functions inherited from ARMaterial
boolean getTransparent ()
 
void setTransparent (boolean transparent)
 
boolean getDepthOnly ()
 
void setDepthOnly (boolean depthOnly)
 
void setDepthWrite (boolean depthWrite)
 
boolean getDepthWrite ()
 
void setDepthTest (boolean depthTest)
 
boolean getDepthTest ()
 
void setName (String name)
 
String getName ()
 

Detailed Description

A material used to render alpha videos as an ARVideoTexture. Alpha Videos are videos specially created using the Kudan AR Toolkit. They are a series of images that are in two halves, with the left half containing the colour frames of the image on a white background and the right half containing an alpha mask. When these frames are encoded using the Kudan AR Toolkit, the resulting video is a .mp4 file playing the frames at the specified frame rate. When rendered using the framework, the two halves are combined together and the resulting video with transparency is displayed on its associated node.

Constructor & Destructor Documentation

◆ ARAlphaVideoTextureMaterial() [1/2]

ARAlphaVideoTextureMaterial.ARAlphaVideoTextureMaterial ( )

Initialises an empty ARAlphaVideoTextureMaterial to be loaded with values later.

◆ ARAlphaVideoTextureMaterial() [2/2]

ARAlphaVideoTextureMaterial.ARAlphaVideoTextureMaterial ( ARTextureOES  texture)

Initialises an ARAlphaVideoTextureMaterial with an ARTextureOES.

Parameters
textureThe texture to load into the material.

Member Function Documentation

◆ getTexture()

ARTextureOES ARAlphaVideoTextureMaterial.getTexture ( )

Returns the ARTextureOES currently loaded into this material, or null if empty.

Returns
The ARTextureOES used by the ARAlphaVideoTextureMaterial

◆ prepareRendererWithNode()

boolean ARAlphaVideoTextureMaterial.prepareRendererWithNode ( ARNode  node)

Prepares the renderer for drawing a node. Binds the ARAlphaVideoTextureShader for rendering and sets the UV transform and texture parameters.

Parameters
node
Returns
true

Reimplemented from ARMaterial.

◆ setTexture()

void ARAlphaVideoTextureMaterial.setTexture ( ARTextureOES  newTexture)

Sets the texture applied to the ARAlphaVideoTextureMaterial.

Parameters
newTextureThe ARTextureOES to apply to the material.

◆ setUVTransform()

void ARAlphaVideoTextureMaterial.setUVTransform ( float[]  uvTransform)

Updates ARAlphaVideo materials UV transform. Used to transform from 2d coodinates to texture coordinates.

Parameters
uvTransformArray of floats containing the UV transform matrix.

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