Class: Rendering

Rendering

new Rendering()

The rendering object, which has two main functionalities: - render the surface - offer drag-able elements, to control light and seedline.
Source:

Methods

init(surface, seedLine)

Initializes the renderer.
Parameters:
Name Type Description
surface StreamSurface The surface to be rendered.
seedLine SeedLine The seed line, which was used to sample the particles (also rendered).
Source:

initScene()

Initializes the scene (except surface and seed line).
Source:

initSeedLine()

Initializes the rendering of the seed line.
Source:

initSurface()

Initializes the rendering of the surface.
Source:

onDocumentMouseDown()

Callback for mouse down event. If there is an object under the mouse, it is marked as selected, and will be moved, when the mouse is moved.
Source:

onDocumentMouseMove()

Callback, when the mouse is moved. If there is a selected object, the object is moved.
Source:

onDocumentMouseUp()

Callback for mouse up event. Removes an object from being selected.
Source:

onWindowResize()

Callback when the window is resized.
Source:

points2quads()

This method creates quads for each particle, which are normal aligned to the surface normal. TODO replace by - not yet supported - geometry shader.
Source:

refresh(surface)

Resets the scene according to the new surface.
Parameters:
Name Type Description
surface StreamSurface The new surface.
Source:

render()

Renders the the surface, the seed line and the scene.
Source:

resetCamera()

Sets the camera back to its initial position.
Source: