Vixen
02b45cc4
csharp
public struct CameraShot

Where a virtual camera would put the real one this frame, if it were the one being watched.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The stages write it in turn and it is the only thing they share. A body decides Position, an aim decides Rotation, an extension corrects both, and noise adds a shake that the next frame's damping must not see — so the shake is held apart in ShakePosition and ShakeRotation and folded in only by Composed. Feeding a shake back into a damped position produces a camera that chases its own jitter, which is a bug that looks like a physics problem.

Not [DataContract], so no scene can carry one. It is derived every frame from components that are authored, and a file that recorded a half-damped position would reload into the middle of a motion nobody asked for. The same argument WorldTransform makes.

The engine attaches it. A shot placed by a scene or created by hand is given one by VirtualCameraSystem on the frame after it appears, so nothing has to remember to.

Fields and properties (6)

  • public Vector3 Position

    Where the camera would be, in world space, before any shake.

  • public Quaternion Rotation

    Which way it would look, before any shake and before Dutch.

  • public CameraLens Lens

    The optics it asks for.

  • public Vector3 ShakePosition

    This frame's positional shake, in camera space. Cleared and rebuilt every frame.

  • public Quaternion ShakeRotation

    This frame's rotational shake, in camera space. Cleared and rebuilt every frame.

  • public bool HasHistory

    Whether the shot has been evaluated before. False makes every stage snap rather than damp.

Methods (2)

  • public readonly void Composed(out Vector3 position, out Quaternion rotation)

    The shot as it would actually be rendered: shake folded in, Dutch angle applied.

  • public static CameraShot At(Vector3 position, Quaternion rotation)

    A shot at a place, looking a way, through the default lens.

Used by (9)

  • CameraDirectorSystemVixen.Engine
  • PlayerCameraTestsVixen.Engine.Tests
  • RigVixen.Engine.Tests
  • RigVixen.Engine.Tests
  • TrackedDollyTestsVixen.Engine.Tests
  • TypeRegistrationVixen.Engine
  • VirtualCameraSystemVixen.Engine
  • VirtualCameraTestsVixen.Engine.Tests
  • VirtualCamerasVixen.Engine