use of com.talosvfx.talos.runtime.Slot in project talos by rockbite.
the class AbstractModule method fetchInputSlotValue.
/**
* Fetch value from the input of this module
* @param slotId
*/
public void fetchInputSlotValue(int slotId) {
// find what it is connected to
Slot inputSlot = inputSlots.get(slotId);
if (inputSlot == null) {
return;
}
if (inputSlot.getTargetSlot() == null) {
if (inputSlot.getValue() == null)
return;
inputSlot.getValue().setEmpty(true);
} else {
// ask it's module give it's output value
Value result = inputSlot.getTargetModule().fetchOutputSlotValue(inputSlot.getTargetSlot().getIndex());
if (result != null) {
inputSlot.getValue().set(result);
inputSlot.getValue().setEmpty(false);
}
}
}
use of com.talosvfx.talos.runtime.Slot in project talos by rockbite.
the class AbstractModule method createInputSlot.
public NumericalValue createInputSlot(int slotId) {
inputSlots.put(slotId, new Slot(this, slotId, true));
NumericalValue value = new NumericalValue();
inputSlots.get(slotId).setValue(value);
return value;
}
use of com.talosvfx.talos.runtime.Slot in project talos by rockbite.
the class AbstractModule method detach.
public void detach(AbstractModule module) {
for (Slot slot : inputSlots.values()) {
if (slot.getTargetModule() == module) {
slot.getTargetSlot().detach();
slot.detach();
}
}
}
Aggregations