Search in sources :

Example 1 with RenderEntry

use of logisticspipes.renderer.newpipe.RenderEntry in project LogisticsPipes by RS485.

the class LineTubeRenderer method renderToList.

@Override
public void renderToList(CoreUnroutedPipe pipe, List<RenderEntry> objectsToRender) {
    if (pipe instanceof HSTubeLine) {
        HSTubeLine tube = (HSTubeLine) pipe;
        if (tube.getOrientation() != null) {
            TubeLineRenderOrientation speedupDirection = tube.getOrientation().getRenderOrientation();
            objectsToRender.addAll(LineTubeRenderer.tubeLineBase.get(speedupDirection).stream().map(model -> new RenderEntry(model, new I3DOperation[] { new LPUVTransformationList(new LPUVTranslation(0, 0)) }, LineTubeRenderer.TEXTURE)).collect(Collectors.toList()));
        }
    }
}
Also used : HSTubeLine(logisticspipes.pipes.tubes.HSTubeLine) TubeLineRenderOrientation(logisticspipes.pipes.tubes.HSTubeLine.TubeLineRenderOrientation) RenderEntry(logisticspipes.renderer.newpipe.RenderEntry) I3DOperation(logisticspipes.proxy.object3d.interfaces.I3DOperation)

Example 2 with RenderEntry

use of logisticspipes.renderer.newpipe.RenderEntry in project LogisticsPipes by RS485.

the class SpeedupTubeRenderer method renderToList.

@Override
public void renderToList(CoreUnroutedPipe pipe, List<RenderEntry> objectsToRender) {
    if (pipe instanceof HSTubeSpeedup) {
        HSTubeSpeedup tube = (HSTubeSpeedup) pipe;
        if (tube.getOrientation() != null) {
            SpeedupDirection speedupDirection = (SpeedupDirection) tube.getOrientation().getRenderOrientation();
            objectsToRender.addAll(SpeedupTubeRenderer.tubeSpeedupBase.get(speedupDirection).stream().map(model -> new RenderEntry(model, new I3DOperation[] { new LPUVTransformationList(new LPUVTranslation(0, 0)) }, SpeedupTubeRenderer.TEXTURE)).collect(Collectors.toList()));
        }
    }
}
Also used : SpeedupDirection(logisticspipes.pipes.tubes.HSTubeSpeedup.SpeedupDirection) HSTubeSpeedup(logisticspipes.pipes.tubes.HSTubeSpeedup) RenderEntry(logisticspipes.renderer.newpipe.RenderEntry) I3DOperation(logisticspipes.proxy.object3d.interfaces.I3DOperation)

Aggregations

I3DOperation (logisticspipes.proxy.object3d.interfaces.I3DOperation)2 RenderEntry (logisticspipes.renderer.newpipe.RenderEntry)2 HSTubeLine (logisticspipes.pipes.tubes.HSTubeLine)1 TubeLineRenderOrientation (logisticspipes.pipes.tubes.HSTubeLine.TubeLineRenderOrientation)1 HSTubeSpeedup (logisticspipes.pipes.tubes.HSTubeSpeedup)1 SpeedupDirection (logisticspipes.pipes.tubes.HSTubeSpeedup.SpeedupDirection)1