Concrete implementation of Vertex interface.

Implements

Constructors

  • Parameters

    • v_body: Vector

      location of this Vertex in body coords of the Polygon it belongs to

    • Optional opt_endPoint: boolean

      whether this is the endpoint of an edge, default is true

    • Optional opt_edge: null | Edge

      previous edge (optional)

    Returns ConcreteVertex

Properties

edge2_: null | Edge = null

the next edge in list of edges -- null for mid-point Vertexes

edge_: null | Edge

the previous edge in list of edges

endPoint_: boolean

true if its the endpoint of an edge

id_: number = ...

for debugging: give each Vertex a unique id number

loc_body_: Vector

location in body coordinates of the RigidBody that this Vertex belongs to

next_vertex_id: number = 1

for debugging: next vertex id number

Methods

  • Returns the radius of curvature of the Edge at the Vertex's location. If the Vertex is between two Edges, returns the radius of curvature with smaller absolute value. Negative curvature means the Edge is concave at that point.

    Returns number

    radius of curvature of Edge at the Vertex, negative means concave

  • Returns an identity number unique for each Vertex, for debugging.

    Returns number

    an identity number unique for each Vertex, for debugging.

  • Returns true if this is a Vertex at the end of an Edge; returns false if this is a 'decorated mid-point' Vertex.

    Returns boolean

    true if this is a Vertex at the end of an Edge; returns false if this is a 'decorated mid-point' Vertex.

  • Returns the horizontal location of this Vertex in body coords of its RigidBody.

    Returns number

    location of this Vertex in body coords of its RigidBody

  • Returns the vertical location of this Vertex in body coords of its RigidBody.

    Returns number

    location of this Vertex in body coords of its RigidBody

  • Sets the 'previous' Edge that this Vertex is connected to.

    Parameters

    • edge: Edge

      the 'previous' Edge that this Vertex is connected to.

    Returns void

    Throws

    if this Vertex was already connected to a previous Edge

  • Sets the 'next' Edge that this Vertex is connected to.

    Parameters

    • edge: Edge

      the 'next' Edge that this Vertex is connected to

    Returns void

    Throws

    if this Vertex was already connected to a next Edge

Generated using TypeDoc