Node

A node in the Inochi2D rendering tree

@TypeId("Node")
class Node : ISerializable {}

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

Classes

MatrixHolder
class MatrixHolder
Undocumented in source.

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.
cName
const(char)* cName()

Name of node as a null-terminated C string

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

depth
int depth()

Gets the depth of 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

getCombinedBoundsRect
rect getCombinedBoundsRect()
Undocumented in source. Be warned that the author may not have intended to support it.
getDefaultValue
float getDefaultValue(string key)

Gets the default offset value

getDynamicMatrix
mat4 getDynamicMatrix()
Undocumented in source. Be warned that the author may not have intended to support it.
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.
getInitialBoundsSize
vec4 getInitialBoundsSize()
Undocumented in source. Be warned that the author may not have intended to support it.
getNodePath
string getNodePath()

Gets the path to the node.

getOneTimeTransform
mat4* getOneTimeTransform()
Undocumented in source. Be warned that the author may not have intended to support it.
getValue
float getValue(string key)
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

postProcess
void postProcess()
Undocumented in source. Be warned that the author may not have intended to support it.
preProcess
void preProcess()
Undocumented in source. Be warned that the author may not have intended to support it.
puppet
Puppet puppet()

The puppet this node is attached to

reconstruct
void reconstruct()
Undocumented in source. Be warned that the author may not have intended to support it.
relZSort
float relZSort()

Gets the relative Z sorting

renderEnabled
bool renderEnabled()

Whether the node is enabled for rendering

reparent
void reparent(Node parent, ulong pOffset)

set new Parent

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)

serializePartial
void serializePartial(InochiSerializer serializer, bool recursive)
Undocumented in source. Be warned that the author may not have intended to support it.
serializeSelf
void serializeSelf(InochiSerializer serializer)
Undocumented in source. Be warned that the author may not have intended to support it.
serializeSelfImpl
void serializeSelfImpl(InochiSerializer serializer, bool recursive)
Undocumented in source. Be warned that the author may not have intended to support it.
setOneTimeTransform
void setOneTimeTransform(mat4* transform)
Undocumented in source. Be warned that the author may not have intended to support it.
setPuppet
void setPuppet(Puppet puppet)

Needed for deserialization

setRelativeTo
void setRelativeTo(Node to)

Calculates the relative position between 2 nodes and applies the offset. You should call this before reparenting nodes.

setRelativeTo
void setRelativeTo(mat4 to)

Calculates the relative position between this node and a matrix and applies the offset. This does not handle zSorting. Pass a Node for that.

setValue
bool setValue(string key, float value)

Sets offset value

setupChild
void setupChild(Node child)
Undocumented in source. Be warned that the author may not have intended to support it.
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

transformLocal
Transform transformLocal()

The transform in world space without locking

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

zSortBase
float zSortBase()

Gets the basis zSort offset.

zSortNoOffset
float zSortNoOffset()

Gets the Z sorting without parameter offsets

Manifest constants

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

Static functions

getRelativePosition
vec3 getRelativePosition(mat4 m1, mat4 m2)

Gets a relative position for 2 matrices

getRelativePositionInv
vec3 getRelativePositionInv(mat4 m1, mat4 m2)

Gets a relative position for 2 matrices

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

oneTimeTransform
mat4* oneTimeTransform;
Undocumented in source.
overrideTransformMatrix
MatrixHolder overrideTransformMatrix;
Undocumented in source.
postProcessFilter
Tuple!(vec2[], mat4*) delegate(vec2[], vec2[], mat4*) postProcessFilter;
Undocumented in source.
postProcessed
bool postProcessed;
Undocumented in source.
preProcessFilter
Tuple!(vec2[], mat4*) delegate(vec2[], vec2[], mat4*) preProcessFilter;
Undocumented in source.
preProcessed
bool preProcessed;
Undocumented in source.
recalculateTransform
bool recalculateTransform;
Undocumented in source.

Inherited Members

From ISerializable

serialize
void serialize(S serializer)

Custom serializer function

Meta