use of logisticspipes.proxy.object3d.operation.LPUVScale in project LogisticsPipes by RS485.
the class LogisticsNewSolidBlockWorldRenderer method computeRotated.
private static Map<BlockRotation, IModel3D> computeRotated(IModel3D m) {
m.apply(new LPUVScale(1, 0.75));
Map<BlockRotation, IModel3D> map = new HashMap<>();
for (BlockRotation rot : BlockRotation.values()) {
IModel3D model = m.copy();
switch(rot.getInteger()) {
case 0:
model.apply(LPRotation.sideOrientation(0, 3));
model.apply(new LPTranslation(0, 0, 1));
break;
case 1:
model.apply(LPRotation.sideOrientation(0, 1));
model.apply(new LPTranslation(1, 0, 0));
break;
case 2:
break;
case 3:
model.apply(LPRotation.sideOrientation(0, 2));
model.apply(new LPTranslation(1, 0, 1));
break;
}
model.computeNormals();
model.computeStandardLighting();
map.put(rot, model);
}
return map;
}
Aggregations