Skip to main content

Value Processing Behaviors

Content List

  • Animation Value Processing Behaviors
    • Jump to Anmation Keyframe
  • Effects Value Processing Behaviors
    • Set Alpha Value
    • Switch Image
    • Zoom Effect
  • Diagnostics Value Processing Behaviors
    • Frame Measurement
  • Transformation Value Processing Behaviors
    • Set Position
    • Set Rotation
    • Set Scale
    • Set Layout Size
    • Move Node
  • AnimationMeter
  • Arithmetic Operation
  • Clock
  • Dial
  • Filter
  • Forward Value
  • Interpolate Value
  • Map Value
  • Map Value normalized
  • Render a Range
  • Send ChangeValue on receiving ProcessValue event
  • Set Selected State
  • Smooth Value
  • Render Child Nodes
  • Format String
  • Track Angle on Drag
  • Drag on Track to Value
  • Action on Value
  • Value

Animation Value Processing Behaviors


Jump to Anmation Keyframe
Description

Expects a Float value between 0 and 1 (inclusive) as an event. Sets a selected animation to a frame corresponding to the value that the AnimationProcessValueBehavior receives.

Common Properties
Property Name Type Description
Animation Candera::MemoryManagement::SharedPointer<Candera::Animation::AnimationPlayer> The animation controlled. AnimationProcessValueBehavior sets the animation to the frame corresponding to the value it receives.
Advanced Properties
Property Name Type Description
SequenceStartTime Candera::Animation::SequenceTimeType The start point of the animation. [ms]
SequenceDurationTime Candera::Animation::SequenceTimeType The duration of the animation. [ms]

Back to the menu


Effects Value Processing Behaviors


Set Alpha Value
Description

Sets the Alpha value of a node (expects a Float value).

Example Usage

Common Properties
Property Name Type Description
Target Node Node2D* The Node which gets the resulting alpha value. If not set, then the node where the behavior is attached to, will be modified.

Back to the menu

Switch Image
Description

Sets an image on a Render Node based on a float index received as event.

Supports

  • Controls:
    • FlipBook

Example Usage

Common Properties
Property Name Type Description
Upload Strategy Enum (OnInit, OnDemand) Specifies if images are uploaded on demand or when the behavior is instantiated. OnInit may cause an initial delay and keeps all images loaded. OnDemand avoids an initial delay and only keeps one image loaded.
Render Node RenderNode * The Render Node ImageSelectProcessValueBehavior will switch images on.

Back to the menu

Zoom Effect
Description

Expects a Float value between 0 and 1 (inclusive) as an event. Applies scale and alpha on children of a group.

Example Usage

Common Properties
Property Name Type Description
Alpha Factors Vector2 Min/Max transparency factors
Zoom Factors Vector2 Min/Max zoom factors
Zoom Distribution Float Distribution of Zoom/Alpha to each side of the selection.
Group Node Node2D* The node whose children are enabled or disabled by ZoomProcessValueBehavior.

Back to the menu


Diagnostics Value Processing Behaviors


Frame Measurement

Class Reference

Description

Outputs Frame Measure information of the specified Render Target. These Measurements can be Frames Per Seconds, Current Frame and Frame Time. This Behavior acts as Source for Process Value Behaviors.

Common Properties
Property Name Type Description
RenderTarget Candera::GraphicDeviceUnit* The render target which FPS should be monitored.
Output OutputType::Enum Specifies which information will be output.
DispatchThreshold FeatStd::Optional< FeatStd::Variant > Specifies how much the Output has to change to dispatch an event to its receivers.

Back to the menu


Transformation Value Processing Behaviors


Set Position
Description

Expects a Float value as an event. Translates Position Node along given axis by the received value in pixels.

Example Usage

Common Properties
Property Name Type Description
Target Node AbstractNodePointer The target node to which the events are routed from the source node.
Translation Axis Enum (AxisX, AxisY) The axis along PositionProcessValueBehavior2D translates Position Node node.

Back to the menu

Set Rotation
Description

Expects a Float value as an event. Rotates Rotation Node clockwise by the received value in degrees.

Example Usage

Common Properties
Property Name Type Description
Target Node AbstractNodePointer The node which is modified. If not set, then the node where the behavior is attached to, will be modified.

Back to the menu

Set Scale
Description

Expects a Float value as an event. Scales Scaled Node by the received (scalar) value multiplied by Vector X Y (x value for horizontal scaling, y value for vertical scaling). Scaling along either axis can be enabled or disabled.

Example Usage

Common Properties
Property Name Type Description
TargetNode TargetNodeType& The Node which is modified. If not set, then the node where the behavior is attached to, will be modified.
ScaleAlongX ScaleAlongXType (bool) Enables or disables scaling in horizontal direction.
ScaleAlongY ScaleAlongYType (bool) Enables or disables scaling in vertical direction.
ScaleAlongZ ScaleAlongZType (bool) Enables or disables scaling in Z-direction.
ScaleVector2D ScaleVector3DType& (Vector2) This vector is multiplied by the received value and specifies the magnitude by which the node is scaled.
ScaleVector3D ScaleVector3DType& (Vector3) This vector is multiplied by the received value and specifies the magnitude by which the node is scaled.

Back to the menu

Set Layout Size
Description

Expects a Float value as an event. Sets the layout-size of the given node.

Common Properties
Property Name Type Description
AffectXAxis bool Enables or disables scaling in horizontal direction.
AffectYAxis bool Enables or disables scaling in vertical direction.
Mode Mode::Enum Determines how the received value will be interpreted.
ScaleVector Candera::Vector2 This vector is multiplied by the received value and specifies the magnitude by which the node is scaled.

Back to the menu

Move Node
Description

Expects a Float value as an event. Translates Translated Node by the received (scalar) value multiplied by Vector X Y.

Example Usage

Common Properties
Property Name Type Description
Target Node Node2D * The node TranslateProcessBehavior moves.
Vector XY Vector2 This vector is multiplied by the value TranslateProcessValueBehavior receives and specifies direction and magnitude by which TranslateProcessValueBehavior moves Translated Node. If not set, then the node where the behavior is attached to, will be modified.

Back to the menu


AnimationMeter
Description

Controls an animation according to the passed value.
This behavior is a Behavior Block.

Back to the menu

Arithmetic Operation
Description

Arithmetic operation behavior allows to perform additon, subtraction, multiplication and division operations on the passed value.

Common Properties
Property Name Type Description
Operation CgiStudioControl::ArithmeticOperationType::Enum Arithmetic operation to be performed.
Operand FeatStd::Variant A number to be used as addend/subtrahend/multiplicant/divisor on provided value.
OutputType FeatStd::VariantValueType::Enum Type of the Variant forwarded as result.

Back to the menu

Clock
Description

Converts a time integer into seconds, minutes and hours and passes those values to behavior-properties.

Common Properties
Property Name Type Description
SecondsProcessValueBehavior Candera::ProcessValueBehavior* The behavior that receives the seconds.
MinutesProcessValueBehavior Candera::ProcessValueBehavior* The behavior that receives the minutes.
HoursProcessValueBehavior Candera::ProcessValueBehavior* The behavior that receives the hours.
OffsetInMinutes FeatStd::Int32 Offset in minutes to add to time (i.e. for different time zones).
ShowFull24Hours bool If true, hours will be shown from 0-23, otherwise in AM/PM format.
AMText FeatStd::String The string of the AM label.
PMText FeatStd::String The string of the PM label.
AMPMTextBehavior Candera::Behavior* Sets text 'AM' or 'PM'.
ShowSeconds bool If true, seconds will be shown.
SecondsNode Candera::AbstractNodePointer The node that will be turned off if showing of seconds is disabled.

Back to the menu

Dial
Description

Receives an angle from a ProcessValueEvent or a value in a ChangeValueEvent. The knob changes its rotation according to that angle. The Behavior Transmits the changed value through events (ValueChangedEvent and ProcessValueEvent).

Common Properties
Property Name Type Description
CurrentValue FeatStd::Int32 Current value for the dial.
MinimumRotation FeatStd::Float Minimum rotation of the dial.
MaximumRotation FeatStd::Float Maximum rotation of the dial.
StepSize FeatStd::Float Step size in degrees.
KnobNode Candera::AbstractNodePointer Knob node which will be rotated.

Back to the menu

Filter
Description

Filters the processed value via an attached Condition (e.g. Check processed Value).

Common Properties
Property Name Type Description
Condition Candera::ConditionBehavior* ConditionBehavior for passing the value to the next process value behavior.

Back to the menu

Forward Value
Description

Forwards a received value. Associated controls with a value property receive the value.

Example Usage

Common Properties
Property Name Type Description
Event Dispatch Strategy Enum (Direct, Broadcast, Bubble, Tunnel, DedicatedBehavior) The way the event gets sent.
Target Node AbstractNodePointer The target node to which the events are routed. If this property is not set, the event will be routed to the node of the behavior.

Back to the menu

Interpolate Value
Description

Expects a Float value as an event. InterpolateProcessValueBehavior holds an internal Float value. It changes this internal value with given speed (Units Per Second) until it reaches the received value. Unless received value matches internal value, it sends internal value to a Process Value Behavior every frame.

Example Usage

Common Properties
Property Name Type Description
Receivers ReceiversType The process value behaviors that will receive the value as next in the value processing chain.
Units Per Second Float Speed at which InterpolateProcessValueBehavior changes its internal value.
Filter Time Constant Float The moment before InterpolateProcessValueBehavior’s internal value reaches the received value, the speed at which the former is changing slows down. This prevents a sudden end of movement that can be felt as artificial in some cases.

Back to the menu

Map Value
Description

Expects a Float value as an event. Maps the received value from one interval to another.

Common Properties
Property Name Type Description
InputMin FeatStd::Optional< FeatStd::Variant > [Optional] Smallest value of the interval to check. If Minimum is given as greater than Maximum then the values are internally swapped.
InputMax FeatStd::Optional< FeatStd::Variant > [Optional] Largest value of the interval to check. If Maximum is given as smaller than Minimum then the values are internally swapped.
OutputMin FeatStd::Float Smallest value of the interval mapped to.
OutputMax FeatStd::Float Largest value of the interval mapped to.
OutputType FeatStd::VariantValueType::Enum Type of the Variant forwarded as result.

Back to the menu

Map Value normalized
Description

Maps the numeric value received via 'ProcessValueEvent' within an arbitrary range to the normalized range from 0.0 to 1.0 and dispataches the result locally to its receivers. Receivers of this Behavior must therefore be value processing behaviors operating on normalized values.

Common Properties
Property Name Type Description
Reverse bool Toggles the mapping direction. If this property is true, the received value is assumed to be within range from 0.0 to 1.0 and the emitted value is mapped accordingly.
ValueForRange ValueBehaviorBase* The input value behavior for defining the mapped range.

Back to the menu

Render a Range
Description

Renders a range of nodes according to the passed value.
This behavior is a Behavior Block.

Back to the menu

Send ChangeValue on receiving ProcessValue event
Description

Sends out a new value. Associated controls with a value property receive the new values.

Common Properties
Property Name Type Description
ChangeValue ChangeValue::Enum How the event value shall be handled by the recieving behavior
EventDispatchStrategy CgiStudioControl::EventDispatchStrategyType::Enum The way the event gets sent
DedicatedBehavior Candera::ProcessValueBehavior* The dedicated process value behavior that will receive the change value event.

Back to the menu

Set Selected State
Description

This behavior is a Behavior Block.

Back to the menu

Smooth Value

Class Reference

Description

Expects a numeric value as an event and applies exponent smoothing to that value and the previous calculated one.

Common Properties
Property Name Type Description
SmoothingFactor FeatStd::Float The factor how fast the outputted value should adapt to the input value. Valid values are between 0.0 and 1.0

Back to the menu

Render Child Nodes
Description

Enables/Disables Child nodes corresponding to the received value and the behavior settings.

Example Usage

Common Properties
Property Name Type Description
TargetNode Candera::AbstractNodePointer The Node which is modified. If not set, then the node where the behavior is attached to, will be modified.
OperationMode OperationMode::Enum When set to MultipleNodes, EnableChildNodes will enable the first N children of Group Node. When Operation Mode is set to SingleNode, only the Nth node is enabled.
Levels FeatStd::UInt8 Number of levels to step down through groups. Default is zero.
NormalizeValue bool If set to true, the received value has to be between 0 and 1 and will be mapped to the number of children. Otherwise the value has to be the index of the child.

Back to the menu

Format String
Description

'Format String' modifies the Text of a TextNode Node and provides the Text as property for Controls. It supports formated text that can display one variable.

Example Usage

Common Properties
Property Name Type Description
Text String Text that TextBehavior will change the Node to. Supports formatting for one variable that corresponds to the value TextProcessValueBehavior2D receivers.
Style SharedPointer<SharedStyle> The style that will be set to the Text Node.
Alignment Enum (Auto, Left, Center, Right, Justified) The horizontal text alignment, using the culture text direction, is used to define how text will be horizontally aligned within its layout area.
Multiline Bool If multi line is disabled, then the new line control characters will be ignored and text will always be rendered in one line.
Line Spacing PixelSize (UInt16) Defines the distance between the baselines of successive lines of type.
Word Wrap Bool If word wrapping is enabled then the lines that exceed the client area will be split during arrangement into multiple lines.
Trimming Enum (None, Ellipsis, CustomText) Trimming defines the behavior to employ when content overflows the content area.
TrimmingText FeatStd::String Trimming text defines the text which replaces content overflowing the content area.
TargetNode Candera::AbstractNodePointer The Node which gets the given text. If not set, then the node where the behavior is attached to, will be modified.

Back to the menu

Track Angle on Drag
Description

Listens to the touch of the selected node, returns the angle between pressing, moving and releasing.

Common Properties
Property Name Type Description
TouchNode Candera::AbstractNodePointer A node that is used to collect information about the touch.

Back to the menu

Drag on Track to Value
Description

Determines the position of a touch move in relation to the associated node and provides it as value in range from 0.0 to 1.0 (normalized). The horizontal boundary of the associated node is the track. The Dragged Node is used to determine the hit area and to determine the position change relative to its center. This behavior can be used as a source to a Value Behavior. Add a Value Behavior as a receiver.

Common Properties
Property Name Type Description
UseCenter bool If true, the center value defined for the knob bitmap is used to align the knob to the value position, otherwise the calculated center.
TrackDirection TrackDirection::Enum Defines if the position will be tracked horizontally or vertically
LeftTouchMargin FeatStd::Float Defines the size for extending or shrinking the touch-sensitive area at the left border of the knob. The size is given in percentage of the knob width. Positive values extend, negative values shrink the area.
RightTouchMargin FeatStd::Float Defines the size for extending or shrinking the touch-sensitive area at the right border of the knob. The size is given in percentage of the knob width. Positive values extend, negative values shrink the area.
TopTouchMargin FeatStd::Float Defines the size for extending or shrinking the touch-sensitive area at the top border of the knob. The size is given in percentage of the knob height. Positive values extend, negative values shrink the area.
BottomTouchMargin FeatStd::Float Defines the size for extending or shrinking the touch-sensitive area at the bottom border of the knob. The size is given in percentage of the knob height. Positive values extend, negative values shrink the area.
OnKnobDragOnly bool The position will only be updated when the Knob gets dragged, otherwise clicking on the control will move the knob to the position.

Back to the menu

Action on Value
Description

Passes a Process Value to a Condition Behavior and if the response is positive, invokes an Action behavior.

Example Usage

Common Properties
Property Name Type Description
Condition ConditionBehavior* The ConditionBehavior that TriggerBehavior passes a value to and expect a response from to see if Action needs to be invoked.
Actions ActionBehaviorArrayProperty The set of ActionBehaviors that TriggerBehavior invokes in the event that it receives a positive response form Condition.
Consume Event Bool Set this flag to false if the event should not be consumed by the trigger. By default it is set to true and if the trigger evaluates to true the event will not be routed to any other behavior.

Back to the menu

Value
Description

ValueBehavior sends a value to any behavior derived from ProcessValueBehavior type. It supplies an input to process value behaviors via event.

Example Usage

Common Properties
Property Name Type Description
Minimum FeatStd::Optional< FeatStd::Variant > Minimum of the Variant value. If Minimum is given as greater than Maximum then the values are internally swapped.
Maximum FeatStd::Optional< FeatStd::Variant > Maximum of the Variant value. If Maximum is given as smaller than Minimum then the values are internally swapped.
IntervalHandling IntervalHandling::Enum Select how the behavior should react when the minimum or maximum limit is exceeded.
AcceptValueEvent bool Set this flag to true to make the value changeable by events/actions.
BroadcastProcessValueEvent bool Set this flag to true to broadcast ProcessValue event even if value did not change.

Back to the menu