Scripting API

Scripting API

WorldLines

Struct in Abyss.Core, from Abyss.Core.

Lines, as a game drives them from its code: an entity's Line given its points, all at once or one by its place, and read.

public readonly struct WorldLines

Remarks

A Line's points are in its entity's own space, moved, turned and scaled with it, or with its World Space ticked in the world's, where code that sets them each frame — a laser between two things — wants them. Its mesh is made again only as they, or the entity, change.

Constructors

WorldLines

public WorldLines(World world)

Lines, as a game drives them from its code: an entity's Line given its points, all at once or one by its place, and read.

Parameters

  • world: The world they are in.

A Line's points are in its entity's own space, moved, turned and scaled with it, or with its World Space ticked in the world's, where code that sets them each frame — a laser between two things — wants them. Its mesh is made again only as they, or the entity, change.

Methods

SetPoints

public void SetPoints(ulong entity, ReadOnlySpan<Vector3> points)

Gives the Line on an entity the points points, in its entity's space or the world's as it says.

Parameters

  • entity
  • points

Exceptions

  • AbyssException: The id packs no entity, the entity is gone, or it carries no Line.

SetPoint

public void SetPoint(ulong entity, int index, Vector3 point)

Moves the Line on an entity's point index to point.

Parameters

  • entity
  • index
  • point

Exceptions

  • ArgumentOutOfRangeException: index is below zero.
  • AbyssException: The index is past its last point (AbyssStatus.LinePointOutOfRange), the id packs no entity, the entity is gone, or it carries no Line.

Points

public int Points(ulong entity, Span<Vector3> into)

Reads the points of the Line on an entity into into, as many as it holds: how many there are, which may be more. None for an entity with no Line.

Parameters

  • entity
  • into

Exceptions

  • AbyssException: The id packs no entity.

Points

public Vector3[] Points(ulong entity)

The points of the Line on an entity, in its entity's space or the world's as it says; none for an entity with no Line.

Parameters

  • entity

Exceptions

  • AbyssException: The id packs no entity.