what-the-bank/sources/com/pingan/ai/h.java

396 lines
14 KiB
Java
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.pingan.ai;
import com.pingan.ai.face.common.PaFaceConstants;
import com.pingan.ai.face.control.LiveFaceConfig;
import com.pingan.ai.face.utils.PaFaceLogger;
import java.util.ArrayList;
/* loaded from: classes3.dex */
public class h extends g {
public LiveFaceConfig A;
public boolean l;
public boolean m;
public boolean n;
/* renamed from: o, reason: collision with root package name */
public boolean f6510o;
public boolean p;
public boolean q;
public boolean r;
public boolean s;
public boolean t;
public boolean u;
public boolean v;
public boolean w;
public boolean x;
public boolean y;
public d z;
public native void a(LiveFaceConfig liveFaceConfig);
public boolean i() {
StringBuilder sb;
if (this.y) {
return true;
}
ArrayList<Float> arrayList = this.e;
if (arrayList.get(arrayList.size() - 1).floatValue() > x.x(this.A) + 0.5d) {
d dVar = this.z;
StringBuilder sb2 = new StringBuilder();
sb2.append(c.a());
sb2.append(" errorFace:yaw,yaw=");
ArrayList<Float> arrayList2 = this.e;
sb2.append(arrayList2.get(arrayList2.size() - 1));
dVar.a(sb2.toString());
sb = new StringBuilder("FACE_YAW_RIGHT shakeHeadForward yaw=");
} else {
ArrayList<Float> arrayList3 = this.e;
if (arrayList3.get(arrayList3.size() - 1).floatValue() >= 0.5d - x.x(this.A)) {
this.y = true;
return false;
}
d dVar2 = this.z;
StringBuilder sb3 = new StringBuilder();
sb3.append(c.a());
sb3.append(" errorFace:yaw,yaw=");
ArrayList<Float> arrayList4 = this.e;
sb3.append(arrayList4.get(arrayList4.size() - 1));
dVar2.a(sb3.toString());
sb = new StringBuilder("FACE_YAW_LEFT shakeHeadForward yaw=");
}
ArrayList<Float> arrayList5 = this.e;
sb.append(arrayList5.get(arrayList5.size() - 1));
PaFaceLogger.error(sb.toString());
return false;
}
public void h() {
this.l = false;
this.m = false;
this.n = false;
this.f6510o = false;
this.p = false;
this.q = false;
this.r = false;
this.s = false;
this.t = false;
this.u = false;
this.v = false;
this.w = false;
this.x = false;
this.y = false;
d();
}
public boolean g() {
StringBuilder sb;
if (this.y) {
return true;
}
ArrayList<Float> arrayList = this.g;
if (arrayList.get(arrayList.size() - 1).floatValue() > x.r(this.A) + 0.5d) {
d dVar = this.z;
StringBuilder sb2 = new StringBuilder();
sb2.append(c.a());
sb2.append(" errorFace:pitch,pitch=");
ArrayList<Float> arrayList2 = this.g;
sb2.append(arrayList2.get(arrayList2.size() - 1));
dVar.a(sb2.toString());
sb = new StringBuilder("FACE_PITCH_UP nodHeadForward pitch=");
} else {
ArrayList<Float> arrayList3 = this.g;
if (arrayList3.get(arrayList3.size() - 1).floatValue() >= 0.5d - x.r(this.A)) {
this.y = true;
return false;
}
d dVar2 = this.z;
StringBuilder sb3 = new StringBuilder();
sb3.append(c.a());
sb3.append(" errorFace:pitch,pitch=");
ArrayList<Float> arrayList4 = this.g;
sb3.append(arrayList4.get(arrayList4.size() - 1));
dVar2.a(sb3.toString());
sb = new StringBuilder("FACE_PITCH_DOWN nodHeadForward pitch=");
}
ArrayList<Float> arrayList5 = this.g;
sb.append(arrayList5.get(arrayList5.size() - 1));
PaFaceLogger.error(sb.toString());
return false;
}
public boolean f() {
return Math.abs(((double) c()[2]) - 0.5d) <= ((double) x.r(this.A)) && Math.abs(((double) c()[1]) - 0.5d) <= ((double) x.t(this.A)) && Math.abs(((double) c()[0]) - 0.5d) <= ((double) x.x(this.A));
}
public boolean e(String str) {
StringBuilder sb;
float f;
if (str.equals("detect eye") || str.equals("detect mouth")) {
if (x.B(this.A)) {
return false;
}
} else if (x.F(this.A)) {
return false;
}
if (this.a[0] > x.u(this.A) + 0.5d) {
this.z.b(3004);
d dVar = this.z;
StringBuilder sb2 = new StringBuilder("ActionError:");
sb2.append(c.a());
sb2.append(" shake head attack,yawRight,yaw=");
sb2.append(this.a[0]);
dVar.a(sb2.toString());
sb = new StringBuilder("ACTION_ERROR,FACE_YAW_RIGHT ");
sb.append(str);
sb.append(" yaw=");
f = this.a[0];
} else {
if (this.a[0] >= 0.5d - x.u(this.A)) {
return false;
}
this.z.b(3004);
d dVar2 = this.z;
StringBuilder sb3 = new StringBuilder("ActionError:");
sb3.append(c.a());
sb3.append(" shake head attack,yawLeft,yaw=");
sb3.append(this.a[0]);
dVar2.a(sb3.toString());
sb = new StringBuilder("ACTION_ERROR,FACE_YAW_LEFT ");
sb.append(str);
sb.append(" yaw=");
f = this.a[0];
}
sb.append(f);
PaFaceLogger.error(sb.toString());
this.z.a(true);
return true;
}
public boolean d(String str) {
StringBuilder sb;
float f;
if (this.a[2] < 0.5d - x.r(this.A)) {
this.z.c(this.z.a(2009));
d dVar = this.z;
StringBuilder sb2 = new StringBuilder("FacePitchUp:");
sb2.append(c.a());
sb2.append(" errorFace:pitchUp,pitch=");
sb2.append(this.a[2]);
dVar.a(sb2.toString());
sb = new StringBuilder("ACTION_ERROR,FACE_PITCH_UP ");
sb.append(str);
sb.append(" pitch=");
f = this.a[2];
} else {
if (this.a[2] <= x.r(this.A) + 0.5d) {
return false;
}
this.z.c(this.z.a(2010));
d dVar2 = this.z;
StringBuilder sb3 = new StringBuilder("FacePitchDown:");
sb3.append(c.a());
sb3.append(" errorFace:pitchDown,pitch=");
sb3.append(this.a[2]);
dVar2.a(sb3.toString());
sb = new StringBuilder("ACTION_ERROR,FACE_PITCH_DOWN ");
sb.append(str);
sb.append(" pitch=");
f = this.a[2];
}
sb.append(f);
PaFaceLogger.error(sb.toString());
return true;
}
public boolean c(String str) {
StringBuilder sb;
float f;
if (x.A(this.A)) {
return false;
}
if (this.a[2] < 0.5d - x.l(this.A)) {
this.z.b(3004);
d dVar = this.z;
StringBuilder sb2 = new StringBuilder("ActionError:");
sb2.append(c.a());
sb2.append(" nod head attack,pitchUp,pitch=");
sb2.append(this.a[2]);
dVar.a(sb2.toString());
sb = new StringBuilder("ACTION_ERROR,FACE_PITCH_UP ");
sb.append(str);
sb.append(" pitch=");
f = this.a[2];
} else {
if (this.a[2] <= x.l(this.A) + 0.5d) {
return false;
}
this.z.b(3004);
d dVar2 = this.z;
StringBuilder sb3 = new StringBuilder("ActionError:");
sb3.append(c.a());
sb3.append(" nod head attack,pitchDown,pitch=");
sb3.append(this.a[2]);
dVar2.a(sb3.toString());
sb = new StringBuilder("ACTION_ERROR,FACE_PITCH_DOWN ");
sb.append(str);
sb.append(" pitch=");
f = this.a[2];
}
sb.append(f);
PaFaceLogger.error(sb.toString());
this.z.a(true);
return true;
}
public boolean b(String str) {
d dVar;
int i;
if (c()[2] < 0.5d - x.r(this.A)) {
d dVar2 = this.z;
StringBuilder sb = new StringBuilder("FacePitchUp:");
sb.append(c.a());
sb.append(" Stable:pitchUp,reset stableFramepitch=");
sb.append(c()[2]);
dVar2.a(sb.toString());
StringBuilder sb2 = new StringBuilder("STABLE_FACE_PITCH_UPreset stableFrame. ");
sb2.append(str);
sb2.append(" pitch=");
sb2.append(c()[2]);
PaFaceLogger.error(sb2.toString());
dVar = this.z;
i = 2009;
} else if (c()[2] > x.r(this.A) + 0.5d) {
d dVar3 = this.z;
StringBuilder sb3 = new StringBuilder("FacePitchDown:");
sb3.append(c.a());
sb3.append(" Stable:pitchDown,reset stableFramepitch=");
sb3.append(c()[2]);
dVar3.a(sb3.toString());
StringBuilder sb4 = new StringBuilder("STABLE_FACE_PITCH_DOWNreset stableFrame. ");
sb4.append(str);
sb4.append(" pitch=");
sb4.append(c()[2]);
PaFaceLogger.error(sb4.toString());
dVar = this.z;
i = 2010;
} else if (c()[1] < 0.5d - x.t(this.A)) {
d dVar4 = this.z;
StringBuilder sb5 = new StringBuilder("FaceRollLeft:");
sb5.append(c.a());
sb5.append(" Stable:rollLeft,reset stableFrameroll=");
sb5.append(c()[1]);
dVar4.a(sb5.toString());
StringBuilder sb6 = new StringBuilder("STABLE_FACE_ROLL_RIGHTreset stableFrame. ");
sb6.append(str);
sb6.append(" roll=");
sb6.append(c()[1]);
PaFaceLogger.error(sb6.toString());
dVar = this.z;
i = 2007;
} else if (c()[1] > x.t(this.A) + 0.5d) {
d dVar5 = this.z;
StringBuilder sb7 = new StringBuilder("FaceRollRight:");
sb7.append(c.a());
sb7.append(" Stable:rollRight,reset stableFrameroll=");
sb7.append(c()[1]);
dVar5.a(sb7.toString());
StringBuilder sb8 = new StringBuilder("STABLE_FACE_ROLL_LEFTreset stableFrame. ");
sb8.append(str);
sb8.append(" roll=");
sb8.append(c()[1]);
PaFaceLogger.error(sb8.toString());
dVar = this.z;
i = 2008;
} else if (c()[0] > x.x(this.A) + 0.5d) {
d dVar6 = this.z;
StringBuilder sb9 = new StringBuilder("FaceYawRight:");
sb9.append(c.a());
sb9.append(" Stable:yawRight,reset stableFrameyaw=");
sb9.append(c()[0]);
dVar6.a(sb9.toString());
StringBuilder sb10 = new StringBuilder("STABLE_FACE_YAW_RIGHTreset stableFrame. ");
sb10.append(str);
sb10.append(" yaw=");
sb10.append(c()[0]);
PaFaceLogger.error(sb10.toString());
dVar = this.z;
i = PaFaceConstants.EnvironmentalTips.FACE_YAW_RIGHT;
} else {
if (c()[0] >= 0.5d - x.x(this.A)) {
return true;
}
d dVar7 = this.z;
StringBuilder sb11 = new StringBuilder("FaceYawLeft:");
sb11.append(c.a());
sb11.append(" Stable:yawLeft,reset stableFrameyaw=");
sb11.append(c()[0]);
dVar7.a(sb11.toString());
StringBuilder sb12 = new StringBuilder("STABLE_FACE_YAW_LEFTreset stableFrame. ");
sb12.append(str);
sb12.append(" yaw=");
sb12.append(c()[0]);
PaFaceLogger.error(sb12.toString());
dVar = this.z;
i = 2005;
}
this.z.c(dVar.a(i));
return false;
}
public boolean a(String str) {
StringBuilder sb;
float f;
if (this.a[1] < 0.5d - x.t(this.A)) {
this.z.c(this.z.a(2008));
d dVar = this.z;
StringBuilder sb2 = new StringBuilder("FaceRollRight:");
sb2.append(c.a());
sb2.append(" errorFace:rollLeft,roll=");
sb2.append(this.a[1]);
dVar.a(sb2.toString());
sb = new StringBuilder("FACE_ROLL_RIGHT ");
sb.append(str);
sb.append(" roll=");
f = this.a[1];
} else {
if (this.a[1] <= x.t(this.A) + 0.5d) {
return false;
}
this.z.c(this.z.a(2007));
d dVar2 = this.z;
StringBuilder sb3 = new StringBuilder("FaceRollLeft:");
sb3.append(c.a());
sb3.append(" errorFace:rollRight,roll=");
sb3.append(this.a[1]);
dVar2.a(sb3.toString());
sb = new StringBuilder("FACE_ROLL_LEFT ");
sb.append(str);
sb.append(" roll=");
f = this.a[1];
}
sb.append(f);
PaFaceLogger.error(sb.toString());
return true;
}
public h(d dVar, LiveFaceConfig liveFaceConfig) {
super(dVar);
this.l = false;
this.m = false;
this.n = false;
this.f6510o = false;
this.p = false;
this.q = false;
this.r = false;
this.s = false;
this.t = false;
this.u = false;
this.v = false;
this.w = false;
this.x = false;
this.y = false;
this.z = dVar;
this.A = liveFaceConfig;
}
}