ray

package
v0.0.0-...-8cfed74 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ray

type Ray struct {
	Origin    tuple.Tuple
	Direction tuple.Tuple
}

Ray represents a ray

func New

func New(o tuple.Tuple, d tuple.Tuple) Ray

New returns a ray with given origin and direction

func (Ray) Position

func (r Ray) Position(t float64) tuple.Tuple

Position returns the position of a point on a ray at distance t

func (Ray) Transform

func (r Ray) Transform(m *matrix.Matrix) Ray

Transform applies a transform to a ray and returns the transformed ray

Jump to

Keyboard shortcuts

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