EmptyStack

public sealed class EmptyStack : IObjectStack
Implements IObjextStack for an empty collection.

Constructors

EmptyStack

#
public EmptyStack(Color colour)
Create a new, empty stack.
colour (Color)Default colour.

Methods

AllObjectsAbove

#
public int[] AllObjectsAbove(double u, double v, int startAt)
Find all objects coincident with the (u,v) location at or above a given layer index.
u (double)U coordinate.
v (double)V coordinate.
startAt (int)Start layer. Objects on this layer are taken into account.
Array of all object indices coincident with (u,v) at or above the start layer.

AllObjectsBelow

#
public int[] AllObjectsBelow(double u, double v, int startAt)
Find all objects coincident with the (u,v) location at or below a given layer index.
u (double)U coordinate.
v (double)V coordinate.
startAt (int)Start layer. Objects on this layer are taken into account.
Array of all object indices coincident with (u,v) at or below the start layer.

ContinueAndSample

#
public Color ContinueAndSample(Ray ray)
Continue an existing ray.
ray (Ray)Ray to continue.
Colour at continued ray location.
ContinueAndSample

FirstObjectAbove

#
public int FirstObjectAbove(double x, double y, int startAt)
Find the index of the first object at the (u,v) location at or above the given layer index.
x (double)U coordinate.
y (double)V coordinate.
startAt (int)Start layer. Objects on this layer are taken into account.
The index of the first object coincident with (u,v) at or above the start layer. Or, if no object was found, -1.
FirstObjectAbove

FirstObjectBelow

#
public int FirstObjectBelow(double x, double y, int startAt)
Find the index of the first object at the (u,v) location at or below the given layer index.
x (double)U coordinate.
y (double)V coordinate.
startAt (int)Start layer. Objects on this layer are taken into account.
The index of the first object coincident with (u,v) at or below the start layer. Or, if no object was found, -1.
FirstObjectBelow

Sample

#
public Color Sample(Ray ray)
Shoot a ray into the object stack and evaluate the colour.
ray (Ray)Ray to shoot.
Colour at ray location.
Sample