Spc.Intersect: Find the distance at which a ray first intersects with an...

Description Usage Arguments Value Examples

View source: R/classdefs.R

Description

Find the distance at which a ray first intersects with an object, plus any relevant object properties at the point of intersection

Usage

1
Spc.Intersect(ray.origin, ray.direction, object)

Arguments

ray.origin

A positional vector of where the ray originates

ray.direction

A directional vector for the ray's direction

object

The object (elementary or compound) we're testing for intersection

Value

A list of intersect properties, consisting of: distance = intersect distance (as proportin of the length of ray.direction); normal = the surafce normal at the point of intersect. FOr the sake of efficiecy this will be of arbitrary length; properties = the *properties* attribute from the intersected object (or NA if none); north, east = where applicable, a pair of values representing the point of inetrsection from the object's perspective

Examples

1
  Spc.Intersect (c(0,0,0), c(0,1,0),  my_world)

JerBoon/vecspace documentation built on May 26, 2019, 7:28 a.m.