public class SpawnPoint extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SpawnPoint.SpawnSpec
The specification of a spawn.
|
static interface |
SpawnPoint.SpawnSpecGenerator
The interface of the spawn specification genreator.
|
Constructor and Description |
---|
SpawnPoint(double currentTime,
Point2D pos,
double heading,
double steeringAngle,
double acceleration,
Lane lane,
Rectangle2D noVehicleZone)
Create a spawn point.
|
SpawnPoint(double currentTime,
Point2D pos,
double heading,
double steeringAngle,
double acceleration,
Lane lane,
Rectangle2D noVehicleZone,
SpawnPoint.SpawnSpecGenerator vehicleSpecChooser)
Create a spawn point.
|
Modifier and Type | Method and Description |
---|---|
List<SpawnPoint.SpawnSpec> |
act(double timeStep)
Advance the time step.
|
double |
getAcceleration()
Get the initial acceleration.
|
double |
getCurrentTime()
Get the current time.
|
double |
getHeading()
Get the initial heading.
|
Lane |
getLane()
Get the lane.
|
Rectangle2D |
getNoVehicleZone()
Get the no vehicle zone.
|
Point2D |
getPosition()
Get the initial position.
|
double |
getSteeringAngle()
Get the initial steering angle.
|
void |
setVehicleSpecChooser(SpawnPoint.SpawnSpecGenerator vehicleSpecChooser)
Set the vehicle spec chooser.
|
public SpawnPoint(double currentTime, Point2D pos, double heading, double steeringAngle, double acceleration, Lane lane, Rectangle2D noVehicleZone, SpawnPoint.SpawnSpecGenerator vehicleSpecChooser)
currentTime
- the current timepos
- the initial positionheading
- the initial headingsteeringAngle
- the initial steering angleacceleration
- the initial accelerationlane
- the lanenoVehicleZone
- the no vehicle zonevehicleSpecChooser
- the vehicle spec chooserpublic SpawnPoint(double currentTime, Point2D pos, double heading, double steeringAngle, double acceleration, Lane lane, Rectangle2D noVehicleZone)
currentTime
- the current timepos
- the initial positionheading
- the initial headingsteeringAngle
- the initial steering angleacceleration
- the initial accelerationlane
- the lanenoVehicleZone
- the no vehicle zonepublic List<SpawnPoint.SpawnSpec> act(double timeStep)
timeStep
- the time steppublic double getCurrentTime()
public Point2D getPosition()
public double getHeading()
public double getSteeringAngle()
public double getAcceleration()
public Lane getLane()
public Rectangle2D getNoVehicleZone()
public void setVehicleSpecChooser(SpawnPoint.SpawnSpecGenerator vehicleSpecChooser)
vehicleSpecChooser
- the vehicle spec chooserCopyright © 2013. All rights reserved.