我的球场和偏航都搞砸了.我有垫子的俯仰和偏航,但是梁的俯仰和偏航都搞砸了.如何计算垫的俯仰和偏航的法向量?我尝试了从stackoverflow的数学垃圾负载,但到目前为止他们都失败了.
这就是当我习惯于垫的俯仰和偏航以及计算方向向量时会发生的情况:

我接下来尝试做的是将横梁的俯仰和偏航从横梁的俯仰和偏航中分开并将它们分别计算出来.这大部分都有效,但是偏航仍然完全搞砸了.
我用来计算横梁的偏航和俯仰的方向向量是我的工具用来为暴徒做的:
public static Vec3d getVectorForRotation3d(float pitch, float yaw) {
float f = MathHelper.cos(-yaw * 0.017453292F - (float) Math.PI);
float f1 = MathHelper.sin(-yaw * 0.017453292F - (float) Math.PI);
float f2 = -MathHelper.cos(-pitch * 0.017453292F);
float f3 = MathHelper.sin(-pitch * 0.017453292F);
return new Vec3d((double) (f1 * f2), (double) f3, (double) (f * f2));
}
Run Code Online (Sandbox Code Playgroud)
但是那显然失败了,所以最后,我尝试了以下使用pad的音调:
double pitch = ((te.getPadPitch() + 90) * Math.PI) / 180;
double yaw = ((te.getPadYaw() + 90) * Math.PI) / 180;
double x = …Run Code Online (Sandbox Code Playgroud) 我理解如何在[和],或()等两种不同类型的字符串之间提取字符串...
但我不知道的是如何在1个字符之间获得多个/所有字符串.例如:
the *big* brown fox *jumps over* the *lazy* **dog**
Run Code Online (Sandbox Code Playgroud)
它应返回"*":
big
jumps over
lazy
Run Code Online (Sandbox Code Playgroud)
它也应该返回"**":
dog
Run Code Online (Sandbox Code Playgroud)
所有库,正则表达式模式等都不支持这样的功能.