camera

package
v0.0.0-...-cec5250 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2017 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PinHole

type PinHole struct {
	Up                math3d.Vector3 `json:"up"`
	Right             math3d.Vector3 `json:"right"`
	Towards           math3d.Vector3 `json:"towards"`
	FocalPoint        math3d.Vector3 `json:"focalpoint"`
	FoV               float64        `json:"fieldofview"`
	ViewPlaneDistance float64        `json:"viewplanedistance"`
}

PinHole defines a pinhole camera in 3D space.

func DefaultPinHole

func DefaultPinHole() PinHole

DefaultPinHole returns a default PinHole camera

func PinHoleFromMap

func PinHoleFromMap(m map[string]interface{}) PinHole

PinHoleFromMap returns the pinhole camera defined in the map

func (*PinHole) GetIterator

func (ph *PinHole) GetIterator(width, height int) *TracingTargetIterator

GetIterator returns an iterator for the points that must be traced to render an image from a PinHole camera.

type TracingTargetIterator

type TracingTargetIterator struct {
	// contains filtered or unexported fields
}

TracingTargetIterator defines an iterator to get all points that must be traced. It's initialized from a Camera, a width and a height.

func (*TracingTargetIterator) HasNext

func (tti *TracingTargetIterator) HasNext() bool

HasNext returns true if there are some points left to trace.

func (*TracingTargetIterator) Next

func (tti *TracingTargetIterator) Next() (*math3d.Vector3, int, int)

Next returns the next point that must be traced.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL