public abstract class CrossSectionElement extends Object implements LocatableInterface, Serializable
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-08-30 13:16:27 +0200 (Sun, 30 Aug 2015) $, @version $Revision: 1344 $, by $Author: averbraeck $,
initial version Aug 19, 2014
| Modifier and Type | Field and Description |
|---|---|
protected org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
beginWidth
Start width, positioned symmetrically around the lateral start position.
|
protected org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
designLineOffsetAtBegin
The lateral offset from the design line of the parentLink at the start of the parentLink.
|
protected org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
designLineOffsetAtEnd
The lateral offset from the design line of the parentLink at the end of the parentLink.
|
protected org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
endWidth
End width, positioned symmetrically around the lateral end position.
|
protected org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
length
The length of the line.
|
protected CrossSectionLink |
parentLink
Cross Section Link to which the element belongs.
|
| Constructor and Description |
|---|
CrossSectionElement(CrossSectionLink parentLink,
String id,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> lateralOffsetAtBegin,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> lateralOffsetAtEnd,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> beginWidth,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> endWidth)
Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
the StartNode towards the EndNode as the longitudinal direction.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getBeginWidth() |
Bounds |
getBounds() |
OTSLine3D |
getCenterLine() |
OTSLine3D |
getContour() |
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getDesignLineOffsetAtBegin() |
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getDesignLineOffsetAtEnd() |
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getEndWidth() |
String |
getId() |
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getLateralBoundaryPosition(LateralDirectionality lateralDirection,
double fractionalLongitudinalPosition)
Return the lateral offset from the design line of the parent Link of the Left or Right boundary of this
CrossSectionElement at the specified fractional longitudinal position.
|
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getLateralBoundaryPosition(LateralDirectionality lateralDirection,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> longitudinalPosition)
Return the lateral offset from the design line of the parent Link of the Left or Right boundary of this
CrossSectionElement at the specified longitudinal position.
|
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getLateralCenterPosition(double fractionalPosition)
Retrieve the lateral offset from the Link design line at the specified longitudinal position.
|
org.djunits.value.vdouble.scalar.DoubleScalar<org.djunits.unit.LengthUnit> |
getLateralCenterPosition(org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> longitudinalPosition)
Retrieve the lateral offset from the Link design line at the specified longitudinal position.
|
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getLength()
Return the length of this CrossSectionElement as measured along the design line (which equals the center line).
|
DirectedPoint |
getLocation() |
CrossSectionLink |
getParentLink() |
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getWidth(double fractionalPosition)
Return the width of this CrossSectionElement at a specified fractional longitudinal position.
|
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getWidth(org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> longitudinalPosition)
Return the width of this CrossSectionElement at a specified longitudinal position.
|
protected abstract double |
getZ() |
int |
hashCode() |
String |
toString() |
protected final CrossSectionLink parentLink
protected final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> designLineOffsetAtBegin
protected final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> designLineOffsetAtEnd
protected final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> beginWidth
protected final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> endWidth
protected final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> length
public CrossSectionElement(CrossSectionLink parentLink, String id, org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> lateralOffsetAtBegin, org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> lateralOffsetAtEnd, org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> beginWidth, org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> endWidth) throws OTSGeometryException, NetworkException
id - String; The id of the CrosssSectionElement. Should be unique within the parentLink.parentLink - CrossSectionLink; Link to which the element belongs.lateralOffsetAtBegin - DoubleScalar.Rel<LengthUnit>; the lateral offset of the design line of the new
CrossSectionLink with respect to the design line of the parent Link at the start of the parent LinklateralOffsetAtEnd - DoubleScalar.Rel<LengthUnit>; the lateral offset of the design line of the new
CrossSectionLink with respect to the design line of the parent Link at the end of the parent LinkbeginWidth - DoubleScalar.Rel<LengthUnit>; width at start, positioned symmetrically around the design
lineendWidth - DoubleScalar.Rel<LengthUnit>; width at end, positioned symmetrically around the design lineOTSGeometryException - when creation of the geometry failsNetworkException - when id equal to null or not uniquepublic final CrossSectionLink getParentLink()
public final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getLateralCenterPosition(double fractionalPosition)
fractionalPosition - double; fractional longitudinal position on this Lanepublic final org.djunits.value.vdouble.scalar.DoubleScalar<org.djunits.unit.LengthUnit> getLateralCenterPosition(org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> longitudinalPosition)
longitudinalPosition - DoubleScalar.Rel<LengthUnit>; the longitudinal position on this Lanepublic final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getWidth(org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> longitudinalPosition)
longitudinalPosition - DoubleScalar<LengthUnit>; the longitudinal positionpublic final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getWidth(double fractionalPosition)
fractionalPosition - double; the fractional longitudinal positionpublic final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getLength()
public final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getDesignLineOffsetAtBegin()
public final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getDesignLineOffsetAtEnd()
public final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getBeginWidth()
public final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getEndWidth()
protected abstract double getZ()
public final OTSLine3D getCenterLine()
public final OTSLine3D getContour()
public final String getId()
public final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getLateralBoundaryPosition(LateralDirectionality lateralDirection, double fractionalLongitudinalPosition)
lateralDirection - LateralDirectionality; LEFT, or RIGHTfractionalLongitudinalPosition - double; ranges from 0.0 (begin of parentLink) to 1.0 (end of parentLink)public final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getLateralBoundaryPosition(LateralDirectionality lateralDirection, org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> longitudinalPosition)
lateralDirection - LateralDirectionality; LEFT, or RIGHTlongitudinalPosition - DoubleScalar.Rel<LengthUnit>; the position along the length of this CrossSectionElementpublic DirectedPoint getLocation() throws RemoteException
getLocation in interface LocatableInterfaceRemoteExceptionpublic Bounds getBounds() throws RemoteException
getBounds in interface LocatableInterfaceRemoteExceptionCopyright © 2014–2015 Delft University of Technology. All rights reserved.