Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Camera ¶
type Camera struct { EyeLocation geometry.Point TargetLocation geometry.Point UpVector geometry.Vector VerticalFOV float64 AspectRatio float64 Aperture float64 FocusDistance float64 // contains filtered or unexported fields }
A Camera holds information about the scene's camera and facilitates the casting of Rays into the scene
func (*Camera) GetRay ¶
GetRay returns a Ray from the eye location to a point on the view place u% across and v% up
func (*Camera) Setup ¶
func (c *Camera) Setup(p *Parameters) error
Setup is called after allocating the Camera struct and filling the exported fields It fills the unexported fields, such as derived vectors and measures
type Parameters ¶
type Parameters struct { ImageWidth int // width of the image in pixels ImageHeight int // height of the image in pixels FileType filetype.FileType // image file type (png, jpg, etc.) GammaCorrection float64 // how much gamma correction to perform on the image UseScalingTruncation bool // should the program truncate over-magnitude colors by scaling linearly as opposed to clamping? SamplesPerRound int // amount of samples to write per rounds RoundCount int // amount of rounds per render TileWidth int // width of a tile in pixels TileHeight int // height of a tile in pixels MaxBounces int // amount of reflections to check before giving up UseBVH bool // should the program generate and use a Bounding Volume Hierarchy? BackgroundColorMagnitude float64 // amount to scale bg color by BackgroundColor shading.Color // color to return when nothing is intersected TMin float64 // minimum ray "time" to count intersection TMax float64 // maximum ray "time" to count intersection Scene *Scene // Scene reference }
Parameters holds top-level information about the program's execution and the image's properties
type PhotolumData ¶
func InitPhotolumData ¶
func InitPhotolumData(log *logrus.Logger) (*PhotolumData, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.