Core::TransformImpl< ETransformType::Perspective >
#include "Core/Nodes/TransformImpl.h"
Inherits from Core::Transform, Core::Node, std::enable_shared_from_this< Node >
Public Functions
Name | |
---|---|
TransformImpl() | |
virtual void | initDefaults() override<br>Init the (non-zero) second level parameters (from LOD::SetValues) via their initDefaults and update the internal transformation matrix). |
virtual bool | isValid() const override<br>Checks the validity of the stored Transform matrix (used by GUI to show the corrupted flag). |
virtual void | resetMatrixFromDefaults() override<br>Reset the transform matrix visible in LOD::Full (internalValue) to match the defaultValues (from LOD::SetValues). |
virtual SetValueResult | setValue(float val, glm::ivec2 coords) override |
Additional inherited members
Public Functions inherited from Core::Transform
Name | |
---|---|
Transform(const TransformOperation & transformType) | |
void | createDefaults()<br>Prepare storage for second level parameters (std::map with values) |
void | disableSynergies() |
void | enableSynergies() |
void | free() |
int | getCurrentIndex() const |
Ptr< Node > | getCurrentSequence() |
TransformOperation::ValueMap | getDefaultTypes() const |
const Data & | getDefaultValue(const std::string & name) const<br>Get the value which the transform can hold (current value stored in the transformation). |
DefaultValues & | getDefaultValues() |
EValueState | getValueState(glm::ivec2 coords) const |
bool | hasMenuSynergies() const |
bool | hasSavedValue() const |
bool | hasSynergies() const |
bool | isInSequence() const |
bool | isLocked() const |
void | lock() |
void | notifySequence() |
void | nullSequence() |
TransformOperation * | properties() const |
void | reloadValue()<br>Restore saved values if they exist. |
void | saveValue()<br>Save current values of the transformation for future reloading. |
template <typename T > <br>SetValueResult | setDefaultValue(const std::string & name, T && val)<br>Setting of one second level parameter defining the transformation (in LOD::SetValues). |
template <typename T > <br>void | setDefaultValueNoUpdate(const std::string & name, T && val) |
void | setDefaultValues(const DefaultValues & values) |
void | setSequence(Node * s, int index) |
void | unlock() |
Protected Functions inherited from Core::Transform
Name | |
---|---|
bool | canSetValue(const ValueMask & mask, glm::ivec2 coords, float value) |
Data & | getDefaultValueMut(const std::string & name) |
virtual void | setDefaultValueWithSynergies(const std::string & name, Core::Data && val)<br>Function for setting values in the Set Defaults LOD. |
Protected Attributes inherited from Core::Transform
Name | |
---|---|
DefaultValues | m_defaultValues |
bool | m_hasMenuSynergies <br>True for transformations, that support synergies, such as scale, eulerAngleXYZ, ortho, frustum, and quaternion ONLY. |
bool | m_hasSynergies <br>applicable for: uniform scale, eulerAngleXYZ, ortho, frustum, and quat and quaternion. |
bool | m_isLocked <br>Edit of the matrix is limited to editable values - defined in Operations.h g_transforms. |
Friends inherited from Core::Transform
Name | |
---|---|
class | GraphManager |
class | MatrixTracker |
class | Sequence |
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 childNode input. |
void | pulse(size_t index) |
virtual void | receiveSignal(int inputIndex)<br>Implements the operator reaction to the change of its inputIndex input. |
void | spreadSignal()<br>Spread signal to all outputs. |
void | spreadSignal(size_t outIndex)<br>Spread signal to the selected output outIndex only. |
virtual void | updateValues(int inputIndex =0)<br>Computes new values of outputs based on inputs. |
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 updatedInputIndex should 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. |
const 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 Functions Documentation
function TransformImpl
inline explicit TransformImpl()
inline explicit TransformImpl()
function initDefaults
virtual void initDefaults() override
virtual void initDefaults() override
Init the (non-zero) second level parameters (from LOD::SetValues) via their initDefaults and update the internal transformation matrix).
Reimplements: Core::Transform::initDefaults
It is overriden in all transforms with their default values. This version is for nodes without the default value (now only the Free node)
- It resets the matrix to identity.
- this is done in free->resetMatrixFromDefaults()
function isValid
virtual bool isValid() const override
virtual bool isValid() const override
Checks the validity of the stored Transform matrix (used by GUI to show the corrupted flag).
Return: true if the stored matrix represents a correct transform
Todo: isValid checks matrix AND parameters from the SetValues LOD (Default values)
Reimplements: Core::Transform::isValid
function resetMatrixFromDefaults
virtual void resetMatrixFromDefaults() override
virtual void resetMatrixFromDefaults() override
Reset the transform matrix visible in LOD::Full (internalValue) to match the defaultValues (from LOD::SetValues).
Todo: For synergies, it has to be resolved. Most probably, it should leave the synergies unchanged.
- for Scale When setting X value in non-uniform scale -> this switch to uniform scale (due to enable synergies)
Reimplements: Core::Transform::resetMatrixFromDefaults
Specialized functions are created for each Transform type. For transforms with no default values (now only Free), resets the matrix directly.
The opposite setup - from matrix to Defaults - is done in the setValue() functions. It should also lock the matrix.
function setValue
virtual SetValueResult setValue(
float val,
glm::ivec2 coords
) override
virtual SetValueResult setValue(
float val,
glm::ivec2 coords
) override
Parameters:
- val new value
- coords in the column major order: coords.x is the column index and coords.y is the row index.
Return:
Reimplements: Core::Transform::setValue
Updated on 2024-11-06 at 20:16:54 +0000