Contains information about a ray bundle, using equal-length arrays, the length of which correspond to the number of rays in a bundle. Each array represents one trait of the ray. Of those, at least the vertices and directions should be set; for most of the optics managers (see tracer.optics_callables) that come with Tracer, the energy should also be set, and for the refractive ones, the current refractive index of the volume in which the ray is traveling.
The ray bundle also has a concept of its parent rays - an array where for each ray, an index into another bundle of rays is stored. This is used by optics managers and the tracer engine to keep track of progression of the source rays through reflections and refractions.
For examples on how to create ray bundles, see examples/, tracer.sources, and most of the test-suite.
Initialize the ray bundle as empty or using the given arrays. Let n be the number of rays, then for each of the arguments, .shape[-1] == n.
Arguments
Create a new ray bundle which copies this bundle, except in that rays denoted by selector are not copied. Basically equivalent to using inherit(), with an inverted selector and no other arguments.
Create an empty ray bundle - that is, a ray whose attributes are fully set, but to empty arrays of correct size.
Returns the number of rays in the bundle. Assumes that the mandatory attributes were set (vertices, directions).
Checks whether the looked-after property propname exists for this bundle.
Create a bundle with some ray properties given, and unspecified properties copied from this bundle, at the places noted by selector.
Arguments
Take a list of bundles and merge them into one bundle.
Arguments
Returns
A RayBundle object with all attributes that are set in the first bundle.