Skip to content

Core::Cycle ​

#include "Core/Nodes/Cycle.h"

Inherits from Core::Node, std::enable_shared_from_this< Node >

Public Types ​

Name
enum classEMode { Once, Repeat, PingPong}

Public Functions ​

Name
Cycle()
floatgetFrom() const
floatgetManualStep() const
EModegetMode()
boolgetSmoothStep() const
floatgetStep() const
floatgetStepDuration() const
floatgetTo() const
boolisRunning() const
voidpause()
voidplay()
voidrewind()
voidsetFrom(float from)
voidsetManualStep(float v)
voidsetMode(EMode mode)
voidsetSmoothStep(bool smoothStep)
voidsetStep(float v)
voidsetStepDuration(float stepDuration)
voidsetTo(float to)
voidstepBack()
voidstepNext()
voidstopAndReset()
voidupdate(double deltaSeconds)<br>Perform a regular cycle value update (if running).
virtual voidupdateValues(int inputIndex) override<br>Update the inner state from all connected inputs (take values from the from, to, step and pulse inputs).
voidwind()

Additional inherited members ​

Public Functions inherited from Core::Node

Name
virtual voidaddDeleteCallback(std::function< void(Node *)> callback)<br> The callback parameters:
virtual voidaddPlugCallback(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 voidaddUnplugCallback(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 voidaddUpdateCallback(std::function< void(Node *)> callback)<br>Registers a callback that gets called on any updateValues() call.
voidappendChildNode(Ptr< Node > node)
boolareAllInputsPlugged()
boolareAllInputsUnplugged() const
boolareInputsPlugged(int numInputs)
template <typename T &gt; <br>Ptr< T >as()
template <typename T &gt; <br>T *asRaw()
const Data &data(size_t index =0) const<br>Get Node contents, read only.
Data &dataMut(size_t index)
voidfinalize()<br>Prepares node for its destruction, after that the destructor can be called.
IDgetId() 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::stringgetSignature()<br>"{node type} #{node ID}"
EValueStategetState(size_t pinIndex =0)
TrackedNodeData *getTrackingData()
voidinit()<br>Initialize node id, inputs, and outputs according to the preset node type.
voidnotifyOwner()
virtual voidonInit()
booloperator!=(const Node & other) const
booloperator==(const Node & other) const
ENodePlugResultplug(const Ptr< Node > & childNode, unsigned fromIndex, unsigned toIndex)<br>Connect this (parent) node output to the childNode input.
voidpulse(size_t index)
virtual voidreceiveSignal(int inputIndex)<br>Implements the operator reaction to the change of its inputIndex input.
virtual SetValueResultsetValue(const glm::mat4 & mat)
virtual SetValueResultsetValue(const glm::mat4 & mat, const DataMap & map)<br>Smart set function, used with constrained transformation for value checking.
virtual SetValueResultsetValue(const glm::quat & q)
virtual SetValueResultsetValue(const glm::vec3 & vec)
virtual SetValueResultsetValue(const glm::vec4 & vec)
template <typename T &gt; <br>SetValueResultsetValue(const T & value, unsigned index)
virtual SetValueResultsetValue(float val)<br>Set the value of the node.
virtual SetValueResultsetValue(float val, glm::ivec2 coords)
virtual SetValueResultsetValue(void * ptr)
voidspreadSignal()<br>Spread signal to all outputs.
voidspreadSignal(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()
ENodePlugResultisPlugCorrect(const Pin & input, const Pin & output)
virtual voidonPlug(Node * fromNode, Node * toNode, size_t fromIndex, size_t toIndex)
virtual voidonUnplug(Node * fromNode, Node * toNode, size_t fromIndex, size_t toIndex)
virtual voidonUpdate()
template <typename T &gt; <br>voidsetInternalValue(const T & value, size_t index =0)<br>Sets the node value without validation.
voidsetInternalValue(float value, glm::ivec2 coordinates, size_t index =0)
boolshouldPulse(size_t inputIndex, size_t updatedInputIndex)<br>Tests if the updatedInputIndex should be pulsed.
voidtriggerDeleteCallback(Node * node)
voidtriggerPlugCallback(Node * fromNode, Node * toNode, size_t fromIndex, size_t toIndex)
voidtriggerUnplugCallback(Node * fromNode, Node * toNode, size_t fromIndex, size_t toIndex)
voidtriggerUpdateCallback(Node * node)

Public Attributes inherited from Core::Node

Name
std::vector< EValueState >m_OperatorState

Protected Attributes inherited from Core::Node

Name
boolfinalized
std::vector< Node * >m_children <br>Nested nodes.
IDm_id
std::vector< Pin >m_inputs <br>Inputs of the box: Input tabs with glyphs.
std::vector< Data >m_internalData <br>Results of operations.
Operationm_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.
TrackedNodeData *m_trackingData <br>Reference to additional tracking data if applicable, nullptr indicates no active tracking operation.

Friends inherited from Core::Node

Name
classGraphManager
classMatrixTracker
classPin

Public Types Documentation ​

enum EMode ​

EnumeratorValueDescription
Once
Repeat
PingPong

Public Functions Documentation ​

function Cycle ​

cpp
inline Cycle()

function getFrom ​

cpp
float getFrom() const

function getManualStep ​

cpp
float getManualStep() const

function getMode ​

cpp
inline EMode getMode()

function getSmoothStep ​

cpp
inline bool getSmoothStep() const

function getStep ​

cpp
float getStep() const

function getStepDuration ​

cpp
inline float getStepDuration() const

function getTo ​

cpp
float getTo() const

function isRunning ​

cpp
bool isRunning() const

function pause ​

cpp
void pause()

function play ​

cpp
void play()

function rewind ​

cpp
void rewind()

function setFrom ​

cpp
void setFrom(
    float from
)

Parameters:

  • from start value

function setManualStep ​

cpp
void setManualStep(
    float v
)

Parameters:

  • v increment added to/subtracted from the cycle value after user action - click to Next/Prev button

function setMode ​

cpp
inline void setMode(
    EMode mode
)

< direction from m_from to m_to

function setSmoothStep ​

cpp
inline void setSmoothStep(
    bool smoothStep
)

function setStep ​

cpp
void setStep(
    float v
)

Parameters:

  • v should be a loop increment

function setStepDuration ​

cpp
inline void setStepDuration(
    float stepDuration
)

function setTo ​

cpp
void setTo(
    float to
)

Parameters:

  • to end value

function stepBack ​

cpp
void stepBack()

function stepNext ​

cpp
void stepNext()

function stopAndReset ​

cpp
void stopAndReset()

function update ​

cpp
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 ​

cpp
virtual void updateValues(
    int inputIndex
) override

Update 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 ​

cpp
void wind()

Updated on 2026-09-11 at 21:24:26 +0000