Interval

struct Interval

Represents a time interval over which a sensor exposure occurs.

Internally stores explicit start and end times. Provides named factory methods for the common parameterizations used in space imaging:

  • centered: midpoint time + total duration (e.g., “observe at T ± dt/2”)

  • from_start: start time + integration length

  • from_bounds: explicit start and end times

A zero-duration interval (start == end) implies no motion blur.

Poses set by hand (a node’s position, rotation, velocity and angular velocity, as opposed to SPICE) hold at the interval’s reference time, and the velocities carry them from there through the exposure. The reference is the time the interval was made from: the start for from_start, from_bounds and the constructor, and the center for from_centered. A render without motion blur (one temporal sample) is taken at the exposure’s center, so it shows what a motion-blurred render shows on average: an object that streaks with motion blur is seen at the middle of its streak without it.

Public Functions

inline Interval(Time t0, Time tf)

Its reference time is its start.

Throws:

std::runtime_error – if it ends before it starts.

inline void check() const

Throws if the interval ends before it starts, which would give a negative exposure. (Its times are finite, as every Time is.) SceneView checks it again, since the fields can be changed.

inline Time center() const

The midpoint of the exposure interval.

inline units::Second duration() const

The total duration of the exposure in seconds.

Public Members

Time start
Time end
Time reference

The time that poses set by hand refer to (see above): the start, or the center for an interval made with from_centered. It can be set to any time.

Public Static Functions

static inline Interval from_centered(const Time &center, units::Second duration)

Construct an exposure interval centered on a given time.

Parameters:
  • center – The midpoint of the exposure, and its reference time.

  • duration – The total integration time: non-negative.

Throws:

std::runtime_error – if the duration is negative or not finite.

Returns:

Interval spanning [center - duration/2, center + duration/2].

static inline Interval from_start(const Time &start, units::Second duration)

Construct an exposure interval from a start time and duration.

Parameters:
  • start – The beginning of the exposure, and its reference time.

  • duration – The total integration time: non-negative.

Throws:

std::runtime_error – if the duration is negative or not finite.

Returns:

Interval spanning [start, start + duration].

static inline Interval from_bounds(const Time &start, const Time &end)

Construct an exposure interval from explicit start and end times.

Parameters:
  • start – The beginning of the exposure, and its reference time.

  • end – The end of the exposure.

Returns:

Interval spanning [start, end].