Class NodeEditor
#include <NodeEditor.h>
Inherits the following classes: Transform2D
Public Types inherited from Transform
See Transform
| Type | Name |
|---|---|
| enum | TransType Flags for enabling/disabling transform components. |
Public Attributes
| Type | Name |
|---|---|
| ImVec2 | NE_center |
| ImVec2 | NE_size |
| NodeEditorType | _type = {NONE\_NODE\_EDITOR} |
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 Functions
| Type | Name |
|---|---|
| void | MoveView () |
| NodeEditor (NodeEditorType type) |
|
| NodeEditor () |
|
| void | PushView () |
| void | Render (const Context & ctx, const char * _lable, const ImVec2 & _size={0, 0}) |
| void | Reset () |
| void | Resize () |
| void | ZoomView () |
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 | RenderMark (MarkType _type, bool _is_left=true) |
| void | RenderMark (MarkType _type, ImVec2 _pos) |
| void | RenderNode (Nodes & _node) |
Public Attributes Documentation
variable NE_center
ImVec2 NodeEditor::NE_center;
variable NE_size
ImVec2 NodeEditor::NE_size;
variable _type
NodeEditorType NodeEditor::_type;
Public Functions Documentation
function MoveView
void NodeEditor::MoveView ()
function NodeEditor [1/2]
NodeEditor::NodeEditor (
NodeEditorType type
)
function NodeEditor [2/2]
inline NodeEditor::NodeEditor ()
function PushView
void NodeEditor::PushView ()
function Render
void NodeEditor::Render (
const Context & ctx,
const char * _lable,
const ImVec2 & _size={0, 0}
)
function Reset
void NodeEditor::Reset ()
function Resize
void NodeEditor::Resize ()
function ZoomView
void NodeEditor::ZoomView ()
Public Static Functions Documentation
function RenderMark [1/2]
static void NodeEditor::RenderMark (
MarkType _type,
bool _is_left=true
)
function RenderMark [2/2]
static void NodeEditor::RenderMark (
MarkType _type,
ImVec2 _pos
)
function RenderNode
static void NodeEditor::RenderNode (
Nodes & _node
)
The documentation for this class was generated from the following file src/UI/item/NodeEditor.h