Code example for Transformation

Methods: getMatrix

0
     *      float, 
     *      android.view.animation.Transformation) 
     */ 
    @Override 
    protected void applyTransformation(float t, Transformation xf) {
        Matrix xform = xf.getMatrix();
 
        float z = ((dir > 0) ? 0.0f : -Z_MAX) - (dir * t * Z_MAX);
 
        camera.save();
        camera.rotateZ(t * 360);
        camera.translate(0.0F, 0.0F, z);
        camera.getMatrix(xform);
        camera.restore();
 
        xform.preTranslate(-xCenter, -yCenter);
        xform.postTranslate(xCenter, yCenter);
    } 
 
    /** 
     * @see android.view.animation.Animation.AnimationListener