Documentation ¶
Overview ¶
Package control implements controllers for cameras
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrbitControl ¶
type OrbitControl struct { Enabled bool // Control enabled state EnableRotate bool // Rotate enabled state EnableZoom bool // Zoom enabled state EnablePan bool // Pan enabled state EnableKeys bool // Enable keys state ZoomSpeed float32 // Zoom speed factor. Default is 1.0 RotateSpeed float32 // Rotate speed factor. Default is 1.0 MinDistance float32 // Minimum distance from target. Default is 0.01 MaxDistance float32 // Maximum distance from target. Default is infinity MinPolarAngle float32 // Minimum polar angle for rotatiom MaxPolarAngle float32 MinAzimuthAngle float32 MaxAzimuthAngle float32 KeyRotateSpeed float32 KeyPanSpeed float32 // contains filtered or unexported fields }
OrbitControl is a camera controller that allows orbiting a center point while looking at it.
func NewOrbitControl ¶
func NewOrbitControl(icam camera.ICamera, win window.IWindow) *OrbitControl
NewOrbitControl creates and returns a pointer to a new orbito control for the specified camera and window
func (*OrbitControl) Dispose ¶
func (oc *OrbitControl) Dispose()
Dispose unsubscribes from all events
func (*OrbitControl) Pan ¶
func (oc *OrbitControl) Pan(deltaX, deltaY float32)
Pan the camera and target by the specified deltas
func (*OrbitControl) RotateLeft ¶
func (oc *OrbitControl) RotateLeft(angle float32)
RotateLeft rotates the camera left by specified angle
func (*OrbitControl) RotateUp ¶
func (oc *OrbitControl) RotateUp(angle float32)
RotateUp rotates the camera up by specified angle
Click to show internal directories.
Click to hide internal directories.