use of uk.co.qmunity.lib.vec.Vec2dRect in project BluePower by Qmunity.
the class GateComponentCubes method onLayoutRefresh.
@Override
public void onLayoutRefresh() {
if (layoutColor == -1)
return;
cubes.clear();
double height = getHeight();
double scale = 1D / getGate().getLayout().getLayout(layoutColor).getWidth();
Transformation transformation = new Scale(scale, 1, scale);
for (Rectangle r : getGate().getLayout().getSimplifiedLayout(layoutColor).getRectangles()) cubes.add(new Vec2dRect(r).extrude(height).transform(transformation).add(-0.5 + 1 / 64D, 2 / 16D, -0.5 + 1 / 64D));
}
Aggregations