JME - Application Documentation
    Preparing search index...

    Position-based gap-acceptance controller for roundabout junctions. Tracks circulating vehicles per ring lane and checks entry clearance.

    Index

    Constructors

    Properties

    id: string

    Methods

    • Convenience wrapper around canEnterSafelyAtPosition that derives the entry position from an angle and the outer-lane radius.

      Parameters

      • entryAngle: number

        angle (radians) of the entry arm around the roundabout

      • radius: number

        fallback radius when lane geometry is unavailable

      • OptionalentryKey: string

        entry-group key of the approaching arm

      Returns boolean

      true if the vehicle may enter without conflict

    • Determine whether a vehicle may safely enter at the given world position, checking all circulating vehicles across every ring lane and detecting conflicting entries from other arms.

      Parameters

      • entryPosition: Vector3

        world position where the vehicle would enter

      • OptionalentryKey: string

        entry-group key of the approaching arm

      Returns boolean

      true if the gap is sufficient for safe entry

    • Mark a vehicle as committed to enter the roundabout. Optionally records the entry position for conflicting-entry detection.

      Parameters

      • vehicleId: number

        unique identifier of the vehicle

      • OptionalentryPosition: Vector3

        world-space position of the entry point

      • OptionalentryKey: string

        string key identifying an entry point

      Returns void

    • Compute the world position of the entry point at the given angle and radius.

      Parameters

      • entryAngle: number

        angle of the entry point in radians

      • radius: number

        radius in world units

      Returns Vector3

      the computed position vector

    • Sets the roundabout centre and optional per-lane mid-radii for gap detection.

      Parameters

      • centre: Vector3

        world-space position of the roundabout centre

      • OptionallaneMidRadii: number[]

        mid-radius of each ring lane

      Returns void

    • Update (or insert) a circulating vehicle's position, speed, lane, and heading.

      Parameters

      • vehicleId: number

        numeric vehicle identifier

      • position: Vector3

        current world position

      • speed: number

        current scalar speed

      • laneIndex: number

        ring-lane index the vehicle is on

      • heading: Vector3

        normalised forward direction

      • OptionalentryKey: string

        optional entry-group key the vehicle entered from

      Returns void