Node

A node in the Inochi2D rendering tree

@TypeId("Node", IN_MAKE_TAG!(0, 0))
@RegisterFallback
class Node : NuRefCounted, IPropertyOwner, ISerializable , IDeserializable!ModelState {}

Constructors

this
this(Puppet parent)

Constructs a new puppet root node.

this
this(Node parent)

Constructs a new node

this
this(GUID guid, Node parent)

Constructs a new node with an GUID

Destructor

~this
~this()

Destructor

Members

Functions

addChild
void addChild(Node child)

Adds a node as a child of this node.

canMoveTo
bool canMoveTo(Node to)

Gets whether this node can be moved to the given target node.

clearChildren
void clearChildren()

Removes all children from this node

deserialize
void deserialize(DataNode object, ModelState state)

Deserializes this node from a DataNode.

draw
void draw(float delta, DrawList drawList)

Draws this node and it's subnodes

finalize
void finalize(ModelState state)

Finalizes this node and its children.

findChild
ptrdiff_t findChild(Node child)

Finds the index of the given direct child node within this node.

getProperty
float getProperty(quark key)

Gets the value of a given property.

getPropertyDefault
float getPropertyDefault(quark key)

Gets the default value of a given property.

hasProperty
bool hasProperty(quark key)

Gets whether a property with the given name exists in the object.

moveChild
void moveChild(Node child, ptrdiff_t to)

Moves the child to the given offset in this node's child list.

onDefineProperties
void onDefineProperties(PropertyStore propList)

Called when the node is to define its properties.

onDeserialize
void onDeserialize(DataNode object, ModelState state)

Deserializes this node from a DataNode.

onDraw
void onDraw(float delta, DrawList drawList)

Called when the node is to be redrawn.

onFinalize
void onFinalize(ModelState state)

Called when the node is to finalize its deserialization from disk.

onMoved
void onMoved(Node from, Node to, ptrdiff_t index)

Called when the node is moved from one parent to another.

onPostUpdate
void onPostUpdate(DrawList drawList)

Called during the late update phase of a new frame.

onPreUpdate
void onPreUpdate(DrawList drawList)

Called during the early update phase of a new frame.

onSerialize
void onSerialize(DataNode object)

Serializes this node to a DataNode.

onTransformUpdate
void onTransformUpdate()

Called when the node is asked to update its transform.

onUpdate
void onUpdate(float delta, DrawList drawList)

Called during the update phase of a new frame.

postUpdate
void postUpdate(DrawList drawList)

Update sequence run after the main update sequence.

preUpdate
void preUpdate(DrawList drawList)

Runs a pre-update cycle for this node and its enabled children.

removeChild
bool removeChild(Node child)

Removes a given node from this node's children.

reparent
void reparent(Node parent, size_t pOffset)

Set new Parent

resetProperties
void resetProperties()

Resets all properties.

resetProperty
void resetProperty(quark key)

Resets the given property.

serialize
DataNode serialize(bool recursive)

Serializes this node to a DataNode.

serialize
void serialize(DataNode object, bool recursive)

Serializes this node to a DataNode.

setProperty
void setProperty(quark key, float value)

Sets the value of the property.

setPuppet
void setPuppet(Puppet puppet)

Needed for deserialization

toString
string toString()

Gets the string representation of this object.

update
void update(float delta, DrawList drawList)

Updates the node

updateTransform
void updateTransform()

Updates the transform of the node and all nodes underneath it.

Properties

baseMatrix
Basis baseMatrix [@property getter]

The global basis matrix with parameter omitted.

children
Node[] children [@property getter]

Gets a list of this node's children

depth
int depth [@property getter]

The depth of this node in the node hirearchy

guid
GUID guid [@property getter]

The node's GUID.

localTransform
Transform localTransform [@property getter]

The transform in local-space.

localTransformOffset
Transform localTransformOffset [@property getter]

The offset transform in local-space.

lockToRoot
bool lockToRoot [@property getter]

Whether transformation is locked to the root node.

lockToRoot
bool lockToRoot [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
matrix
Basis matrix [@property getter]

The global basis matrix.

nid
uint nid [@property getter]

The Node's numeric ID

parent
Node parent [@property getter]

The parent of this node

parent
Node parent [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
parentIndex
ptrdiff_t parentIndex [@property getter]

The index of this node within ints parent.

props
PropertyStore props [@property getter]

The node's property store, should generally not be directly used.

puppet
Puppet puppet [@property getter]

The puppet this node is attached to

typeId
TypeId typeId [@property getter]

The Node's Type ID

Variables

enabled
bool enabled;

Whether the node is enabled

name
nstring name;

Visual name of the node

Inherited Members

From ISerializable

onSerialize
void onSerialize(DataNode object)

Custom serializer function

Meta