OrientationInfoGenerator.java 文件源码

java
阅读 16 收藏 0 点赞 0 评论 0

项目:OpenModsLib 作者:
private static Multimap<Orientation, ModelRotation> calculateVanillaRotations(Map<Matrix3f, Orientation> fromMatrix) {
    final Multimap<Orientation, ModelRotation> toVanilla = HashMultimap.create();

    for (ModelRotation rot : ModelRotation.values()) {
        final Matrix4f rotMatrix = TRSRTransformation.toVecmath(rot.getMatrix4d());
        final Matrix3f key = roundAndReduceMatrixElements(rotMatrix);
        final Orientation orientation = fromMatrix.get(key);
        Preconditions.checkNotNull(orientation, rot);
        toVanilla.put(orientation, rot);
    }

    return toVanilla;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号