Class Nodes
#include <Nodes.h>
Inherits the following classes: Transform2D
Public Types
| Type | Name |
|---|---|
| enum | NodePinType |
| typedef std::pair< Nodes *, int > | ParaLink |
Public Types inherited from Transform
See Transform
| Type | Name |
|---|---|
| enum | TransType Flags for enabling/disabling transform components. |
Public Attributes
| Type | Name |
|---|---|
| bool | is_activated = { false } |
| bool | is_open = { true } |
| bool | is_select = { false } |
| unsigned int | n_id |
| std::vector< Parameters > | n_in |
| std::string | n_label = {} |
| std::string | n_name = {} |
| std::vector< Parameters > | n_out |
| NodeType | n_type = {} |
Public Attributes inherited from Transform2D
See Transform2D
| Type | Name |
|---|---|
| glm::mat3 | o_InvTransform = { 1.0f }Cached inverse world transform matrix (3x3) |
| glm::mat3 | o_Transform = { 1.0f }Cached world transform matrix (3x3) |
| glm::vec2 | o_position = { 0.0f }World position (X, Y) |
| float | o_rot = { 0.0f }Rotation angle in radians (counterclockwise) |
| glm::vec2 | o_scale = { 1.0f }Local scale (non-uniform allowed) |
Public Attributes inherited from Transform
See Transform
| Type | Name |
|---|---|
| bool | is_TransF_changed = trueTransform matrix needs recomputation. |
| bool | is_Uniform_changed = trueUniform (non-scaled) transform needs recomputation. |
| bool | is_invTransF_changed = trueInverse transform needs recomputation. |
| bool | is_invUniform_changed = trueInverse uniform transform needs recomputation. |
| bool | use_position = { true }Enable position component in transform computation. |
| bool | use_rotation = { true }Enable rotation component in transform computation. |
| bool | use_scale = { true }Enable scale component in transform computation. |
Public Static Attributes
| Type | Name |
|---|---|
| std::unordered_map< Parameters *, ParaLink > | n_in_link = {} |
| std::unordered_map< Parameters *, ParaLink > | n_out_link = {} |
Public Functions
| Type | Name |
|---|---|
| void | LinkIn (int _self_idx, Nodes * _tar, int _idx) |
| void | LinkOut (int _self_idx, Nodes * _tar, int _idx) |
| Nodes () |
|
| Nodes (NodeType _type) |
|
| Nodes (const char * _name, NodeType _type) |
|
| void | PushIn (const Parameters & _in) |
| void | PushOut (const Parameters & _out) |
Public Functions inherited from Transform2D
See Transform2D
| Type | Name |
|---|---|
| virtual bool | ApplyAllTransform () override Recomputes transform and all parent transforms. |
| virtual bool | ApplyTransform (bool _forced=false) override Recomputes transform matrix if dirty. |
| Transform2D * | GetChildTransPtr () Returns pointer to first child transform. |
| virtual bool | GetInvTransform () override const Computes inverse transform matrix. |
| Transform2D * | GetParentTransPtr () Returns pointer to parent transform. |
| Transform2D * | GetTransformPtr () Returns pointer to this transform. |
| void | LookAt (const glm::vec2 & tar) Orients transform to look at target position. |
| void | Move (const glm::vec2 & d_pos) Translates position by offset. |
| void | SetParent (Transform2D * _p_trans, bool _keep_offset=true) Sets parent transform for hierarchy. |
| bool | SetPos (const glm::vec2 & pos) Sets world position. |
| bool | SetRot (float rot) Sets rotation angle. |
| bool | SetScale (const glm::vec2 & scale) Sets local scale. |
| void | Spin (float angle) Rotates by angle. |
| void | Trans (const glm::mat3 & _trans) Applies transformation matrix to current transform. |
| Transform2D () Constructs a Transform2D with identity values. |
|
| virtual void | UnsetParent (bool _keep_offset=true) override Removes parent transform relationship. |
| void | Zoom (float scale) Scales by factor (uniform). |
| void | Zoom (const glm::vec2 & scale) Scales by factor (non-uniform). |
| virtual int | _debug () override const Debug utility for transform state inspection. |
| ~Transform2D () Destroys the Transform2D . |
Public Functions inherited from Transform
See Transform
| Type | Name |
|---|---|
| virtual bool | ApplyAllTransform () = 0 Recomputes transform and all parent transforms. |
| virtual bool | ApplyTransform (bool _forced=false) = 0 Recomputes transform matrix if dirty. |
| virtual bool | GetInvTransform () const = 0 Computes inverse transform matrix. |
| virtual void | UnsetParent (bool _keep_offset=true) = 0 Removes parent transform relationship. |
| void | UseTranformComp (bool _enable, TransType _type) Enables or disables specific transform components. |
| virtual int | _debug () const = 0 Debug utility for transform state inspection. |
Public Static Functions
| Type | Name |
|---|---|
| void | BreakLink (Parameters * _param, bool _type) |
| int | GetParamLoc (Nodes * _tar, Parameters * _param, bool _type) |
| Parameters * | GetParamPtr (Nodes * _tar, int _idx, bool _type) |
| Parameters * | GetParamPtr (const ParaLink & _link, bool _type) |
| bool | IsLinked (Parameters * _param, bool _type) |
Public Types Documentation
enum NodePinType
enum Nodes::NodePinType {
OUT = 0,
IN = 1
};
typedef ParaLink
using Nodes::ParaLink = std::pair<Nodes*, int>;
Public Attributes Documentation
variable is_activated
bool Nodes::is_activated;
variable is_open
bool Nodes::is_open;
variable is_select
bool Nodes::is_select;
variable n_id
unsigned int Nodes::n_id;
variable n_in
std::vector<Parameters> Nodes::n_in;
variable n_label
std::string Nodes::n_label;
variable n_name
std::string Nodes::n_name;
variable n_out
std::vector<Parameters> Nodes::n_out;
variable n_type
NodeType Nodes::n_type;
Public Static Attributes Documentation
variable n_in_link
std::unordered_map< Parameters *, Nodes::ParaLink > Nodes::n_in_link;
variable n_out_link
std::unordered_map< Parameters *, Nodes::ParaLink > Nodes::n_out_link;
Public Functions Documentation
function LinkIn
void Nodes::LinkIn (
int _self_idx,
Nodes * _tar,
int _idx
)
function LinkOut
void Nodes::LinkOut (
int _self_idx,
Nodes * _tar,
int _idx
)
function Nodes [1/3]
Nodes::Nodes ()
function Nodes [2/3]
Nodes::Nodes (
NodeType _type
)
function Nodes [3/3]
Nodes::Nodes (
const char * _name,
NodeType _type
)
function PushIn
void Nodes::PushIn (
const Parameters & _in
)
function PushOut
void Nodes::PushOut (
const Parameters & _out
)
Public Static Functions Documentation
function BreakLink
static void Nodes::BreakLink (
Parameters * _param,
bool _type
)
function GetParamLoc
static int Nodes::GetParamLoc (
Nodes * _tar,
Parameters * _param,
bool _type
)
function GetParamPtr [1/2]
static inline Parameters * Nodes::GetParamPtr (
Nodes * _tar,
int _idx,
bool _type
)
function GetParamPtr [2/2]
static inline Parameters * Nodes::GetParamPtr (
const ParaLink & _link,
bool _type
)
function IsLinked
static inline bool Nodes::IsLinked (
Parameters * _param,
bool _type
)
The documentation for this class was generated from the following file src/compo/Nodes.h