This module implements functionality for dynamically setting up circuits of arbitrary objects with selected fields and properties connected to each other.
This allows for building object graphs with a defined data flow from source properties to other objects' destination properties known from many graphically oriented use cases such as the "Node Editor" in Blender, binding dependency properties in WPF, etc. In contrast to other libraries, Xirkit can take any C# type of object as a node within a circuit and any field or property of such objects may serve as incoming or outgoing connecion pins.
The animation part of FUSEEsThe most important types in this module are is implemented on top of Xirkit to dynamically wire animation tracks to actual scene graph objects' properties.
The Animation Class is capable of storing and handling different types of Channels.
Class used inside Xirkit to accces (read and write) nested members that are referenced by a chain of properties/fields separated by the object-access operator '.' (dot).
Generic Channel implementation capable of storing keyframes of the given Type.
Base class containing functionality common to all Channel types, no matter of the type of the values of the containing key frames.
A Circuit contains arbitrary objects. Connections between the objects' members (fields and properties) automatically handle value propagation - if a source value changes, all the connected members will be set to the updated value.
This is the main object of the Xirkit package. Compare a Circuit to a real electronic circuit with the electronic components being instances of objects, their pins welded to the board being instances of IInPin and IOutPin connected to each others by conductive paths. Instead of electricity floating along the connections, a Circuit instance transmits values of certain types from node to node. If you are familiar with CINEMA 4D's XPresso, you know what a Circuit is. You can also compare Xirkit to WPF's Dependency Properties.
To build up a Circuit in code, create a new Circuit. For each arbitrary object that should be connected in the Circuit, create a hosting Node instance, passing the participating object to the Node's constructor. Use AddNode(Node) to add each new node (with the hosted object). Then use Attach(String, Node, String) to connect members (fields and properties) of objects contained in two different nodes to each others.
Technically a Circuit is a container filled with Node instances that are related to each others by connected (in- and out-) pins. A number of these nodes are specified as root nodes. Whenever a circuit is executed by calling its Execute method, the values of all out-pins at the root nodes are propagated (and possibly converted) the their connected in-pins, which in turn might trigger subsequent propagation along the graph. Nodes exposing the ICalculationPerformer interface are triggered to perform their calculation before the values at their out-pins are further propagated.
Member Accessor implementation specialized on accessing fields where the type of the pin and the actual type of the field are different. The accsessor performs the conversion operation specefied when performing its set or get operations.
Member Accessor implementation specialized on accessing properties (using set and get) where the type of the pin and the actual type of the field are different. The accsessor performs the conversion operation specefied when performing its set or get operations.
Member Accessor implementation specialized on accessing fields.
Class representing incoming pins to nodes.
This Class represents a Keyframe it has a time and a Value.
provides different LerpFunctions that can be used in a channel. A Lerp Function represents a linear interpolataion between 2 points in a timeline.
This is needed to sort the List in the Channel Class.
Major building block of the Xirkit library. Each Circuit contains Node instances.
A single object instance of any type can be hosted inside a node. This way any arbitrary object can participate in a Circuit. Node instances within a Circuit are interconnected using in-pins and out-pins. The internal connection from pins to actual members (properties and fields) of the contained object are done using IMemberAccessorTs.
Class representing outgoing pins to nodes.
Member Accessor implementation specialized on accessing properties (using set and get).
Users should implement this interface on objects if a custom calculation is to be performed whenever the object is used within the node of a circuit.
Interface used to handle incoming pins to nodes. This interface contains all relevant parts of an in-pin implementation not actually bound to the type of the pin.
Interface used to handle incoming pins to nodes. This interface contains all relevant parts of an out-pin implementation not actually bound to the type of the pin
A function that returns a generic Type. The Functions can be seen in Lerp.cs
A delegate function for setting a value.
Event handler type. Methods whith this signature can be registered on the ReceivedValue event.