Table of Contents

Class b2EdgeShape

Namespace
Gym.Box2D
Assembly
Gym.Environments.dll

A line segment from m_vertex1 to m_vertex2, with optional ghost neighbours (m_vertex0, m_vertex3) for smooth collision along connected edges. Edges have no mass and contain no point.

public sealed class b2EdgeShape : b2Shape
Inheritance
b2EdgeShape
Inherited Members
Extension Methods

Remarks

Constructors

b2EdgeShape()

A degenerate edge at the origin with the polygon skin radius and no ghost vertices.

public b2EdgeShape()

b2EdgeShape(IReadOnlyList<b2Vec2?>)

An edge from pybox2d's keyword arguments, edgeShape(vertices=[v1, v2]); a failure carries pybox2d's Failed on kwargs for b2EdgeShape.vertices: prefix.

public b2EdgeShape(IReadOnlyList<b2Vec2?> vertices)

Parameters

vertices IReadOnlyList<b2Vec2?>

Two to four vertices, as Vertices takes them.

Exceptions

ValueError

Thrown for other than 2 to 4 vertices.

Properties

HasVertex0

Whether Vertex0 is set (pybox2d's hasVertex0).

public bool HasVertex0 { get; set; }

Property Value

bool

HasVertex3

Whether Vertex3 is set (pybox2d's hasVertex3).

public bool HasVertex3 { get; set; }

Property Value

bool

Vertex0

The ghost vertex before the edge (pybox2d's vertex0).

public b2Vec2 Vertex0 { get; set; }

Property Value

b2Vec2

Vertex1

The first vertex (pybox2d's vertex1).

public b2Vec2 Vertex1 { get; set; }

Property Value

b2Vec2

Vertex2

The second vertex (pybox2d's vertex2).

public b2Vec2 Vertex2 { get; set; }

Property Value

b2Vec2

Vertex3

The ghost vertex after the edge (pybox2d's vertex3).

public b2Vec2 Vertex3 { get; set; }

Property Value

b2Vec2

Vertices

The edge's two vertices (pybox2d's vertices). Setting 2 vertices drops the ghosts; 3 set vertex0 (a null one leaves no ghost) and 4 set both ghosts, as pybox2d does.

public IReadOnlyList<b2Vec2?> Vertices { get; set; }

Property Value

IReadOnlyList<b2Vec2?>

Exceptions

ValueError

Thrown by the setter for other than 2 to 4 vertices: Expected from 2 to 4 vertices.