Visual

A node which can be drawn to the screen.

Constructors

this
this(Node parent)

Constructs a new visual

this
this(GUID guid, Node parent)

Constructs a new visual

Destructor

~this
~this()

Destructor

Members

Functions

drawMask
void drawMask(float delta, DrawList drawList, MaskingMode mode)

Draws this visual as a mask.

findVisuals
void findVisuals(weak_vector!Visual visuals, bool recurseDelegates, bool append)

Requests that the list gather sub-visuals to be rendered, if applicable.

onDefineProperties
void onDefineProperties(PropertyStore propList)

Called when the node is to define its properties.

onDelegateFindVisuals
void onDelegateFindVisuals(weak_vector!Visual visuals, bool recurseDelegates, bool append)

Callback for when the Visual is being requested to find its sub-visuals.

onDeserialize
void onDeserialize(DataNode object, ModelState state)

Deserializes this node from a DataNode.

onDrawMask
void onDrawMask(float delta, DrawList drawList, MaskingMode mode)

Called when the node should be drawn to a mask.

onFinalize
void onFinalize(ModelState state)

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

onSerialize
void onSerialize(DataNode object)

Serializes this node to a DataNode.

Properties

isDelegated
bool isDelegated [@property getter]

Whether the renderer should delegate rendering logic to the visual node.

isMasking
bool isMasking [@property getter]

Whether the node can be used as a source of masking operations.

zSort
int zSort [@property getter]

World-space Z-sorting value

zSortRender
float zSortRender [@property getter]

World-space z-sorting value taking in to account properties.

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