public class RelativePosition extends Object implements Serializable
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static class |
RelativePosition.TYPE
The type of relative position, e.g., Front, Back, etc.
|
Modifier and Type | Field and Description |
---|---|
static RelativePosition.TYPE |
CENTER
Standard relative position type CENTER.
|
static RelativePosition.TYPE |
DRIVER
Standard relative position type DRIVER.
|
static RelativePosition.TYPE |
FRONT
Standard relative position type FRONT.
|
static RelativePosition.TYPE |
REAR
Standard relative position type BACK.
|
static RelativePosition.TYPE |
REFERENCE
Standard relative position type REFERENCE.
|
static RelativePosition |
REFERENCE_POSITION
the reference position (always 0, 0, 0).
|
Constructor and Description |
---|
RelativePosition(DoubleScalar.Rel<LengthUnit> dx,
DoubleScalar.Rel<LengthUnit> dy,
DoubleScalar.Rel<LengthUnit> dz,
RelativePosition.TYPE type) |
RelativePosition(RelativePosition p) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
DoubleScalar.Rel<LengthUnit> |
getDx() |
DoubleScalar.Rel<LengthUnit> |
getDy() |
DoubleScalar.Rel<LengthUnit> |
getDz() |
RelativePosition.TYPE |
getType() |
int |
hashCode() |
String |
toString() |
public static final RelativePosition.TYPE FRONT
public static final RelativePosition.TYPE REAR
public static final RelativePosition.TYPE CENTER
public static final RelativePosition.TYPE REFERENCE
public static final RelativePosition.TYPE DRIVER
public static final RelativePosition REFERENCE_POSITION
public RelativePosition(DoubleScalar.Rel<LengthUnit> dx, DoubleScalar.Rel<LengthUnit> dy, DoubleScalar.Rel<LengthUnit> dz, RelativePosition.TYPE type)
dx
- positive x is in the normal direction of movement.dy
- positive y is left compared to the normal direction of movement (seen from the top).dz
- positive z is up.type
- type of relative position (FRONT, BACK, etc.).public RelativePosition(RelativePosition p)
p
- a relative position to make a deep copy of.public final DoubleScalar.Rel<LengthUnit> getDx()
public final DoubleScalar.Rel<LengthUnit> getDy()
public final DoubleScalar.Rel<LengthUnit> getDz()
public final RelativePosition.TYPE getType()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.