Deformer

A node which deforms the vertex data of nodes beneath it.

Deformations happen in world space

Constructors

this
this(Node parent)

Constructs a new MeshGroup node

Destructor

~this
~this()
Undocumented in source.

Members

Functions

deform
void deform(size_t offset, vec2 deform, bool absolute)

Deforms a single vertex in the IDeformable

deform
void deform(vec2[] deformed, bool absolute)

Deforms the IDeformable.

onDeserialize
void onDeserialize(DataNode object, ModelState state)

Deserializes this node from a DataNode.

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.

onRebuild
void onRebuild()

Called when the deformer's internal data should be rebuilt.

onSerialize
void onSerialize(DataNode object)

Serializes this node to a DataNode.

rescan
void rescan()

Rescans the children of the deformer.

resetDeform
void resetDeform()

Resets the deformation for the IDeformable.

Properties

basePoints
const(vec2)[] basePoints [@property getter]

The base position of the deformable's points.

controlPoints
vec2[] controlPoints [@property getter]

The control points of the deformer.

controlPoints
vec2[] controlPoints [@property setter]
Undocumented in source.
deformBaseMatrix
Basis deformBaseMatrix [@property getter]

The base matrix of the object before any parameters have been applied.

deformMatrix
Basis deformMatrix [@property getter]

World matrix of the deformable object.

deformPoints
vec2[] deformPoints [@property getter]

The points which may be deformed by the deformer.

toDeform
IDeformable[] toDeform [@property getter]

A list of the nodes to deform.

Inherited Members

From Node

setPuppet
void setPuppet(Puppet puppet)

Needed for deserialization

nid
uint nid [@property getter]

The Node's numeric ID

onSerialize
void onSerialize(DataNode object)

Serializes this node to a DataNode.

onDeserialize
void onDeserialize(DataNode object, ModelState state)

Deserializes this node from a DataNode.

onFinalize
void onFinalize(ModelState state)

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

onPreUpdate
void onPreUpdate(DrawList drawList)

Called during the early update phase of a new frame.

onUpdate
void onUpdate(float delta, DrawList drawList)

Called during the update phase of a new frame.

onPostUpdate
void onPostUpdate(DrawList drawList)

Called during the late update phase of a new frame.

onTransformUpdate
void onTransformUpdate()

Called when the node is asked to update its transform.

onDraw
void onDraw(float delta, DrawList drawList)

Called when the node is to be redrawn.

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

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

onDefineProperties
void onDefineProperties(PropertyStore propList)

Called when the node is to define its properties.

enabled
bool enabled;

Whether the node is enabled

name
nstring name;

Visual name of the node

puppet
Puppet puppet [@property getter]

The puppet this node is attached to

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.

children
Node[] children [@property getter]

Gets a list of this node's children

typeId
TypeId typeId [@property getter]

The Node's Type ID

guid
GUID guid [@property getter]

The node's GUID.

props
PropertyStore props [@property getter]

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

localTransform
Transform localTransform [@property getter]

The transform in local-space.

localTransformOffset
Transform localTransformOffset [@property getter]

The offset transform in local-space.

matrix
Basis matrix [@property getter]

The global basis matrix.

baseMatrix
Basis baseMatrix [@property getter]

The global basis matrix with parameter omitted.

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.
depth
int depth [@property getter]

The depth of this node in the node hirearchy

~this
~this()

Destructor

clearChildren
void clearChildren()

Removes all children from this node

canMoveTo
bool canMoveTo(Node to)

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

findChild
ptrdiff_t findChild(Node child)

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

removeChild
bool removeChild(Node child)

Removes a given node from this node's children.

addChild
void addChild(Node child)

Adds a node as a child of this node.

moveChild
void moveChild(Node child, ptrdiff_t to)

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

reparent
void reparent(Node parent, size_t pOffset)

Set new Parent

serialize
DataNode serialize(bool recursive)

Serializes this node to a DataNode.

serialize
void serialize(DataNode object, bool recursive)

Serializes this node to a DataNode.

deserialize
void deserialize(DataNode object, ModelState state)

Deserializes this node from a DataNode.

finalize
void finalize(ModelState state)

Finalizes this node and its children.

updateTransform
void updateTransform()

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

preUpdate
void preUpdate(DrawList drawList)

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

update
void update(float delta, DrawList drawList)

Updates the node

postUpdate
void postUpdate(DrawList drawList)

Update sequence run after the main update sequence.

draw
void draw(float delta, DrawList drawList)

Draws this node and it's subnodes

hasProperty
bool hasProperty(quark key)

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

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.

setProperty
void setProperty(quark key, float value)

Sets the value of the property.

resetProperty
void resetProperty(quark key)

Resets the given property.

resetProperties
void resetProperties()

Resets all properties.

toString
string toString()

Gets the string representation of this object.

Meta