static void Camera_translate(JNIEnv* env, jobject obj,
                             jfloat dx, jfloat dy, jfloat dz) {
    jlong viewHandle = env->GetLongField(obj, gNativeInstanceFieldID);
    Sk3DView* v = reinterpret_cast<Sk3DView*>(viewHandle);
    v->translate(dx, dy, dz);
}
Exemplo n.º 2
0
static void Camera_translate(JNIEnv* env, jobject obj,
                             float dx, float dy, float dz) {
    Sk3DView* v = (Sk3DView*)env->GetIntField(obj, gNativeInstanceFieldID);
    v->translate(SkFloatToScalar(dx), SkFloatToScalar(dy), SkFloatToScalar(dz));
}