Nebula
Containers

ScopePose

Where a drawn scope stands against the anchor, the scope whose frame the local view's frame resolves to (docs/portals.md D40, Portals.Anchor): the composition, in double and about the faces, of the link poses along the portals from the a...

generated from the sources
public readonly struct ScopePose

Where a drawn scope stands against the anchor, the scope whose frame the local view's frame resolves to (docs/portals.md D40, Portals.Anchor): the composition, in double and about the faces, of the link poses along the portals from the anchor to the scope. A point of the scope's own upright space is ToOrigin + Turn × (p − FromOrigin) in the anchor's. Used to draw only: simulation, prediction and every pose a game reads stay in each scope's own space.

Constructors

ScopePose

public ScopePose(ulong scope, ulong anchor, Double3 fromOrigin, Double3 toOrigin, Quaternion turn);

A pose.

Properties

Scope

public ulong Scope { get; }

The scope this is the pose of.

Anchor

public ulong Anchor { get; }

The anchor it is measured against.

FromOrigin

public Double3 FromOrigin { get; }

The point of the scope (absolute in the scope) the pose turns about.

ToOrigin

public Double3 ToOrigin { get; }

The same point in the anchor (absolute in the anchor).

Turn

public Quaternion Turn { get; }

What turns a rotation or direction of the scope's axes into the anchor's.

IsIdentity

public bool IsIdentity { get; }

Whether drawing the scope needs no posing: it is not turned (within the pose epsilon) and not moved (within a millimetre).

Methods

Identity

public static ScopePose Identity(ulong scope, ulong anchor);

The pose of a scope that stands as the anchor does: nothing moves, nothing turns.

Point

public Double3 Point(Double3 absolute);

A point of the scope (absolute) in the anchor (absolute), about the faces and in double.

Rotation

public Quaternion Rotation(Quaternion rotation);

A rotation of the scope's axes in the anchor's.

ToString

public override string ToString();

On this page