PathModel.java 文件源码

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

项目:OpenBlocks 作者:
private static Map<TransformType, Matrix4f> extractInventoryTransformsFromState(IModelState state) {
    final Map<TransformType, Matrix4f> output = Maps.newHashMap();
    for (TransformType type : TransformType.values()) {
        Matrix4f mat = null;
        final Optional<TRSRTransformation> maybeTransform = state.apply(Optional.of(type));
        if (maybeTransform.isPresent()) {
            final TRSRTransformation transform = maybeTransform.get();
            if (!transform.equals(TRSRTransformation.identity())) {
                mat = TRSRTransformation.blockCornerToCenter(transform).getMatrix();
            }
        }

        output.put(type, mat);
    }
    return output;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号