当前位置: 首页>>代码示例>>Java>>正文


Java Translation类代码示例

本文整理汇总了Java中codechicken.lib.vec.Translation的典型用法代码示例。如果您正苦于以下问题:Java Translation类的具体用法?Java Translation怎么用?Java Translation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Translation类属于codechicken.lib.vec包,在下文中一共展示了Translation类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getIndexedCuboids

import codechicken.lib.vec.Translation; //导入依赖的package包/类
@Override
public List<IndexedCuboid6> getIndexedCuboids() {
    LinkedList<IndexedCuboid6> parts = new LinkedList<>();

    parts.add(new IndexedCuboid6(0, new Cuboid6(0, 0, 0, 1, 0.005, 1)));

    for (int i = 0; i < 9; i++) {
        Cuboid6 box = new Cuboid6(1 / 16D, 0, 1 / 16D, 5 / 16D, 0.01, 5 / 16D).apply(new Translation((i % 3) * 5 / 16D, 0, (i / 3) * 5 / 16D).with(Rotation.quarterRotations[rotation].at(center)));

        parts.add(new IndexedCuboid6(i + 1, box));
    }

    return parts;
}
 
开发者ID:TheCBProject,项目名称:Translocators,代码行数:15,代码来源:TileCraftingGrid.java

示例2: renderPart

import codechicken.lib.vec.Translation; //导入依赖的package包/类
public void renderPart(IIcon icon, CCModel cc, double x, double y, double z, Colour color)
{
	if(color != null)
	{
		cc.render(new Translation(x, y, z), new IconTransformation(icon), new ColourMultiplier(color.rgba()));
	}
	else {
		cc.render(new Translation(x, y, z), new IconTransformation(icon));
	}
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:11,代码来源:RenderPartTransmitter.java

示例3: renderStatic

import codechicken.lib.vec.Translation; //导入依赖的package包/类
public void renderStatic(PartGlowPanel panel)
{
	CCRenderState.reset();
	CCRenderState.setBrightness(panel.world(), panel.x(), panel.y(), panel.z());

	Colour colour = new ColourRGBA(panel.colour.getColor(0), panel.colour.getColor(1), panel.colour.getColor(2), 1);
	int side = panel.side.ordinal();
	
	frameModels[side].render(new Translation(panel.x(), panel.y(), panel.z()), new IconTransformation(icon));
	lightModels[side].render(new Translation(panel.x(), panel.y(), panel.z()), new IconTransformation(icon), new ColourMultiplier(colour.rgba()));
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:12,代码来源:RenderGlowPanel.java


注:本文中的codechicken.lib.vec.Translation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。