Contents

namespace

SushiEngine

Declared in
engine/foundation/core/include/SushiEngine/core/accumulator.hpp

Contains

Typedefs

Accumulator

Names double for any scalar narrower than it and the scalar itself otherwise.

Scalar

Scalar type used throughout the engine.

Vector3

Three-component vector used for positions and velocities.

Matrix4

Column-major 4x4 matrix for transforms and camera projections.

Quaternion

Unit-quaternion rotation.

Vector3T

Names the vector and quaternion types, parametric on their element type.

QuaternionT

Element-parametric unit quaternion; see Vector3T.

WorldVector3

Always-double 3-component vector for absolute (ECEF) world positions.

SectorCoord

Integer index of a floating-origin sector on the planet grid.

FloatingOriginVector3

A world position split into a sector index and a Scalar-precision local offset — the floating-origin representation used by sim and render.

Variables

MINIMUM_ARRIVAL_TILT

Holds the smallest tilt an arrival is allowed to keep, in radians.

TRAVEL_STAND_OFF_RADII

How many of the body's own radii a travel arrival stands off from its centre.

SUBJECT_TAKEOVER_RATIO

Holds how near an object must be, relative to the ground, to govern the look law.

ORBIT_RELEASE_INNER

Ground clearance, in body radii, below which the body is still a floor.

ORBIT_RELEASE_OUTER

Ground clearance, in body radii, above which the body is only scenery.

UNLIMITED_PITCH

The angle at which a pitch limit stops excluding anything, radians.

OVERLAY_MINIMUM_CLIP_W

Holds the smallest w an overlay asks a projection to divide by, in metres.

SKY_MARKER_SKEW

Holds the shift of the banner's bottom edge against its top, as a fraction of banner height.

SKY_MARKER_PADDING_X

Horizontal and vertical padding between the banner edge and its text, pixels.

SKY_MARKER_PADDING_Y
SKY_MARKER_DISC_CLEARANCE

Pixels the leader line clears the body's drawn disc by before the banner starts.

SKY_MARKER_MINIMUM_RISE

Bounds how far above its body a banner floats, in pixels.

SKY_MARKER_MAXIMUM_RISE
SKY_MARKER_LEADER_RUN

Horizontal run of the leader line per pixel of rise.

SKY_MARKER_MAXIMUM

Largest number of markers a single selection pass considers.

K_EVENT_BUS_LOG_CATEGORY

The category every event_bus log record is tagged with.

Functions

framing_distance

Returns the distance at which a sphere of the given radius fills the field of view.

arrival_framing

Returns the attitude to arrive at when a camera is teleported to inspect a body.

camera_rotation_from_basis

Returns the orientation a camera holds to look along a basis.

travel_arrival

Resolves a travel destination from one frame's sky: where to land and what to face.

orbit_pivot_distance

Returns how far ahead of the camera an orbit pivot goes when no framing set one.

surface_levelling_weight

Returns how much of the local vertical a camera at this height is locked to.

orbit_release

Returns how far the camera has climbed out of a body's floor regime, in [0, 1].

subject_takeover

Returns how much a nearby object governs the look law against the ground under it.

resolve_look_subject

Resolves the body and a nearby object into the single subject the camera obeys.

displace_about_center

Moves a camera by a displacement while keeping its distance from a centre.

precision_headroom

Measures the representable interval at a position and a step's size against it.

minimum_useful_speed

Returns the slowest speed that still displaces the camera at a position.

approach_limited_speed

Lowers a requested speed so one frame cannot cross the nearest surface.

resolve_displayed_euler

Picks the Euler triple the Inspector's Rotation row shows.

aggregate_field_count

Returns the most initialisers T{...} accepts, counting each element of an array member.

to_local

Subtracts the anchor from a world point in double and narrows the result to T once.

to_world

Widens a local point to double and adds the anchor.

reframe

Re-expresses a point of frame from in frame to, in double, narrowing once.

reframe_plane_offset

Re-expresses the offset of the plane {p : dot(normal, p) = offset} from frame from in frame to.

blended_yaw_axis

Returns the axis mouse X turns about for a given levelling weight.

blended_pitch_limit

Returns the pitch limit to enforce for a given levelling weight.

apply_look_delta

Applies one frame of look input to an orientation by quaternion delta.

clip_space_w

Returns the homogeneous w a point projects with, its depth in front of the camera.

clip_segment_to_near_plane

Trims a segment to the part in front of the near plane.

clip_segment_to_image

Trims a pixel segment to the part inside the image rectangle.

scalar_cast

Converts each component of value to To with static_cast.

sky_marker_boxes_overlap

Whether two pixel rectangles share any area.

sky_marker_layout

Lays a marker out around the body's projected screen point.

select_overlay_labels

Chooses which labels draw when their boxes collide.

select_sky_markers

Calls select_overlay_labels at the sky markers' own capacity.

sky_marker_at

Returns the index of the drawn marker that covers a point, or -1.

format_sky_marker_distance

Writes a body's distance in the unit that reads best at that magnitude.

format_sky_marker_title

Writes a body's name in ASCII capitals, as the marker's title bar carries it.

sky_body_screen_radius

The pixel radius a body of the given angular radius is drawn at.

viewport_overlay_corner

Returns where a control anchored to the image's top-right corner starts.

viewport_overlay_popup_corner

Returns where a popup opened by an overlay control sits, kept inside the image.

affine_inverse

Returns the inverse of an affine matrix, or the identity when it is singular.

compose_transform

Composes a translation-rotation-scale model matrix.

conjugate

The conjugate (inverse, for unit quaternions) of q.

cross

Right-handed cross product a x b.

decompose_transform

Decomposes an affine matrix into translation, rotation and scale.

dot

Dot product of two vectors.

fold_range

Folds [first, last) in ascending index order, starting from the identity.

from_floating_origin

Recomposes a sector + local offset into an absolute world position.

length

Euclidean length of a vector.

lerp

Componentwise linear interpolation of two vectors.

look_at

A right-handed view matrix looking from eye toward center.

matrix4_from_quaternion

The rotation matrix equivalent to unit quaternion q.

mul

Hamilton product a * b (apply b then a).

nlerp

Interpolates two rotations along the short arc and normalises the linear blend.

normalize

Unit vector in the direction of v; returns v unchanged if degenerate.

perspective

Builds a right-handed reverse-Z perspective projection with an infinite far plane.

quaternion_axis_angle

A quaternion of angle radians about unit axis axis.

quaternion_from_matrix

Returns the unit quaternion equivalent of a rotation matrix.

rotate

Rotates v by unit quaternion q.

scaling

A non-uniform scale matrix by s.

slerp

Interpolates two rotations at constant angular velocity along the short arc.

to_floating_origin

Decomposes an absolute world position into sector + local offset.

translation

A translation matrix by t.