ray

package
v0.0.0-...-adcb094 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Unlicense Imports: 1 Imported by: 0

Documentation

Overview

Package ray implements the interface and methods to work with rays.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ray

type Ray interface {
	Origin() *vec3.Vec3Impl
	Direction() *vec3.Vec3Impl
	PointAtParameter(t float64) *vec3.Vec3Impl
	Time() float64
}

Ray defines the methods used to work with rays.

type RayImpl

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

RayImpl implements the Ray interface.

func New

func New(origin *vec3.Vec3Impl, direction *vec3.Vec3Impl, time float64) *RayImpl

New returns a new ray with the supplied origin and direction vectors and time.

func (*RayImpl) Direction

func (r *RayImpl) Direction() *vec3.Vec3Impl

Direction returns the direction vector of this ray.

func (*RayImpl) Origin

func (r *RayImpl) Origin() *vec3.Vec3Impl

Origin returns the origin vector of this ray.

func (*RayImpl) PointAtParameter

func (r *RayImpl) PointAtParameter(t float64) *vec3.Vec3Impl

PointAtParameter is used to traverse the ray.

func (*RayImpl) Time

func (r *RayImpl) Time() float64

Time returns the time associated with this ray.

Jump to

Keyboard shortcuts

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