Documentation ¶
Overview ¶
Package dolly maps user input to camera movements.
Index ¶
- Constants
- Variables
- type AxisPointingUp
- type Camera
- type Dollies
- func (dols Dollies) Add(dol Dolly)
- func (dols Dollies) DeleteCamera(name string) dryad.Set[string]
- func (dols Dollies) DeleteSources(sources dryad.Set[string])
- func (dols Dollies) Drive(fresh mechuievent.Collections, delta watchable.ChronoShift)
- func (dols Dollies) KeepSourcesIn(sources dryad.Set[string])
- func (dols Dollies) UnconnectedSourcesIn(sources dryad.Set[string]) dryad.Set[string]
- func (dols Dollies) UpdateCamera(camera Camera)
- type Dolly
- type DollyMaker
- type SpatialMode
- type SpatialSpec
- type SphericalMode
- type SphericalSpec
Constants ¶
const ( // Let the direction of the positive Y-axis of the parent frame of the // camera frame be taken as pointing 'up'. Y = AxisPointingUp(iota) // Let the direction of the positive X-axis of the parent frame of the // camera frame be taken as pointing 'up'. X // Let the direction of the positive Z-axis of the parent frame of the // camera frame be taken as pointing 'up'. Z )
const ( SpatialMiasmaMode = SpatialMode(iota) SpatialGameMode SpatialJetPackMode )
const ( SphericalInnyMode = SphericalMode(iota) SphericalOutyMode SphericalSurfaceInnyMode SphericalSurfaceOutyMode )
Variables ¶
var ( SpatialGame = NewSpatial(SpatialSpec{ SpatialMode: SpatialGameMode, Up: Y, }) SpatialJetPack = NewSpatial(SpatialSpec{ SpatialMode: SpatialJetPackMode, Up: Y, }) SpatialMiasma = NewSpatial(SpatialSpec{ SpatialMode: SpatialMiasmaMode, Up: Y, }) )
var ( SphericalInwardsSurface = NewSpherical(SphericalSpec{ SphericalMode: SphericalSurfaceInnyMode, Up: Y, }) SphericalOutwardsSurface = NewSpherical(SphericalSpec{ SphericalMode: SphericalSurfaceOutyMode, Up: Y, }) )
Functions ¶
This section is empty.
Types ¶
type AxisPointingUp ¶
type AxisPointingUp uint
AxisPointingUp defines which axis points in the direction of what is considered 'up' in the implied reference frame.
Note that the camera's local up direction is always taken as the positive Y-axis direction.
The choice of up direction is relevant, for example, when used in conjunction with a static roll mode and/or a static elevation mode.
type Camera ¶
type Camera struct { Aspect float64 Inverse maf.Mat4 // Inverse of the lens (eye-to-clip) transformation. Name string Node *mechtree.Node }
A Camera attached to a tree.
type Dollies ¶
type Dollies struct {
// contains filtered or unexported fields
}
A Dollies is a collection of dollies.
func (Dollies) DeleteCamera ¶
DeleteCamera from the dollies by deleting any dollies with that camera name.
Return the newly disconnected sources.
func (Dollies) DeleteSources ¶
DeleteSources from the dollies.
func (Dollies) Drive ¶
func (dols Dollies) Drive( fresh mechuievent.Collections, delta watchable.ChronoShift, )
Drive all the dollies taking into account the given fresh UI events.
func (Dollies) KeepSourcesIn ¶
KeepSourcesIn the dollies which are present in the argument.
func (Dollies) UnconnectedSourcesIn ¶
UnconnectedSourcesIn the argument sources.
This is sources which are present in the argument but not in the dollies.
func (Dollies) UpdateCamera ¶
UpdateCamera in the dollies.
type DollyMaker ¶
A DollyMaker links a camera and input source to a new Dolly.
func NewSpatial ¶
func NewSpatial(spec SpatialSpec) DollyMaker
NewSpatial constructs a new Spatial dolly (maker).
func NewSpherical ¶
func NewSpherical(spec SphericalSpec) DollyMaker
NewSpherical constructs a new Spherical dolly (maker).
type SpatialMode ¶
type SpatialMode uint
type SpatialSpec ¶
type SpatialSpec struct { SpatialMode SpatialMode Up AxisPointingUp }
A SpatialSpec specifies the properties of a new Spatial dolly.
type SphericalMode ¶
type SphericalMode uint
type SphericalSpec ¶
type SphericalSpec struct { SphericalMode SphericalMode Up AxisPointingUp }
A SphericalSpec specifies the properties of a new Spherical dolly.