private VisDataImpl() { double nodeOffset = context.qsimConfig.getNodeOffset(); if (nodeOffset != 0.0) { nodeOffset = nodeOffset +2.0; // +2.0: eventually we need a bit space for the signal visModelBuilder = new VisLaneModelBuilder(); CoordinateTransformation transformation = new IdentityTransformation(); visLink = visModelBuilder.createVisLinkLanes(transformation, QLinkImpl.this, nodeOffset, null); visModelBuilder.recalculatePositions(visLink, context.linkWidthCalculator); } }
VisDataImpl() { double nodeOffset = context.qsimConfig.getNodeOffset(); if (nodeOffset != 0.0) { nodeOffset = nodeOffset + 2.0; // +2.0: eventually we need a bit space for the // signal visModelBuilder = new VisLaneModelBuilder(); CoordinateTransformation transformation = new IdentityTransformation(); visLink = visModelBuilder.createVisLinkLanes(transformation, QLinkLanesImpl.this, nodeOffset, lanes); visModelBuilder.recalculatePositions(visLink, context.linkWidthCalculator); } }
@Override public void writeConstData(ByteBuffer out) throws IOException { //write the data for the links out.putInt(this.network.getVisLinks().size()); for (VisLink visLink : this.network.getVisLinks().values()) { LanesToLinkAssignment l2l = null; if (this.lanes != null){ l2l = this.lanes.getLanesToLinkAssignments().get(visLink.getLink().getId()); } List<ModelLane> la = null; if (l2l != null) { la = LanesUtils.createLanes(visLink.getLink(), l2l); } VisLinkWLanes otfLink = this.laneModelBuilder.createVisLinkLanes(OTFServerQuadTree.getOTFTransformation(), visLink, config.qsim().getNodeOffset(), la); //write link data ByteBufferUtils.putObject(out, otfLink); } }