Constructors
Raycaster
#Create a new raycaster.
public Raycaster()
width,
Target image width.
height,
Target image height.
background,
Background shader. If null, a transparent background will be used.
objects
Ordered collection of objects.
Raycaster
#Create a new raycaster with a transparent background.
public Raycaster()
width,
Target image width.
height,
Target image height.
objects
Ordered collection of objects.
Fields
Properties
Background
#Gets the background shader. This shader may be null, in which case a fully transparent background is implied.
CurrentSamplingLevel
#Gets the current sampling level. Not all pixels are necessarily being sampled at this level though, only at least one of them is. Negative sampling levels indicate a coarse sampling, every (-N)th pixels.
Indexers
Methods
ContinueAndSample
#Continue an existing ray.
Returns: Colour at continued ray location.
Implements: ContinueAndSample
ContinueImage
#Continue a finished raycasting process. This method cannot be called while a process is already running.
public void ContinueImage()
ContinueImageAsync
#Continue a finished raycasting process asynchronously. This method cannot be called while a process is already running.
public void ContinueImageAsync()
FirstObjectAbove
#Find the index of the first object at the (u,v) location at or above the given layer index.
Returns: The index of the first object coincident with (u,v) at or above the start layer. Or, if no object was found, -1.
Implements: FirstObjectAbove
FirstObjectBelow
#Find the index of the first object at the (u,v) location at or below the given layer index.
Returns: The index of the first object coincident with (u,v) at or below the start layer. Or, if no object was found, -1.
Implements: FirstObjectBelow
ResurrectAllPixels
#Move all dead pixels back onto the alive list.
Sample
#Shoot a way into the object stack and evaluate the colour.
Returns: Colour at ray location.
Implements: Sample
ToBitmap
#Blit this raycaster into an existing bitmap. The bitmap will be locked for this procedure.
public void ToBitmap()
Bitmap
bitmap
Lockable bitmap with the correct dimensions.
ToBucketMap
#Create a bitmap showing the bucket occupancy.
public Bitmap ToBucketMap()
Returns: Bucket map.
ToCompletionMap
#Create a bitmap showing the completed pixels vs the live pixels.
public Bitmap ToCompletionMap()
gradient,
Gradient to use on dead pixels. If null, the default gradient will be used.
Color?
liveColour
Optional colour to use on live pixels. If omitted, live pixels will be mapped onto the gradient.
ToCompletionMap
#Blit the raycaster live-pixel data into an existing bitmap. The bitmap will be locked for this procedure.
public void ToCompletionMap()
Bitmap
bitmap,
Lockable bitmap with the correct dimensions.
gradient,
Gradient to use on dead pixels. If null, the default gradient will be used.
Color?
liveColour
Optional colour to use on live pixels. If omitted, live pixels will be mapped onto the gradient.