Tesla Graphics Engine Documentation (January 2012)
Node Class
TeslaTesla.SceneNode
A node represents an internal element in the scene graph, meaning it is capable of owning children. They are responsible for updating and drawing said children. Although Nodes are purely logical and are not actually drawn, their world bounding contains all their children's, which is leveraged during the culling process to cull entire subtree's in the scene graph that are not visible.
Declaration Syntax
C#
public class Node : Spatial
Members
All Members Constructors Methods Properties



Icon Member Description
Node()()()()
Do not use directly, for ISavable

Node(String)
Creates a new instance of Node with initial child capacity of 1.

Node(String, Int32)
Creates a new instance of Node with the specified name and initial child capacity.

AcceptVisitor(IVisitor, Boolean)
Accept a visitor to execute on this node.
(Overrides Spatial.AcceptVisitor(IVisitor, Boolean).)
AddChild(Spatial)
Adds a child to this node.

AddController(ISpatialController)
Add a controller to this Spatial's collection.
(Inherited from Spatial.)
AddLight(Light)
Adds a light to the Spatial's light collection.
(Inherited from Spatial.)
Children
Gets the children list as read-only.

ClearDirty(DirtyMark)
Clears the specified dirty mark from this Spatial.
(Inherited from Spatial.)
CollectLights(LightCollection)
Collects all the lights from this Spatial up to the root, copying all lights at each node.
(Inherited from Spatial.)
Controllers
Gets the read-only controller collection attached to this Spatial.
(Inherited from Spatial.)
Draw(IRenderer)
Calls OnDraw() on each child for frustum check.
(Overrides Spatial.Draw(IRenderer).)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetChildAt(Int32)
Gets the child at the specified index.

GetChildIndex(Spatial)
Gets the first index of the specified child, if it exists.

GetChildNamed(String)
Gets the first child with the specified name, if it exists.

GetControllerAt(Int32)
Gets the controller at the specified index in this Spatial's collection. If the index is out of range, null will be returned.
(Inherited from Spatial.)
GetDescendentNamed(String)
Gets a desendent with the specified name, if it exists.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetLightAt(Int32)
Gets the light from the Spatial's light collection if it exists.
(Inherited from Spatial.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
IsDirty(DirtyMark)
Checks if this Spatial is marked with the specified dirty mark.
(Inherited from Spatial.)
LastFrustumIntersect
Gets or sets the last frustum intersection result, which is used in the cull check in OnDraw(). Set this if you render a subtree and do not want it to be influenced by the parent.
(Inherited from Spatial.)
Lights
Gets the local light collection relative to this Spatial. This collection is not read-only, but it is safe to modify its content as it will update the spatial it is attached to automatically.
(Inherited from Spatial.)
MarkDirty(DirtyMark)
Marks the spatial dirty, but does not propagate the mark up/down the tree.
(Inherited from Spatial.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Name
Get or set this Spatial's name.
(Inherited from Spatial.)
OnDraw(IRenderer)
Checks if the Spatial should be culled, if the Spatial is visible then Draw() will be called.
(Inherited from Spatial.)
Parent
Gets this Spatial's parent.
(Inherited from Spatial.)
ParentHintable
Gets the IHintable parent fro this Spatial, for inheritable scene hints to use.
(Inherited from Spatial.)
PropagateBoundToRoot()()()()
Update this Spatial's parent world bounding and propagates the call to the root, ensuring all ancestors' world boundings properly contain their children's.
(Inherited from Spatial.)
PropagateDirtyDown(DirtyMark)
Propagates a dirty mark down the tree, calling PropagateDirtyDown() on each child.
(Overrides Spatial.PropagateDirtyDown(DirtyMark).)
PropagateDirtyUp(DirtyMark)
Marks this spatial with the dirty flag and then propagates it up the scene graph.
(Inherited from Spatial.)
Read(ISavableReader)
Deserializes the object and populates it from the input.
(Overrides Spatial.Read(ISavableReader).)
RemoveAllChildren()()()()
Detaches all children from this node.

RemoveAllControllers()()()()
Remove all controllers from this Spatial's collection.
(Inherited from Spatial.)
RemoveAllLights()()()()
Removes all lights from the Spatial's light collection.
(Inherited from Spatial.)
RemoveChild(Spatial)
Removes the child from the children list and sets its parent to null.

RemoveChildAt(Int32)
Removes the child from the children list at the specified index.

RemoveChildNamed(String)
Removes the first child with the specified name from this node.

RemoveController(ISpatialController)
Removes a controller from this Spatial's collection.
(Inherited from Spatial.)
RemoveControllerAt(Int32)
Removes a controller from the specified index in this Spatial's collection. If the index is out of range, then false will be returned.
(Inherited from Spatial.)
RemoveFromParent()()()()
Removes this spatial from its parent, if it exists.
(Inherited from Spatial.)
RemoveLight(Light)
Removes the specified light from the Spatial light collection, if it exists.
(Inherited from Spatial.)
RemoveLightAt(Int32)
Removes a light by index from the Spatial's light collection.
(Inherited from Spatial.)
Rotation
Get or set this Spatial's local rotation.
(Inherited from Spatial.)
Scale
Get or set this Spatial's local scale.
(Inherited from Spatial.)
SceneHints
Gets this Spatial's scene hints, a collection of enumerations that describe how the spatial should be processed.
(Inherited from Spatial.)
SetMaterial(Material)
Convience method to propagate a material down the scene graph. Each child that is a mesh gets a cloned copy.
(Overrides Spatial.SetMaterial(Material).)
SetModelBound(BoundingVolume)
Convienence method to propagate a model bounding volume down the scene graph. Each child that is a mesh gets a cloned copy.
(Overrides Spatial.SetModelBound(BoundingVolume).)
SetRenderState(RenderState)
Convienence method to propagate a render state down the scene graph.
(Overrides Spatial.SetRenderState(RenderState).)
SetRotation(Matrix)
Convience method to set local rotation from a matrix.
(Inherited from Spatial.)
SetScale(Single)
Convience method to set local uniform scale.
(Inherited from Spatial.)
SetTranslation(Single, Single, Single)
Convience method to set local translation.
(Inherited from Spatial.)
SortLights()()()()
Sorts child world lights.
(Overrides Spatial.SortLights()()()().)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Transform
Get or set this Spatial's local transform.
(Inherited from Spatial.)
Translation
Get or set this Spatial's local translation.
(Inherited from Spatial.)
Update(GameTime, Boolean)
Update the Node. Updating it will update the transformation, lighting, and bounding properties if they are dirty. This is mainly used internally, as initiating will propagate the scene world bounding to the root node, after its children and their children are updated. Update order: 1. Controllers 2. World Transform 3. World lighting 4. Children 5. World Bounding 6. Propagate Bound (if initiator)
(Overrides Spatial.Update(GameTime, Boolean).)
Update(GameTime)
Update the Spatial. Updating it will update the transformation, lighting, and bounding properties if they are dirty. Update order: 1. Controllers 2. World Transform 3. World lighting 4. Children (if Node) 5. World Bounding 6. Propagate Bound (if initiator)
(Inherited from Spatial.)
UpdateControllers(GameTime)
Updates the controllers attached to this node.
(Inherited from Spatial.)
UpdateWorldBound(Boolean)
Updates the world bounding of this node. If recurse is true, the world boundings of each child are also updated.
(Overrides Spatial.UpdateWorldBound(Boolean).)
UpdateWorldLights(Boolean)
Updates world lights.
(Overrides Spatial.UpdateWorldLights(Boolean).)
UpdateWorldTransform(Boolean)
Updates the world transform of this Node, and if recurse is true, it updates the world transform of each child.
(Overrides Spatial.UpdateWorldTransform(Boolean).)
WorldBounding
Gets or sets the world bounding for this Spatial. This may be null.
(Inherited from Spatial.)
WorldMatrix
Get the world matrix for this Spatial. This is equivalent to spatial.WorldTransforms.GetMatrix()
(Inherited from Spatial.)
WorldRotation
Get this Spatial's world rotation.
(Inherited from Spatial.)
WorldScale
Gets this Spatial's world scale.
(Inherited from Spatial.)
WorldTransform
Gets this Spatial's world transform.
(Inherited from Spatial.)
WorldTranslation
Get this Spatial's world translation.
(Inherited from Spatial.)
Write(ISavableWriter)
Serializes the object and writes it to the output.
(Overrides Spatial.Write(ISavableWriter).)
Inheritance Hierarchy
Object
Spatial
  Node

Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)