Core::Cycle 
#include "Core/Nodes/Cycle.h"
Inherits from Core::Node, std::enable_shared_from_this< Node >
Public Types 
| Name | |
|---|---|
| enum class | EMode { Once, Repeat, PingPong} | 
Public Functions 
| Name | |
|---|---|
| Cycle() | |
| float | getFrom() const | 
| float | getManualStep() const | 
| EMode | getMode() | 
| bool | getSmoothStep() const | 
| float | getStep() const | 
| float | getStepDuration() const | 
| float | getTo() const | 
| bool | isRunning() const | 
| void | pause() | 
| void | play() | 
| void | rewind() | 
| void | setFrom(float from) | 
| void | setManualStep(float v) | 
| void | setMode(EMode mode) | 
| void | setSmoothStep(bool smoothStep) | 
| void | setStep(float v) | 
| void | setStepDuration(float stepDuration) | 
| void | setTo(float to) | 
| void | stepBack() | 
| void | stepNext() | 
| void | stopAndReset() | 
| void | update(double deltaSeconds)<br>Perform a regular cycle value update (if running). | 
| virtual void | updateValues(int inputIndex) override<br>Update the inner state from all connected inputs (take values from the from, to, step and pulse inputs). | 
| void | wind() | 
Additional inherited members 
Public Functions inherited from Core::Node
| Name | |
|---|---|
| virtual void | addDeleteCallback(std::function< void(Node )> callback)<br> The callback parameters: Node = node that has been deleted | 
| virtual void | addPlugCallback(std::function< void(Node *, Node *, size_t, size_t)> callback)<br>Registers a callback that gets called when the node's output pins get plugged in. | 
| virtual void | addUnplugCallback(std::function< void(Node *, Node *, size_t, size_t)> callback)<br>Registers a callback that gets called when the node's input pins get unplugged. | 
| virtual void | addUpdateCallback(std::function< void(Node *)> callback)<br>Registers a callback that gets called on any updateValues() call. | 
| void | appendChildNode(Ptr< Node > node) | 
| bool | areAllInputsPlugged() | 
| bool | areAllInputsUnplugged() const | 
| bool | areInputsPlugged(int numInputs) | 
| template <typename T > <br>Ptr< T > | as() | 
| const Data & | data(size_t index =0) const<br>Get Node contents, read only. | 
| Data & | dataMut(size_t index) | 
| void | finalize()<br>Prepares node for its destruction, after that the destructor can be called. | 
| ID | getId() const | 
| Pin & | getInput(size_t i) | 
| std::vector< Pin > & | getInputPins() | 
| Data & | getInternalData(size_t index =0)<br>Get data storage for read and write purposes. | 
| const char * | getLabel() const | 
| const Operation & | getOperation() const | 
| Pin & | getOutput(size_t i) | 
| std::vector< Pin > & | getOutputPins() | 
| Ptr< Node > | getOwner() const<br>Get direct owner of this node. | 
| Ptr< Node > | getPtr()<br>Get reference to this node instance. | 
| Ptr< Node > | getRootOwner()<br>Get the topmost owner of this node. | 
| std::string | getSignature()<br>"{node type} #{node ID}" | 
| EValueState | getState(size_t pinIndex =0) | 
| void | init()<br>Initialize node id, inputs, and outputs according to the preset node type. | 
| void | notifyOwner() | 
| virtual void | onInit() | 
| bool | operator!=(const Node & other) const | 
| bool | operator==(const Node & other) const | 
| ENodePlugResult | plug(const Ptr< Node > & childNode, unsigned fromIndex, unsigned toIndex)<br>Connect this (parent) node output to the childNodeinput. | 
| void | pulse(size_t index) | 
| virtual void | receiveSignal(int inputIndex)<br>Implements the operator reaction to the change of its inputIndex input. | 
| virtual SetValueResult | setValue(const glm::mat4 & mat) | 
| virtual SetValueResult | setValue(const glm::mat4 & mat, const DataMap & map)<br>Smart set function, used with constrained transformation for value checking. | 
| virtual SetValueResult | setValue(const glm::quat & q) | 
| virtual SetValueResult | setValue(const glm::vec3 & vec) | 
| virtual SetValueResult | setValue(const glm::vec4 & vec) | 
| template <typename T > <br>SetValueResult | setValue(const T & value, unsigned index) | 
| virtual SetValueResult | setValue(float val)<br>Set the value of the node. | 
| virtual SetValueResult | setValue(float val, glm::ivec2 coords) | 
| virtual SetValueResult | setValue(void * ptr) | 
| void | spreadSignal()<br>Spread signal to all outputs. | 
| void | spreadSignal(size_t outIndex)<br>Spread signal to the selected output outIndex only. | 
Protected Functions inherited from Core::Node
| Name | |
|---|---|
| Node(const Operation & operation)<br>Node is never constructed directory. | |
| virtual | ~Node() | 
| ENodePlugResult | isPlugCorrect(const Pin & input, const Pin & output) | 
| virtual void | onUnplugInput(size_t index) | 
| template <typename T > <br>void | setInternalValue(const T & value, size_t index =0)<br>Sets the node value without validation. | 
| void | setInternalValue(float value, glm::ivec2 coordinates, size_t index =0) | 
| bool | shouldPulse(size_t inputIndex, size_t updatedInputIndex)<br>Tests if the updatedInputIndexshould be pulsed. | 
| void | triggerDeleteCallback(Node * node) | 
| void | triggerPlugCallback(Node * fromNode, Node * toNode, size_t fromIndex, size_t toIndex) | 
| void | triggerUnplugCallback(Node * fromNode, Node * toNode, size_t fromIndex, size_t toIndex) | 
| void | triggerUpdateCallback(Node * node) | 
Public Attributes inherited from Core::Node
| Name | |
|---|---|
| std::vector< EValueState > | m_OperatorState | 
Protected Attributes inherited from Core::Node
| Name | |
|---|---|
| std::vector< Node * > | m_children <br>Nested nodes. | 
| ID | m_id | 
| std::vector< Pin > | m_inputs <br>Inputs of the box: Input tabs with glyphs. | 
| std::vector< Data > | m_internalData <br>Results of operations. | 
| Operation | m_operation <br>Operator node properties. | 
| std::vector< Pin > | m_outputs <br>Outputs of the box: output tabs with glyphs. | 
| Node * | m_owner <br>Owner of the node, used in complex type of nodes, such as sequence or camera. | 
Friends inherited from Core::Node
| Name | |
|---|---|
| class | GraphManager | 
| class | Pin | 
Public Types Documentation 
enum EMode 
| Enumerator | Value | Description | 
|---|---|---|
| Once | ||
| Repeat | ||
| PingPong | 
Public Functions Documentation 
function Cycle 
inline Cycle()inline Cycle()function getFrom 
float getFrom() constfloat getFrom() constfunction getManualStep 
float getManualStep() constfloat getManualStep() constfunction getMode 
inline EMode getMode()inline EMode getMode()function getSmoothStep 
inline bool getSmoothStep() constinline bool getSmoothStep() constfunction getStep 
float getStep() constfloat getStep() constfunction getStepDuration 
inline float getStepDuration() constinline float getStepDuration() constfunction getTo 
float getTo() constfloat getTo() constfunction isRunning 
bool isRunning() constbool isRunning() constfunction pause 
void pause()void pause()function play 
void play()void play()function rewind 
void rewind()void rewind()function setFrom 
void setFrom(
    float from
)void setFrom(
    float from
)Parameters:
- from start value
function setManualStep 
void setManualStep(
    float v
)void setManualStep(
    float v
)Parameters:
- v increment added to/subtracted from the cycle value after user action - click to Next/Prev button
function setMode 
inline void setMode(
    EMode mode
)inline void setMode(
    EMode mode
)< direction from m_from to m_to
function setSmoothStep 
inline void setSmoothStep(
    bool smoothStep
)inline void setSmoothStep(
    bool smoothStep
)function setStep 
void setStep(
    float v
)void setStep(
    float v
)Parameters:
- v should be a loop increment
function setStepDuration 
inline void setStepDuration(
    float stepDuration
)inline void setStepDuration(
    float stepDuration
)function setTo 
void setTo(
    float to
)void setTo(
    float to
)Parameters:
- to end value
function stepBack 
void stepBack()void stepBack()function stepNext 
void stepNext()void stepNext()function stopAndReset 
void stopAndReset()void stopAndReset()function update 
void update(
    double deltaSeconds
)void update(
    double deltaSeconds
)Perform a regular cycle value update (if running).
Parameters:
- deltaSeconds elapsed time
Called by the GraphManager::update(double tick) Adjusts the increment and calls updateValue(increment).
function updateValues 
virtual void updateValues(
    int inputIndex
) overridevirtual void updateValues(
    int inputIndex
) overrideUpdate the inner state from all connected inputs (take values from the from, to, step and pulse inputs).
Todo: (PF) Why does it ignore the input pin????
Reimplements: Core::Node::updateValues
function wind 
void wind()void wind()Updated on 2025-09-07 at 16:13:51 +0000