Node

A node in the Inochi2D rendering tree

Constructors

this
this(Puppet puppet)

Constructs a new puppet root node

this
this(Node parent)

Constructs a new node

this
this(uint uuid, Node parent)

Constructs a new node with an UUID

Members

Functions

addChild
void addChild(Node child)

Adds a node as a child of this node.

beginUpdate
void beginUpdate()
Undocumented in source. Be warned that the author may not have intended to support it.
canReparent
bool canReparent(Node to)

Gets whether nodes can be reparented

children
Node[] children()

Gets a list of this node's children

clearChildren
void clearChildren()

Removes all children from this node

deserializeFromFghj
SerdeException deserializeFromFghj(Fghj data)

Deserializes node from Fghj formatted JSON data.

draw
void draw()

Draws this node and it's subnodes

drawBounds
void drawBounds()

Draws bounds

drawOne
void drawOne()

Draws this node.

drawOrientation
void drawOrientation()

Draws orientation of the node

finalize
void finalize()

Finalizes this node and any children

forceSetUUID
void forceSetUUID(uint uuid)

Force sets the node's ID

getCombinedBounds
vec4 getCombinedBounds()

Gets the combined bounds of the node

getDefaultValue
float getDefaultValue(string key)

Gets the default offset value

getIndexInNode
ptrdiff_t getIndexInNode(Node n)
Undocumented in source. Be warned that the author may not have intended to support it.
getIndexInParent
ptrdiff_t getIndexInParent()
Undocumented in source. Be warned that the author may not have intended to support it.
hasParam
bool hasParam(string key)

Return whether this node supports a parameter

insertInto
void insertInto(Node node, size_t offset)
Undocumented in source. Be warned that the author may not have intended to support it.
lockToRoot
bool lockToRoot()

Lock translation to root

lockToRoot
void lockToRoot(bool value)

Lock translation to root

parent
Node parent()

Gets the parent of this node

parent
void parent(Node node)

Sets the parent of this node

puppet
Puppet puppet()

The puppet this node is attached to

relZSort
float relZSort()

Gets the relative Z sorting

renderEnabled
bool renderEnabled()

Whether the node is enabled for rendering

resetMask
void resetMask()
Undocumented in source. Be warned that the author may not have intended to support it.
scaleValue
float scaleValue(string key, float value, int axis, float scale)

Scale an offset value, given an axis and a scale

serialize
void serialize(S serializer)

Allows serializing a node (with pretty serializer)

serializeSelf
void serializeSelf(InochiSerializer serializer)
Undocumented in source. Be warned that the author may not have intended to support it.
serializeSelf
void serializeSelf(InochiSerializerCompact serializer)
Undocumented in source. Be warned that the author may not have intended to support it.
setPuppet
void setPuppet(Puppet puppet)

Needed for deserialization

setValue
bool setValue(string key, float value)

Sets offset value

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
transform
Transform transform()

The transform in world space

transformChanged
void transformChanged()

Marks this node's transform (and its descendents') as dirty

transformNoLock
Transform transformNoLock()

The transform in world space without locking

typeId
string typeId()

This node's type ID

update
void update()

Updates the node

uuid
uint uuid()

Returns the unique identifier for this node

zSort
float zSort()

Gets the Z sorting

zSort
void zSort(float value)

Sets the (relative) Z sorting

Manifest constants

OFFSET_END
enum OFFSET_END;
Undocumented in source.
OFFSET_START
enum OFFSET_START;
Undocumented in source.

Variables

enabled
bool enabled;

Whether the node is enabled

globalTransform
Transform globalTransform;

The cached world space transform of the node

localTransform
Transform localTransform;

The local transform of the node

name
string name;

Visual name of the node

offsetSort
float offsetSort;

The offset to apply to sorting

offsetTransform
Transform offsetTransform;

The offset to the transform to apply

recalculateTransform
bool recalculateTransform;
Undocumented in source.

Inherited Members

From ISerializable

serialize
void serialize(S serializer)

Custom serializer function

Meta