Skip to content

PhysicsAPI reference

Struct MoveContact

Namespace: MicroEngine.Physics
Assembly: MicroEngine.Physics.dll
Guide: Physics worlds

A surface a moving body touched (Contacts).

C#
public readonly struct MoveContact : IEquatable<MoveContact>

Implements

IEquatable<MoveContact>

Constructors

MoveContact(ShapeId, EntityId, Vector2)

A surface a moving body touched (Contacts).

C#
public MoveContact(ShapeId Shape, EntityId Owner, Vector2 Normal)

Parameters

Shape ShapeId

The shape touched.

Owner EntityId

The entity owning that shape’s body.

Normal Vector2

The surface normal, unit length, pointing from the surface towards the moving body.

Properties

Normal

The surface normal, unit length, pointing from the surface towards the moving body.

C#
public Vector2 Normal { get; init; }

Property Value

Vector2

Owner

The entity owning that shape’s body.

C#
public EntityId Owner { get; init; }

Property Value

EntityId

Shape

The shape touched.

C#
public ShapeId Shape { get; init; }

Property Value

ShapeId

Methods

Deconstruct(out ShapeId, out EntityId, out Vector2)

C#
public void Deconstruct(out ShapeId Shape, out EntityId Owner, out Vector2 Normal)

Parameters

Shape ShapeId

Owner EntityId

Normal Vector2

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(MoveContact)

C#
public bool Equals(MoveContact other)

Parameters

other MoveContact

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(MoveContact, MoveContact)

C#
public static bool operator ==(MoveContact left, MoveContact right)

Parameters

left MoveContact

right MoveContact

Returns

bool

operator !=(MoveContact, MoveContact)

C#
public static bool operator !=(MoveContact left, MoveContact right)

Parameters

left MoveContact

right MoveContact

Returns

bool