FileDocCategorySizeDatePackage
TransformParam.javaAPI DocAndroid 5.1 API2747Thu Mar 12 22:22:44 GMT 2015com.android.scenegraph

TransformParam

public class TransformParam extends ShaderParam
hide

Fields Summary
Transform
mTransform
LightBase
mLight
Constructors Summary
public TransformParam(String name)

        super(name);
    
Methods Summary
intgetTypeFromName()

        int paramType = ScriptC_export.const_ShaderParam_TRANSFORM_DATA;
        if (mParamName.equalsIgnoreCase(view)) {
            paramType = ScriptC_export.const_ShaderParam_TRANSFORM_VIEW;
        } else if(mParamName.equalsIgnoreCase(proj)) {
            paramType = ScriptC_export.const_ShaderParam_TRANSFORM_PROJ;
        } else if(mParamName.equalsIgnoreCase(viewProj)) {
            paramType = ScriptC_export.const_ShaderParam_TRANSFORM_VIEW_PROJ;
        } else if(mParamName.equalsIgnoreCase(model)) {
            paramType = ScriptC_export.const_ShaderParam_TRANSFORM_MODEL;
        } else if(mParamName.equalsIgnoreCase(modelView)) {
            paramType = ScriptC_export.const_ShaderParam_TRANSFORM_MODEL_VIEW;
        } else if(mParamName.equalsIgnoreCase(modelViewProj)) {
            paramType = ScriptC_export.const_ShaderParam_TRANSFORM_MODEL_VIEW_PROJ;
        }
        return paramType;
    
voidinitLocalData()

        mData.type = getTypeFromName();
        if (mTransform != null) {
            mData.transform = mTransform.getRSData().getAllocation();
        }
        if (mCamera != null) {
            mData.camera = mCamera.getRSData().getAllocation();
        }
        if (mLight != null) {
            mData.light = mLight.getRSData().getAllocation();
        }
    
public voidsetTransform(Transform t)

        mTransform = t;
        if (mField != null && mTransform != null) {
            mData.transform = mTransform.getRSData().getAllocation();
        }
        incTimestamp();