1 package org.opentrafficsim.road.network.lane; 2 3 import org.djunits.value.vdouble.scalar.Length; 4 5 /** 6 * The CrossSectionSlice provides the width and offset at a relative length of a CrossSectionElement. 7 * <p> 8 * Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 9 * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>. 10 * </p> 11 * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, 12 * initial version Nov 26, 2015 <br> 13 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a> 14 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a> 15 */ 16 public class CrossSectionSlice 17 { 18 /** The relative position from the start, measured along the design line of the parent link. */ 19 private final Length.Rel relativeLength; 20 21 /** The lateral offset from the design line of the parentLink at the relative length. */ 22 private final Length.Rel designLineOffset; 23 24 /** The width, positioned <i>symmetrically around</i> the position at the relative length. */ 25 private final Length.Rel width; 26 27 /** 28 * @param relativeLength the relative position from the start, measured along the design line of the parent link 29 * @param designLineOffset the lateral offset from the design line of the parentLink at the relative length 30 * @param width the width, positioned <i>symmetrically around</i> the position at the relative length 31 */ 32 public CrossSectionSlice(final Length.Rel relativeLength, final Length.Rel designLineOffset, final Length.Rel width) 33 { 34 super(); 35 this.relativeLength = relativeLength; 36 this.designLineOffset = designLineOffset; 37 this.width = width; 38 } 39 40 /** 41 * @return relativeLength 42 */ 43 public final Length.Rel getRelativeLength() 44 { 45 return this.relativeLength; 46 } 47 48 /** 49 * @return designLineOffset 50 */ 51 public final Length.Rel getDesignLineOffset() 52 { 53 return this.designLineOffset; 54 } 55 56 /** 57 * @return width 58 */ 59 public final Length.Rel getWidth() 60 { 61 return this.width; 62 } 63 }