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); }
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)); }