L3DT users' wiki
Large 3D terrain generator

Connecting pins

Filters receive their input data from upstream filters and pass their output data to downstream filters via connections between pins. The example below shows a connection from the output pin on the 'Perlin' filter to the input pin on the 'SetRange' filter:

:plugins:calc:zeograph:userguide:pins:connect:connection.png
A connection between to filters' pins.

To connect two pins, you may:

  • Right-click on the first pin, select the 'Connect to…' menu option, then left-click on the second pin, or;
  • Left-click on the first pin, and hold down the mouse button whilst dragging the mouse to the second pin, then release.

There are some rules to consider when connecting pins, as explained below.

Pins directions

Input pins (left side) may only be connected to output pins (right side). You may not connect an output pin to another output pin, nor one input pin to another input pin.

Pin type negotiation

Usually, pins are connected to other pins that are of the same type. However, in some instances it may be necessary to connect two pins of different types. If the data types of the two pins to be connected are compatible, ZeoGraph will automatically convert the data provided by the output pin into the type required by the input pin. If the data types are incompatible, ZeoGraph will refuse to connect the pins and report an error.

Variant pins

Pins with a data type of variant are a special class, and have no fixed data type. Typically, these pins automatically change their data type to match the pin to which they are connected.

When two variant pins are to be connected together, ZeoGraph is not able to determine which data type should be used for the connection. In this case, the user will be asked to select a data type from a list, and ZeoGraph will then automatically insert a General::CastType2 filter into the connection to establish the data type.

Circular connections

ZeoGraph will prevent you from connecting pins that would form a circular graph. Circular graphs are paradoxes in which the input of a filter indirectly depends on its own output. Such a graph can never be started, because any self-dependent filters have to wait for themselves to finish (to provide output) before they can start (and read inputs).

Consider the example graph below. If the connection indicated by the red line were allowed to occur, the input to filter 1 (Resize) would depend on the output of filter 3 (MirrorX). However, the input to filter 3 is already dependent on the output of filter 2 (RotateCW), and filter 2 is already dependent on filter 1. Thus, filter 1 would be indirectly dependent on itself 1), which would make it an illegal circular connection.

If filters 1 and 3 were connected, this would form a circular graph.

Pins on same filter

Similar to the case of circular graphs discussed above, ZeoGraph will also prevent you from connecting an output pin to an input pin on the same filter, and vice versa. This again prevents a dead-lock paradox, where the filter would have to wait for itself to finish before it could start.

Disconnecting pins

To disconnect a pin, right-click the mouse on the pin, and select the 'disconnect' menu option from the context menu.

To disconnect all the pins on a filter, select the filter with the left mouse button, then select the 'Filter→Disconnect' menu option, or select the 'disconnect filter' toolbar button shown below:

The 'disconnect filter' toolbar button.

1) In fact, all the filters would be circularly dependent on themselves, not just filter 1.
 
plugins/calc/zeograph/userguide/pins/connect.txt · Last modified: 2017/08/31 06:46 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki