MonoGameSceneGraph Namespace

A Sandcastle Documented Class Library
MonoGameSceneGraph Namespace
MonoGameSceneGraph is the main namespace that contains all the MonoGame-SceneGraph entities.
Classes
 | Class | Description
Public class | CullingNode | A culling node is a special node that cull itself if out of screen, based on camera frustum and node bounding box.
Public class | ModelEntity | A basic renderable model. Note: this object is more of an example of how to create a renderable entity, you will probably need to implement something more sophisticated on your own.
Public class | Node | A node with transformations, you can attach renderable entities to it, or append child nodes to inherit transformations.
Public class | Transformations | Contain all the possible node transformations.
Interfaces
 | Interface | Description
Public interface | IEntity | A basic renderable entity.
Enumerations
 | Enumeration | Description
Public enumeration | RotationOrder | Different ways to apply rotation (order in which we rotate the different axis).
Public enumeration | TransformOrder | Different way to build matrix from transformations.


CullingNode Class

CullingNode Class
A culling node is a special node that cull itself if out of screen, based on camera frustum and node bounding box.
Inheritance Hierarchy
SystemObject
MonoGameSceneGraphNode
MonoGameSceneGraphCullingNode

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public class CullingNode : Node
Public Class CullingNode
    Inherits Node
public ref class CullingNode : public Node
type CullingNode =
    class
        inherit Node
    end

The CullingNode type exposes the following members.

Constructors
 | Name | Description
Public method | CullingNode | Initializes a new instance of the CullingNode class
Top
Properties
 | Name | Description
Public property | Empty | Return true if this node is empty. (Inherited from Node.)
Public property | LocalTransformations | Return local transformations matrix (note: will recalculate if needed). (Inherited from Node.)
Public property | Parent | Get parent node. (Inherited from Node.)
Public property | Position | Get / Set node local position. (Inherited from Node.)
Public property | PositionX | Alias to access position X directly. (Inherited from Node.)
Public property | PositionY | Alias to access position Y directly. (Inherited from Node.)
Public property | PositionZ | Alias to access position Z directly. (Inherited from Node.)
Public property | Rotation | Get / Set node local rotation. (Inherited from Node.)
Public property | RotationOrder | Get / Set the order in which we apply local rotation in this node. (Inherited from Node.)
Public property | RotationX | Alias to access rotation X directly. (Inherited from Node.)
Public property | RotationY | Alias to access rotation Y directly. (Inherited from Node.)
Public property | RotationZ | Alias to access rotation Z directly. (Inherited from Node.)
Public property | Scale | Get / Set node local scale. (Inherited from Node.)
Public property | ScaleX | Alias to access scale X directly. (Inherited from Node.)
Public property | ScaleY | Alias to access scale Y directly. (Inherited from Node.)
Public property | ScaleZ | Alias to access scale Z directly. (Inherited from Node.)
Public property | TransformationsOrder | Get / Set the order in which we apply local transformations in this node. (Inherited from Node.)
Public property | TransformVersion | Transformation version is a special identifier that changes whenever the world transformations of this node changes. Its not necessarily a sequence, but if you check this number for changes every frame its a good indication of transformation change. (Inherited from Node.)
Public property | Visible | Is this node currently visible? (Inherited from Node.)
Public property | WorldTransformations | Return world transformations matrix (note: will recalculate if needed). (Inherited from Node.)
Top
Methods
 | Name | Description
Public method | AddChildNode | Add a child node to this node. (Inherited from Node.)
Public method | AddEntity | Add an entity to this node. (Inherited from Node.)
Public method | Draw | Draw the node and its children. (Overrides NodeDraw.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method | FindChildNode | Find and return first child node by identifier. (Inherited from Node.)
Public method | GetBoundingBox | Get bounding box of this node and all its child nodes. (Overrides NodeGetBoundingBox(Boolean).)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Public method | OnChildWorldMatrixChange | Called every time one of the child nodes recalculate world transformations. (Overrides NodeOnChildWorldMatrixChange(Node).)
Protected method | OnTransformationsSet | Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed. We use this to set this node as "dirty", eg that we need to update local transformations. (Inherited from Node.)
Protected method | OnWorldMatrixChange | Called when the world matrix of this node is actually recalculated (invoked after the calculation). (Overrides NodeOnWorldMatrixChange.)
Public method | RemoveChildNode | Remove a child node from this node. (Inherited from Node.)
Public method | RemoveEntity | Remove an entity from this node. (Inherited from Node.)
Public method | RemoveFromParent | Remove this node from its parent. (Inherited from Node.)
Public method | ResetTransformations | Reset all local transformations. (Inherited from Node.)
Protected method | SetParent | Set the parent of this node. (Inherited from Node.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Translate | Move position by vector. (Inherited from Node.)
Protected method | UpdateBoundingBox | Update the bounding box of this Culling Node.
Protected method | UpdateTransformations | Calc final transformations for current frame. This uses an indicator to know if an update is needed, so no harm is done if you call it multiple times. (Inherited from Node.)
Top
Fields
 | Name | Description
Protected field | _boundingBox | Last calculated bounding box for this node.
Protected field | _childEntities | Child entities under this node. (Inherited from Node.)
Protected field | _childNodes | Child nodes under this node. (Inherited from Node.)
Protected field | _isBoundingBoxDirty | Do we need to update the bounding box?
Protected field | _isDirty | Turns true when the transformations of this node changes. (Inherited from Node.)
Protected field | _localTransform | Local transformations matrix, eg the result of the current local transformations. (Inherited from Node.)
Protected field | _parent | Parent node. (Inherited from Node.)
Protected field | _parentLastTransformVersion | The last transformations version we got from our parent. (Inherited from Node.)
Protected field | _rotationOrder | The order in which we apply rotation when building the matrix for this node. (Inherited from Node.)
Protected field | _transformations | Node's transformations. (Inherited from Node.)
Protected field | _transformationsOrder | The order in which we apply transformations when building the matrix for this node. (Inherited from Node.)
Protected field | _transformVersion | This number increment every time we update transformations. We use it to check if our parent's transformations had been changed since last time this node was rendered, and if so, we re-apply parent updated transformations. (Inherited from Node.)
Protected field | _worldTransform | World transformations matrix, eg the result of the local transformations multiplied with parent transformations. (Inherited from Node.)
 | CameraFrustum | The camera frustum to cull by. You need to update this every time the camera frustum changes in order to make the culling work currectly.
Public field | Identifier | Optional identifier we can give to nodes. (Inherited from Node.)
Public field | UserData | Optional user data we can attach to nodes. (Inherited from Node.)
Top
Remarks
It works as follows: 1. Every time the camera changes, the static member CameraFrustum must be updated. The Culling Node will use this frustum to detect weather or not its in screen. 2. Whenever the transformations of this node update, it will also calculate the Bounding Box of itself with all its child nodes and entities. 3. When the node is drawn, it will first test collision between its bounding box and the camera frustum. If its found to be out of screen, the node will not draw itself or its children. Its important to note that using Culling Nodes properly require some non-trivial designing for the scene graph. For example, if you have a tilemap that is made out of 100x100 nodes grid (every node = single tile), and you put all the tile nodes under a single node (eg a node with 10,000 children), the result would be that the parent node will have a huge bounding box that will most likely always be in screen, and then the Culling Nodes will have to test for 10,000 bounding boxes to detect exactly which tiles are in screen and which are not.. Not only that this won't really boost up performance, it might even slow your game down (depending on CPU/GPU strength). So in the example above, in order to really enjoy the culling, you should break the 100x100 grid into smaller grids and break those grids as well. For example, break the parent node into 4 nodes with 50x50 tiles each, and then break those nodes into 5x5 nodes with 10 tiles each. This way, the Culling Node will first test 4 large bounding box, with an actual chance of culling some of them. Then we'll have 25 bounding boxes to check per chunk, and some of them will cull out as well. For larger maps, just break into more chunks. Another thing you need to remember is that you can combine Culling Nodes with regular nodes, but the regular nodes must be the edges (eg [culling_node] -> [plain_node] -> [culling_node] will not work properly). For example if you implemet particles or doodads (like grass) with lots of small nodes, sometimes its enough to just test their parent node.
See Also

Reference

MonoGameSceneGraph Namespace


CullingNode Constructor

CullingNode Constructor
Initializes a new instance of the CullingNode class

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public CullingNode()
Public Sub New
public:
CullingNode()
new : unit -> CullingNode
See Also

Reference

CullingNode Class


CullingNode Properties

CullingNode Properties

The CullingNode type exposes the following members.

Properties
 | Name | Description
Public property | Empty | Return true if this node is empty. (Inherited from Node.)
Public property | LocalTransformations | Return local transformations matrix (note: will recalculate if needed). (Inherited from Node.)
Public property | Parent | Get parent node. (Inherited from Node.)
Public property | Position | Get / Set node local position. (Inherited from Node.)
Public property | PositionX | Alias to access position X directly. (Inherited from Node.)
Public property | PositionY | Alias to access position Y directly. (Inherited from Node.)
Public property | PositionZ | Alias to access position Z directly. (Inherited from Node.)
Public property | Rotation | Get / Set node local rotation. (Inherited from Node.)
Public property | RotationOrder | Get / Set the order in which we apply local rotation in this node. (Inherited from Node.)
Public property | RotationX | Alias to access rotation X directly. (Inherited from Node.)
Public property | RotationY | Alias to access rotation Y directly. (Inherited from Node.)
Public property | RotationZ | Alias to access rotation Z directly. (Inherited from Node.)
Public property | Scale | Get / Set node local scale. (Inherited from Node.)
Public property | ScaleX | Alias to access scale X directly. (Inherited from Node.)
Public property | ScaleY | Alias to access scale Y directly. (Inherited from Node.)
Public property | ScaleZ | Alias to access scale Z directly. (Inherited from Node.)
Public property | TransformationsOrder | Get / Set the order in which we apply local transformations in this node. (Inherited from Node.)
Public property | TransformVersion | Transformation version is a special identifier that changes whenever the world transformations of this node changes. Its not necessarily a sequence, but if you check this number for changes every frame its a good indication of transformation change. (Inherited from Node.)
Public property | Visible | Is this node currently visible? (Inherited from Node.)
Public property | WorldTransformations | Return world transformations matrix (note: will recalculate if needed). (Inherited from Node.)
Top
See Also

Reference

CullingNode Class


CullingNode Methods

CullingNode Methods

The CullingNode type exposes the following members.

Methods
 | Name | Description
Public method | AddChildNode | Add a child node to this node. (Inherited from Node.)
Public method | AddEntity | Add an entity to this node. (Inherited from Node.)
Public method | Draw | Draw the node and its children. (Overrides NodeDraw.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method | FindChildNode | Find and return first child node by identifier. (Inherited from Node.)
Public method | GetBoundingBox | Get bounding box of this node and all its child nodes. (Overrides NodeGetBoundingBox(Boolean).)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Public method | OnChildWorldMatrixChange | Called every time one of the child nodes recalculate world transformations. (Overrides NodeOnChildWorldMatrixChange(Node).)
Protected method | OnTransformationsSet | Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed. We use this to set this node as "dirty", eg that we need to update local transformations. (Inherited from Node.)
Protected method | OnWorldMatrixChange | Called when the world matrix of this node is actually recalculated (invoked after the calculation). (Overrides NodeOnWorldMatrixChange.)
Public method | RemoveChildNode | Remove a child node from this node. (Inherited from Node.)
Public method | RemoveEntity | Remove an entity from this node. (Inherited from Node.)
Public method | RemoveFromParent | Remove this node from its parent. (Inherited from Node.)
Public method | ResetTransformations | Reset all local transformations. (Inherited from Node.)
Protected method | SetParent | Set the parent of this node. (Inherited from Node.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Translate | Move position by vector. (Inherited from Node.)
Protected method | UpdateBoundingBox | Update the bounding box of this Culling Node.
Protected method | UpdateTransformations | Calc final transformations for current frame. This uses an indicator to know if an update is needed, so no harm is done if you call it multiple times. (Inherited from Node.)
Top
See Also

Reference

CullingNode Class


CullingNode.Draw Method

CullingNodeDraw Method
Draw the node and its children.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public override void Draw()
Public Overrides Sub Draw
public:
virtual void Draw() override
abstract Draw : unit -> unit
override Draw : unit -> unit
See Also

Reference

CullingNode Class


CullingNode.GetBoundingBox Method

CullingNodeGetBoundingBox Method
Get bounding box of this node and all its child nodes.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public override BoundingBox GetBoundingBox(
    bool includeChildNodes = true
)
Public Overrides Function GetBoundingBox (
    Optional includeChildNodes As Boolean = true
) As BoundingBox
public:
virtual BoundingBox GetBoundingBox(
    bool includeChildNodes = true
) override
abstract GetBoundingBox :
        ?includeChildNodes : bool
(* Defaults:
        let _includeChildNodes = defaultArg includeChildNodes true
*)
-> BoundingBox
override GetBoundingBox :
        ?includeChildNodes : bool
(* Defaults:
        let _includeChildNodes = defaultArg includeChildNodes true
*)
-> BoundingBox

Parameters

includeChildNodes (Optional)
Type: SystemBoolean
If true, will include bounding box of child nodes. If false, only of entities directly attached to this node.

Return Value

Type: BoundingBox
Bounding box of the node and its children.
See Also

Reference

CullingNode Class


CullingNode.OnChildWorldMatrixChange Method

CullingNodeOnChildWorldMatrixChange Method
Called every time one of the child nodes recalculate world transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public override void OnChildWorldMatrixChange(
    Node node
)
Public Overrides Sub OnChildWorldMatrixChange (
    node As Node
)
public:
virtual void OnChildWorldMatrixChange(
    Node^ node
) override
abstract OnChildWorldMatrixChange :
        node : Node -> unit
override OnChildWorldMatrixChange :
        node : Node -> unit

Parameters

node
Type: MonoGameSceneGraphNode
The child node that updated.
See Also

Reference

CullingNode Class


CullingNode.OnWorldMatrixChange Method

CullingNodeOnWorldMatrixChange Method
Called when the world matrix of this node is actually recalculated (invoked after the calculation).

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected override void OnWorldMatrixChange()
Protected Overrides Sub OnWorldMatrixChange
protected:
virtual void OnWorldMatrixChange() override
abstract OnWorldMatrixChange : unit -> unit
override OnWorldMatrixChange : unit -> unit
See Also

Reference

CullingNode Class


CullingNode.UpdateBoundingBox Method

CullingNodeUpdateBoundingBox Method
Update the bounding box of this Culling Node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected virtual void UpdateBoundingBox()
Protected Overridable Sub UpdateBoundingBox
protected:
virtual void UpdateBoundingBox()
abstract UpdateBoundingBox : unit -> unit
override UpdateBoundingBox : unit -> unit
See Also

Reference

CullingNode Class


CullingNode Fields

CullingNode Fields

The CullingNode type exposes the following members.

Fields
 | Name | Description
Protected field | _boundingBox | Last calculated bounding box for this node.
Protected field | _childEntities | Child entities under this node. (Inherited from Node.)
Protected field | _childNodes | Child nodes under this node. (Inherited from Node.)
Protected field | _isBoundingBoxDirty | Do we need to update the bounding box?
Protected field | _isDirty | Turns true when the transformations of this node changes. (Inherited from Node.)
Protected field | _localTransform | Local transformations matrix, eg the result of the current local transformations. (Inherited from Node.)
Protected field | _parent | Parent node. (Inherited from Node.)
Protected field | _parentLastTransformVersion | The last transformations version we got from our parent. (Inherited from Node.)
Protected field | _rotationOrder | The order in which we apply rotation when building the matrix for this node. (Inherited from Node.)
Protected field | _transformations | Node's transformations. (Inherited from Node.)
Protected field | _transformationsOrder | The order in which we apply transformations when building the matrix for this node. (Inherited from Node.)
Protected field | _transformVersion | This number increment every time we update transformations. We use it to check if our parent's transformations had been changed since last time this node was rendered, and if so, we re-apply parent updated transformations. (Inherited from Node.)
Protected field | _worldTransform | World transformations matrix, eg the result of the local transformations multiplied with parent transformations. (Inherited from Node.)
 | CameraFrustum | The camera frustum to cull by. You need to update this every time the camera frustum changes in order to make the culling work currectly.
Public field | Identifier | Optional identifier we can give to nodes. (Inherited from Node.)
Public field | UserData | Optional user data we can attach to nodes. (Inherited from Node.)
Top
See Also

Reference

CullingNode Class


CullingNode._boundingBox Field

CullingNode_boundingBox Field
Last calculated bounding box for this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected BoundingBox _boundingBox
Protected _boundingBox As BoundingBox
protected:
BoundingBox _boundingBox
val mutable _boundingBox: BoundingBox

Field Value

Type: BoundingBox
See Also

Reference

CullingNode Class


CullingNode._isBoundingBoxDirty Field

CullingNode_isBoundingBoxDirty Field
Do we need to update the bounding box?

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected bool _isBoundingBoxDirty
Protected _isBoundingBoxDirty As Boolean
protected:
bool _isBoundingBoxDirty
val mutable _isBoundingBoxDirty: bool

Field Value

Type: Boolean
See Also

Reference

CullingNode Class


CullingNode.CameraFrustum Field

CullingNodeCameraFrustum Field
The camera frustum to cull by. You need to update this every time the camera frustum changes in order to make the culling work currectly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public static BoundingFrustum CameraFrustum
Public Shared CameraFrustum As BoundingFrustum
public:
static BoundingFrustum^ CameraFrustum
static val mutable CameraFrustum: BoundingFrustum

Field Value

Type: BoundingFrustum
See Also

Reference

CullingNode Class


IEntity Interface

IEntity Interface
A basic renderable entity.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public interface IEntity
Public Interface IEntity
public interface class IEntity
type IEntity =  interface end

The IEntity type exposes the following members.

Properties
 | Name | Description
Public property | Visible | Return if the entity is currently visible.
Top
Methods
 | Name | Description
Public method | Draw | Draw this entity.
Public method | GetBoundingBox | Get the bounding box of this entity (in world space).
Top
See Also

Reference

MonoGameSceneGraph Namespace


IEntity Properties

IEntity Properties

The IEntity type exposes the following members.

Properties
 | Name | Description
Public property | Visible | Return if the entity is currently visible.
Top
See Also

Reference

IEntity Interface


IEntity.Visible Property

IEntityVisible Property
Return if the entity is currently visible.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
bool Visible { get; set; }
Property Visible As Boolean
    Get
    Set
property bool Visible {
    bool get ();
    void set (bool value);
}
abstract Visible : bool with get, set

Return Value

Type: Boolean
If the entity is visible or not.
See Also

Reference

IEntity Interface


IEntity Methods

IEntity Methods

The IEntity type exposes the following members.

Methods
 | Name | Description
Public method | Draw | Draw this entity.
Public method | GetBoundingBox | Get the bounding box of this entity (in world space).
Top
See Also

Reference

IEntity Interface


IEntity.Draw Method

IEntityDraw Method
Draw this entity.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
void Draw(
    Node parent,
    Matrix localTransformations,
    Matrix worldTransformations
)
Sub Draw (
    parent As Node,
    localTransformations As Matrix,
    worldTransformations As Matrix
)
void Draw(
    Node^ parent,
    Matrix localTransformations,
    Matrix worldTransformations
)
abstract Draw :
        parent : Node *
        localTransformations : Matrix *
        worldTransformations : Matrix -> unit

Parameters

parent
Type: MonoGameSceneGraphNode
Parent node that's currently drawing this entity.
localTransformations
Type: Matrix
Local transformations from the direct parent node.
worldTransformations
Type: Matrix
World transformations to apply on this entity (this is what you should use to draw this entity).
See Also

Reference

IEntity Interface


IEntity.GetBoundingBox Method

IEntityGetBoundingBox Method
Get the bounding box of this entity (in world space).

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
BoundingBox GetBoundingBox(
    Node parent,
    Matrix localTransformations,
    Matrix worldTransformations
)
Function GetBoundingBox (
    parent As Node,
    localTransformations As Matrix,
    worldTransformations As Matrix
) As BoundingBox
BoundingBox GetBoundingBox(
    Node^ parent,
    Matrix localTransformations,
    Matrix worldTransformations
)
abstract GetBoundingBox :
        parent : Node *
        localTransformations : Matrix *
        worldTransformations : Matrix -> BoundingBox

Parameters

parent
Type: MonoGameSceneGraphNode
Parent node that's currently drawing this entity.
localTransformations
Type: Matrix
Local transformations from the direct parent node.
worldTransformations
Type: Matrix
World transformations to apply on this entity (this is what you should use to draw this entity).

Return Value

Type: BoundingBox
Bounding box of the entity, in world space.
See Also

Reference

IEntity Interface


ModelEntity Class

ModelEntity Class
A basic renderable model. Note: this object is more of an example of how to create a renderable entity, you will probably need to implement something more sophisticated on your own.
Inheritance Hierarchy
SystemObject
MonoGameSceneGraphModelEntity

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public class ModelEntity : IEntity
Public Class ModelEntity
    Implements IEntity
public ref class ModelEntity : IEntity
type ModelEntity =
    class
        interface IEntity
    end

The ModelEntity type exposes the following members.

Constructors
 | Name | Description
Public method | ModelEntity | Create the model entity.
Top
Properties
 | Name | Description
Public property | Visible | Return if the entity is currently visible.
Top
Methods
 | Name | Description
Public method | Draw | Draw this model.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method | GetBoundingBox | Get the bounding box of this entity.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
Fields
 | Name | Description
Public field | EnableLighting | Enable / disable default lighting on model.
Public field | Model | The model to render.
Public field | Projection | Projection matrix to use with model.
Public field | View | View matrix to use with model.
Top
See Also

Reference

MonoGameSceneGraph Namespace


ModelEntity Constructor

ModelEntity Constructor
Create the model entity.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public ModelEntity(
    Model model
)
Public Sub New (
    model As Model
)
public:
ModelEntity(
    Model^ model
)
new :
        model : Model -> ModelEntity

Parameters

model
Type: Model
Model to draw.
See Also

Reference

ModelEntity Class


ModelEntity Properties

ModelEntity Properties

The ModelEntity type exposes the following members.

Properties
 | Name | Description
Public property | Visible | Return if the entity is currently visible.
Top
See Also

Reference

ModelEntity Class


ModelEntity.Visible Property

ModelEntityVisible Property
Return if the entity is currently visible.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public bool Visible { get; set; }
Public Property Visible As Boolean
    Get
    Set
public:
virtual property bool Visible {
    bool get () sealed;
    void set (bool value) sealed;
}
abstract Visible : bool with get, set
override Visible : bool with get, set

Return Value

Type: Boolean
If the entity is visible or not.

Implements

IEntityVisible
See Also

Reference

ModelEntity Class


ModelEntity Methods

ModelEntity Methods

The ModelEntity type exposes the following members.

Methods
 | Name | Description
Public method | Draw | Draw this model.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method | GetBoundingBox | Get the bounding box of this entity.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

ModelEntity Class


ModelEntity.Draw Method

ModelEntityDraw Method
Draw this model.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public void Draw(
    Node parent,
    Matrix localTransformations,
    Matrix worldTransformations
)
Public Sub Draw (
    parent As Node,
    localTransformations As Matrix,
    worldTransformations As Matrix
)
public:
virtual void Draw(
    Node^ parent,
    Matrix localTransformations,
    Matrix worldTransformations
) sealed
abstract Draw :
        parent : Node *
        localTransformations : Matrix *
        worldTransformations : Matrix -> unit
override Draw :
        parent : Node *
        localTransformations : Matrix *
        worldTransformations : Matrix -> unit

Parameters

parent
Type: MonoGameSceneGraphNode
Parent node that's currently drawing this entity.
localTransformations
Type: Matrix
Local transformations from the direct parent node.
worldTransformations
Type: Matrix
World transformations to apply on this entity (this is what you should use to draw this entity).

Implements

IEntityDraw(Node, Matrix, Matrix)
See Also

Reference

ModelEntity Class


ModelEntity.GetBoundingBox Method

ModelEntityGetBoundingBox Method
Get the bounding box of this entity.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public BoundingBox GetBoundingBox(
    Node parent,
    Matrix localTransformations,
    Matrix worldTransformations
)
Public Function GetBoundingBox (
    parent As Node,
    localTransformations As Matrix,
    worldTransformations As Matrix
) As BoundingBox
public:
virtual BoundingBox GetBoundingBox(
    Node^ parent,
    Matrix localTransformations,
    Matrix worldTransformations
) sealed
abstract GetBoundingBox :
        parent : Node *
        localTransformations : Matrix *
        worldTransformations : Matrix -> BoundingBox
override GetBoundingBox :
        parent : Node *
        localTransformations : Matrix *
        worldTransformations : Matrix -> BoundingBox

Parameters

parent
Type: MonoGameSceneGraphNode
Parent node that's currently drawing this entity.
localTransformations
Type: Matrix
Local transformations from the direct parent node.
worldTransformations
Type: Matrix
World transformations to apply on this entity (this is what you should use to draw this entity).

Return Value

Type: BoundingBox
Bounding box of the entity.

Implements

IEntityGetBoundingBox(Node, Matrix, Matrix)
See Also

Reference

ModelEntity Class


ModelEntity Fields

ModelEntity Fields

The ModelEntity type exposes the following members.

Fields
 | Name | Description
Public field | EnableLighting | Enable / disable default lighting on model.
Public field | Model | The model to render.
Public field | Projection | Projection matrix to use with model.
Public field | View | View matrix to use with model.
Top
See Also

Reference

ModelEntity Class


ModelEntity.EnableLighting Field

ModelEntityEnableLighting Field
Enable / disable default lighting on model.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public bool EnableLighting
Public EnableLighting As Boolean
public:
bool EnableLighting
val mutable EnableLighting: bool

Field Value

Type: Boolean
See Also

Reference

ModelEntity Class


ModelEntity.Model Field

ModelEntityModel Field
The model to render.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Model Model
Public Model As Model
public:
Model^ Model
val mutable Model: Model

Field Value

Type: Model
See Also

Reference

ModelEntity Class


ModelEntity.Projection Field

ModelEntityProjection Field
Projection matrix to use with model.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Matrix Projection
Public Projection As Matrix
public:
Matrix Projection
val mutable Projection: Matrix

Field Value

Type: Matrix
See Also

Reference

ModelEntity Class


ModelEntity.View Field

ModelEntityView Field
View matrix to use with model.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Matrix View
Public View As Matrix
public:
Matrix View
val mutable View: Matrix

Field Value

Type: Matrix
See Also

Reference

ModelEntity Class


Node Class

Node Class
A node with transformations, you can attach renderable entities to it, or append child nodes to inherit transformations.
Inheritance Hierarchy
SystemObject
MonoGameSceneGraphNode
MonoGameSceneGraphCullingNode

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public class Node
Public Class Node
public ref class Node
type Node =  class end

The Node type exposes the following members.

Constructors
 | Name | Description
Public method | Node | Create the new node.
Top
Properties
 | Name | Description
Public property | Empty | Return true if this node is empty.
Public property | LocalTransformations | Return local transformations matrix (note: will recalculate if needed).
Public property | Parent | Get parent node.
Public property | Position | Get / Set node local position.
Public property | PositionX | Alias to access position X directly.
Public property | PositionY | Alias to access position Y directly.
Public property | PositionZ | Alias to access position Z directly.
Public property | Rotation | Get / Set node local rotation.
Public property | RotationOrder | Get / Set the order in which we apply local rotation in this node.
Public property | RotationX | Alias to access rotation X directly.
Public property | RotationY | Alias to access rotation Y directly.
Public property | RotationZ | Alias to access rotation Z directly.
Public property | Scale | Get / Set node local scale.
Public property | ScaleX | Alias to access scale X directly.
Public property | ScaleY | Alias to access scale Y directly.
Public property | ScaleZ | Alias to access scale Z directly.
Public property | TransformationsOrder | Get / Set the order in which we apply local transformations in this node.
Public property | TransformVersion | Transformation version is a special identifier that changes whenever the world transformations of this node changes. Its not necessarily a sequence, but if you check this number for changes every frame its a good indication of transformation change.
Public property | Visible | Is this node currently visible?
Public property | WorldTransformations | Return world transformations matrix (note: will recalculate if needed).
Top
Methods
 | Name | Description
Public method | AddChildNode | Add a child node to this node.
Public method | AddEntity | Add an entity to this node.
Public method | Draw | Draw the node and its children.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method | FindChildNode | Find and return first child node by identifier.
Public method | GetBoundingBox | Get bounding box of this node and all its child nodes.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Public method | OnChildWorldMatrixChange | Called every time one of the child nodes recalculate world transformations.
Protected method | OnTransformationsSet | Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed. We use this to set this node as "dirty", eg that we need to update local transformations.
Protected method | OnWorldMatrixChange | Called when the world matrix of this node is actually recalculated (invoked after the calculation).
Public method | RemoveChildNode | Remove a child node from this node.
Public method | RemoveEntity | Remove an entity from this node.
Public method | RemoveFromParent | Remove this node from its parent.
Public method | ResetTransformations | Reset all local transformations.
Protected method | SetParent | Set the parent of this node.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Translate | Move position by vector.
Protected method | UpdateTransformations | Calc final transformations for current frame. This uses an indicator to know if an update is needed, so no harm is done if you call it multiple times.
Top
Fields
 | Name | Description
Protected field | _childEntities | Child entities under this node.
Protected field | _childNodes | Child nodes under this node.
Protected field | _isDirty | Turns true when the transformations of this node changes.
Protected field | _localTransform | Local transformations matrix, eg the result of the current local transformations.
Protected field | _parent | Parent node.
Protected field | _parentLastTransformVersion | The last transformations version we got from our parent.
Protected field | _rotationOrder | The order in which we apply rotation when building the matrix for this node.
Protected field | _transformations | Node's transformations.
Protected field | _transformationsOrder | The order in which we apply transformations when building the matrix for this node.
Protected field | _transformVersion | This number increment every time we update transformations. We use it to check if our parent's transformations had been changed since last time this node was rendered, and if so, we re-apply parent updated transformations.
Protected field | _worldTransform | World transformations matrix, eg the result of the local transformations multiplied with parent transformations.
Public field | Identifier | Optional identifier we can give to nodes.
Public field | UserData | Optional user data we can attach to nodes.
Top
See Also

Reference

MonoGameSceneGraph Namespace


Node Constructor

Node Constructor
Create the new node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Node()
Public Sub New
public:
Node()
new : unit -> Node
See Also

Reference

Node Class


Node Properties

Node Properties

The Node type exposes the following members.

Properties
 | Name | Description
Public property | Empty | Return true if this node is empty.
Public property | LocalTransformations | Return local transformations matrix (note: will recalculate if needed).
Public property | Parent | Get parent node.
Public property | Position | Get / Set node local position.
Public property | PositionX | Alias to access position X directly.
Public property | PositionY | Alias to access position Y directly.
Public property | PositionZ | Alias to access position Z directly.
Public property | Rotation | Get / Set node local rotation.
Public property | RotationOrder | Get / Set the order in which we apply local rotation in this node.
Public property | RotationX | Alias to access rotation X directly.
Public property | RotationY | Alias to access rotation Y directly.
Public property | RotationZ | Alias to access rotation Z directly.
Public property | Scale | Get / Set node local scale.
Public property | ScaleX | Alias to access scale X directly.
Public property | ScaleY | Alias to access scale Y directly.
Public property | ScaleZ | Alias to access scale Z directly.
Public property | TransformationsOrder | Get / Set the order in which we apply local transformations in this node.
Public property | TransformVersion | Transformation version is a special identifier that changes whenever the world transformations of this node changes. Its not necessarily a sequence, but if you check this number for changes every frame its a good indication of transformation change.
Public property | Visible | Is this node currently visible?
Public property | WorldTransformations | Return world transformations matrix (note: will recalculate if needed).
Top
See Also

Reference


Node.Empty Property

NodeEmpty Property
Return true if this node is empty.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public bool Empty { get; }
Public ReadOnly Property Empty As Boolean
    Get
public:
property bool Empty {
    bool get ();
}
member Empty : bool with get

Property Value

Type: Boolean
See Also

Reference


Node.LocalTransformations Property

NodeLocalTransformations Property
Return local transformations matrix (note: will recalculate if needed).

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Matrix LocalTransformations { get; }
Public ReadOnly Property LocalTransformations As Matrix
    Get
public:
property Matrix LocalTransformations {
    Matrix get ();
}
member LocalTransformations : Matrix with get

Property Value

Type: Matrix
See Also

Reference


Node.Parent Property

NodeParent Property
Get parent node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Node Parent { get; }
Public ReadOnly Property Parent As Node
    Get
public:
property Node^ Parent {
    Node^ get ();
}
member Parent : Node with get

Property Value

Type: Node
See Also

Reference


Node.Position Property

NodePosition Property
Get / Set node local position.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Vector3 Position { get; set; }
Public Property Position As Vector3
    Get
    Set
public:
property Vector3 Position {
    Vector3 get ();
    void set (Vector3 value);
}
member Position : Vector3 with get, set

Property Value

Type: Vector3
See Also

Reference


Node.PositionX Property

NodePositionX Property
Alias to access position X directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float PositionX { get; set; }
Public Property PositionX As Single
    Get
    Set
public:
property float PositionX {
    float get ();
    void set (float value);
}
member PositionX : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.PositionY Property

NodePositionY Property
Alias to access position Y directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float PositionY { get; set; }
Public Property PositionY As Single
    Get
    Set
public:
property float PositionY {
    float get ();
    void set (float value);
}
member PositionY : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.PositionZ Property

NodePositionZ Property
Alias to access position Z directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float PositionZ { get; set; }
Public Property PositionZ As Single
    Get
    Set
public:
property float PositionZ {
    float get ();
    void set (float value);
}
member PositionZ : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.Rotation Property

NodeRotation Property
Get / Set node local rotation.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Vector3 Rotation { get; set; }
Public Property Rotation As Vector3
    Get
    Set
public:
property Vector3 Rotation {
    Vector3 get ();
    void set (Vector3 value);
}
member Rotation : Vector3 with get, set

Property Value

Type: Vector3
See Also

Reference


Node.RotationOrder Property

NodeRotationOrder Property
Get / Set the order in which we apply local rotation in this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public RotationOrder RotationOrder { get; set; }
Public Property RotationOrder As RotationOrder
    Get
    Set
public:
property RotationOrder RotationOrder {
    RotationOrder get ();
    void set (RotationOrder value);
}
member RotationOrder : RotationOrder with get, set

Property Value

Type: RotationOrder
See Also

Reference


Node.RotationX Property

NodeRotationX Property
Alias to access rotation X directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float RotationX { get; set; }
Public Property RotationX As Single
    Get
    Set
public:
property float RotationX {
    float get ();
    void set (float value);
}
member RotationX : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.RotationY Property

NodeRotationY Property
Alias to access rotation Y directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float RotationY { get; set; }
Public Property RotationY As Single
    Get
    Set
public:
property float RotationY {
    float get ();
    void set (float value);
}
member RotationY : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.RotationZ Property

NodeRotationZ Property
Alias to access rotation Z directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float RotationZ { get; set; }
Public Property RotationZ As Single
    Get
    Set
public:
property float RotationZ {
    float get ();
    void set (float value);
}
member RotationZ : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.Scale Property

NodeScale Property
Get / Set node local scale.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Vector3 Scale { get; set; }
Public Property Scale As Vector3
    Get
    Set
public:
property Vector3 Scale {
    Vector3 get ();
    void set (Vector3 value);
}
member Scale : Vector3 with get, set

Property Value

Type: Vector3
See Also

Reference


Node.ScaleX Property

NodeScaleX Property
Alias to access scale X directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float ScaleX { get; set; }
Public Property ScaleX As Single
    Get
    Set
public:
property float ScaleX {
    float get ();
    void set (float value);
}
member ScaleX : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.ScaleY Property

NodeScaleY Property
Alias to access scale Y directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float ScaleY { get; set; }
Public Property ScaleY As Single
    Get
    Set
public:
property float ScaleY {
    float get ();
    void set (float value);
}
member ScaleY : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.ScaleZ Property

NodeScaleZ Property
Alias to access scale Z directly.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public float ScaleZ { get; set; }
Public Property ScaleZ As Single
    Get
    Set
public:
property float ScaleZ {
    float get ();
    void set (float value);
}
member ScaleZ : float32 with get, set

Property Value

Type: Single
See Also

Reference


Node.TransformationsOrder Property

NodeTransformationsOrder Property
Get / Set the order in which we apply local transformations in this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public TransformOrder TransformationsOrder { get; set; }
Public Property TransformationsOrder As TransformOrder
    Get
    Set
public:
property TransformOrder TransformationsOrder {
    TransformOrder get ();
    void set (TransformOrder value);
}
member TransformationsOrder : TransformOrder with get, set

Property Value

Type: TransformOrder
See Also

Reference


Node.TransformVersion Property

NodeTransformVersion Property
Transformation version is a special identifier that changes whenever the world transformations of this node changes. Its not necessarily a sequence, but if you check this number for changes every frame its a good indication of transformation change.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public uint TransformVersion { get; }
Public ReadOnly Property TransformVersion As UInteger
    Get
public:
property unsigned int TransformVersion {
    unsigned int get ();
}
member TransformVersion : uint32 with get

Property Value

Type: UInt32
See Also

Reference


Node.Visible Property

NodeVisible Property
Is this node currently visible?

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public virtual bool Visible { get; set; }
Public Overridable Property Visible As Boolean
    Get
    Set
public:
virtual property bool Visible {
    bool get ();
    void set (bool value);
}
abstract Visible : bool with get, set
override Visible : bool with get, set

Property Value

Type: Boolean
See Also

Reference


Node.WorldTransformations Property

NodeWorldTransformations Property
Return world transformations matrix (note: will recalculate if needed).

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Matrix WorldTransformations { get; }
Public ReadOnly Property WorldTransformations As Matrix
    Get
public:
property Matrix WorldTransformations {
    Matrix get ();
}
member WorldTransformations : Matrix with get

Property Value

Type: Matrix
See Also

Reference


Node Methods

Node Methods

The Node type exposes the following members.

Methods
 | Name | Description
Public method | AddChildNode | Add a child node to this node.
Public method | AddEntity | Add an entity to this node.
Public method | Draw | Draw the node and its children.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method | FindChildNode | Find and return first child node by identifier.
Public method | GetBoundingBox | Get bounding box of this node and all its child nodes.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Public method | OnChildWorldMatrixChange | Called every time one of the child nodes recalculate world transformations.
Protected method | OnTransformationsSet | Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed. We use this to set this node as "dirty", eg that we need to update local transformations.
Protected method | OnWorldMatrixChange | Called when the world matrix of this node is actually recalculated (invoked after the calculation).
Public method | RemoveChildNode | Remove a child node from this node.
Public method | RemoveEntity | Remove an entity from this node.
Public method | RemoveFromParent | Remove this node from its parent.
Public method | ResetTransformations | Reset all local transformations.
Protected method | SetParent | Set the parent of this node.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Translate | Move position by vector.
Protected method | UpdateTransformations | Calc final transformations for current frame. This uses an indicator to know if an update is needed, so no harm is done if you call it multiple times.
Top
See Also

Reference


Node.AddChildNode Method

NodeAddChildNode Method
Add a child node to this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public void AddChildNode(
    Node node
)
Public Sub AddChildNode (
    node As Node
)
public:
void AddChildNode(
    Node^ node
)
member AddChildNode :
        node : Node -> unit

Parameters

node
Type: MonoGameSceneGraphNode
Node to add.
See Also

Reference


Node.AddEntity Method

NodeAddEntity Method
Add an entity to this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public void AddEntity(
    IEntity entity
)
Public Sub AddEntity (
    entity As IEntity
)
public:
void AddEntity(
    IEntity^ entity
)
member AddEntity :
        entity : IEntity -> unit

Parameters

entity
Type: MonoGameSceneGraphIEntity
Entity to add.
See Also

Reference


Node.Draw Method

NodeDraw Method
Draw the node and its children.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public virtual void Draw()
Public Overridable Sub Draw
public:
virtual void Draw()
abstract Draw : unit -> unit
override Draw : unit -> unit
See Also

Reference


Node.FindChildNode Method

NodeFindChildNode Method
Find and return first child node by identifier.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Node FindChildNode(
    string identifier,
    bool searchInChildren = true
)
Public Function FindChildNode (
    identifier As String,
    Optional searchInChildren As Boolean = true
) As Node
public:
Node^ FindChildNode(
    String^ identifier,
    bool searchInChildren = true
)
member FindChildNode :
        identifier : string *
        ?searchInChildren : bool
(* Defaults:
        let _searchInChildren = defaultArg searchInChildren true
*)
-> Node

Parameters

identifier
Type: SystemString
Node identifier to search for.
searchInChildren (Optional)
Type: SystemBoolean
If true, will also search recurisvely in children.

Return Value

Type: Node
Node with given identifier or null if not found.
See Also

Reference


Node.GetBoundingBox Method

NodeGetBoundingBox Method
Get bounding box of this node and all its child nodes.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public virtual BoundingBox GetBoundingBox(
    bool includeChildNodes = true
)
Public Overridable Function GetBoundingBox (
    Optional includeChildNodes As Boolean = true
) As BoundingBox
public:
virtual BoundingBox GetBoundingBox(
    bool includeChildNodes = true
)
abstract GetBoundingBox :
        ?includeChildNodes : bool
(* Defaults:
        let _includeChildNodes = defaultArg includeChildNodes true
*)
-> BoundingBox
override GetBoundingBox :
        ?includeChildNodes : bool
(* Defaults:
        let _includeChildNodes = defaultArg includeChildNodes true
*)
-> BoundingBox

Parameters

includeChildNodes (Optional)
Type: SystemBoolean
If true, will include bounding box of child nodes. If false, only of entities directly attached to this node.

Return Value

Type: BoundingBox
Bounding box of the node and its children.
See Also

Reference


Node.OnChildWorldMatrixChange Method

NodeOnChildWorldMatrixChange Method
Called every time one of the child nodes recalculate world transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public virtual void OnChildWorldMatrixChange(
    Node node
)
Public Overridable Sub OnChildWorldMatrixChange (
    node As Node
)
public:
virtual void OnChildWorldMatrixChange(
    Node^ node
)
abstract OnChildWorldMatrixChange :
        node : Node -> unit
override OnChildWorldMatrixChange :
        node : Node -> unit

Parameters

node
Type: MonoGameSceneGraphNode
The child node that updated.
See Also

Reference


Node.OnTransformationsSet Method

NodeOnTransformationsSet Method
Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed. We use this to set this node as "dirty", eg that we need to update local transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected virtual void OnTransformationsSet()
Protected Overridable Sub OnTransformationsSet
protected:
virtual void OnTransformationsSet()
abstract OnTransformationsSet : unit -> unit
override OnTransformationsSet : unit -> unit
See Also

Reference


Node.OnWorldMatrixChange Method

NodeOnWorldMatrixChange Method
Called when the world matrix of this node is actually recalculated (invoked after the calculation).

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected virtual void OnWorldMatrixChange()
Protected Overridable Sub OnWorldMatrixChange
protected:
virtual void OnWorldMatrixChange()
abstract OnWorldMatrixChange : unit -> unit
override OnWorldMatrixChange : unit -> unit
See Also

Reference


Node.RemoveChildNode Method

NodeRemoveChildNode Method
Remove a child node from this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public void RemoveChildNode(
    Node node
)
Public Sub RemoveChildNode (
    node As Node
)
public:
void RemoveChildNode(
    Node^ node
)
member RemoveChildNode :
        node : Node -> unit

Parameters

node
Type: MonoGameSceneGraphNode
Node to add.
See Also

Reference


Node.RemoveEntity Method

NodeRemoveEntity Method
Remove an entity from this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public void RemoveEntity(
    IEntity entity
)
Public Sub RemoveEntity (
    entity As IEntity
)
public:
void RemoveEntity(
    IEntity^ entity
)
member RemoveEntity :
        entity : IEntity -> unit

Parameters

entity
Type: MonoGameSceneGraphIEntity
Entity to add.
See Also

Reference


Node.RemoveFromParent Method

NodeRemoveFromParent Method
Remove this node from its parent.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public void RemoveFromParent()
Public Sub RemoveFromParent
public:
void RemoveFromParent()
member RemoveFromParent : unit -> unit
See Also

Reference


Node.ResetTransformations Method

NodeResetTransformations Method
Reset all local transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public void ResetTransformations()
Public Sub ResetTransformations
public:
void ResetTransformations()
member ResetTransformations : unit -> unit
See Also

Reference


Node.SetParent Method

NodeSetParent Method
Set the parent of this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected virtual void SetParent(
    Node newParent
)
Protected Overridable Sub SetParent (
    newParent As Node
)
protected:
virtual void SetParent(
    Node^ newParent
)
abstract SetParent :
        newParent : Node -> unit
override SetParent :
        newParent : Node -> unit

Parameters

newParent
Type: MonoGameSceneGraphNode
New parent node to set, or null for no parent.
See Also

Reference


Node.Translate Method

NodeTranslate Method
Move position by vector.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public void Translate(
    Vector3 moveBy
)
Public Sub Translate (
    moveBy As Vector3
)
public:
void Translate(
    Vector3 moveBy
)
member Translate :
        moveBy : Vector3 -> unit

Parameters

moveBy
Type: Vector3
Vector to translate by.
See Also

Reference


Node.UpdateTransformations Method

NodeUpdateTransformations Method
Calc final transformations for current frame. This uses an indicator to know if an update is needed, so no harm is done if you call it multiple times.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected virtual void UpdateTransformations()
Protected Overridable Sub UpdateTransformations
protected:
virtual void UpdateTransformations()
abstract UpdateTransformations : unit -> unit
override UpdateTransformations : unit -> unit
See Also

Reference


Node Fields

Node Fields

The Node type exposes the following members.

Fields
 | Name | Description
Protected field | _childEntities | Child entities under this node.
Protected field | _childNodes | Child nodes under this node.
Protected field | _isDirty | Turns true when the transformations of this node changes.
Protected field | _localTransform | Local transformations matrix, eg the result of the current local transformations.
Protected field | _parent | Parent node.
Protected field | _parentLastTransformVersion | The last transformations version we got from our parent.
Protected field | _rotationOrder | The order in which we apply rotation when building the matrix for this node.
Protected field | _transformations | Node's transformations.
Protected field | _transformationsOrder | The order in which we apply transformations when building the matrix for this node.
Protected field | _transformVersion | This number increment every time we update transformations. We use it to check if our parent's transformations had been changed since last time this node was rendered, and if so, we re-apply parent updated transformations.
Protected field | _worldTransform | World transformations matrix, eg the result of the local transformations multiplied with parent transformations.
Public field | Identifier | Optional identifier we can give to nodes.
Public field | UserData | Optional user data we can attach to nodes.
Top
See Also

Reference


Node._childEntities Field

Node_childEntities Field
Child entities under this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected List<IEntity> _childEntities
Protected _childEntities As List(Of IEntity)
protected:
List<IEntity^>^ _childEntities
val mutable _childEntities: List<IEntity>

Field Value

Type: List IEntity
See Also

Reference


Node._childNodes Field

Node_childNodes Field
Child nodes under this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected List<Node> _childNodes
Protected _childNodes As List(Of Node)
protected:
List<Node^>^ _childNodes
val mutable _childNodes: List<Node>

Field Value

Type: List Node
See Also

Reference


Node._isDirty Field

Node_isDirty Field
Turns true when the transformations of this node changes.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected bool _isDirty
Protected _isDirty As Boolean
protected:
bool _isDirty
val mutable _isDirty: bool

Field Value

Type: Boolean
See Also

Reference


Node._localTransform Field

Node_localTransform Field
Local transformations matrix, eg the result of the current local transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected Matrix _localTransform
Protected _localTransform As Matrix
protected:
Matrix _localTransform
val mutable _localTransform: Matrix

Field Value

Type: Matrix
See Also

Reference


Node._parent Field

Node_parent Field
Parent node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected Node _parent
Protected _parent As Node
protected:
Node^ _parent
val mutable _parent: Node

Field Value

Type: Node
See Also

Reference


Node._parentLastTransformVersion Field

Node_parentLastTransformVersion Field
The last transformations version we got from our parent.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected uint _parentLastTransformVersion
Protected _parentLastTransformVersion As UInteger
protected:
unsigned int _parentLastTransformVersion
val mutable _parentLastTransformVersion: uint32

Field Value

Type: UInt32
See Also

Reference


Node._rotationOrder Field

Node_rotationOrder Field
The order in which we apply rotation when building the matrix for this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected RotationOrder _rotationOrder
Protected _rotationOrder As RotationOrder
protected:
RotationOrder _rotationOrder
val mutable _rotationOrder: RotationOrder

Field Value

Type: RotationOrder
See Also

Reference


Node._transformations Field

Node_transformations Field
Node's transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected Transformations _transformations
Protected _transformations As Transformations
protected:
Transformations^ _transformations
val mutable _transformations: Transformations

Field Value

Type: Transformations
See Also

Reference


Node._transformationsOrder Field

Node_transformationsOrder Field
The order in which we apply transformations when building the matrix for this node.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected TransformOrder _transformationsOrder
Protected _transformationsOrder As TransformOrder
protected:
TransformOrder _transformationsOrder
val mutable _transformationsOrder: TransformOrder

Field Value

Type: TransformOrder
See Also

Reference


Node._transformVersion Field

Node_transformVersion Field
This number increment every time we update transformations. We use it to check if our parent's transformations had been changed since last time this node was rendered, and if so, we re-apply parent updated transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected uint _transformVersion
Protected _transformVersion As UInteger
protected:
unsigned int _transformVersion
val mutable _transformVersion: uint32

Field Value

Type: UInt32
See Also

Reference


Node._worldTransform Field

Node_worldTransform Field
World transformations matrix, eg the result of the local transformations multiplied with parent transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
protected Matrix _worldTransform
Protected _worldTransform As Matrix
protected:
Matrix _worldTransform
val mutable _worldTransform: Matrix

Field Value

Type: Matrix
See Also

Reference


Node.Identifier Field

NodeIdentifier Field
Optional identifier we can give to nodes.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public string Identifier
Public Identifier As String
public:
String^ Identifier
val mutable Identifier: string

Field Value

Type: String
See Also

Reference


Node.UserData Field

NodeUserData Field
Optional user data we can attach to nodes.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Object UserData
Public UserData As Object
public:
Object^ UserData
val mutable UserData: Object

Field Value

Type: Object
See Also

Reference


RotationOrder Enumeration

RotationOrder Enumeration
Different ways to apply rotation (order in which we rotate the different axis).

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public enum RotationOrder
Public Enumeration RotationOrder
public enum class RotationOrder
type RotationOrder
Members
Member name | Value | Description
RotateXYZ | 0 | Rotate by axis order X, Y, Z.
RotateXZY | 1 | Rotate by axis order X, Z, Y.
RotateYXZ | 2 | Rotate by axis order Y, X, Z.
RotateYZX | 3 | Rotate by axis order Y, Z, X.
RotateZXY | 4 | Rotate by axis order Z, X, Y.
RotateZYX | 5 | Rotate by axis order Z, Y, X.
See Also

Reference

MonoGameSceneGraph Namespace


Transformations Class

Transformations Class
Contain all the possible node transformations.
Inheritance Hierarchy
SystemObject
MonoGameSceneGraphTransformations

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public class Transformations
Public Class Transformations
public ref class Transformations
type Transformations =  class end

The Transformations type exposes the following members.

Constructors
 | Name | Description
Public method | Transformations | Create new default transformations.
Public method | Transformations(Transformations) | Clone transformations.
Top
Methods
 | Name | Description
Public method | BuildMatrix | Build and return a matrix from current transformations.
Public method | BuildRotationMatrix | Build and return just the rotation matrix for this treansformations.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
Fields
 | Name | Description
Public field | Position | Node position / translation.
Public field | Rotation | Node rotation.
Public field | Scale | Node scale.
Top
See Also

Reference

MonoGameSceneGraph Namespace


Transformations Constructor

Transformations Constructor
Overload List
 | Name | Description
Public method | Transformations | Create new default transformations.
Public method | Transformations(Transformations) | Clone transformations.
Top
See Also

Reference

Transformations Class


Transformations Constructor

Transformations Constructor
Create new default transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Transformations()
Public Sub New
public:
Transformations()
new : unit -> Transformations
See Also

Reference

Transformations Class
Transformations Overload


Transformations Constructor (Transformations)

Transformations Constructor (Transformations)
Clone transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Transformations(
    Transformations other
)
Public Sub New (
    other As Transformations
)
public:
Transformations(
    Transformations^ other
)
new :
        other : Transformations -> Transformations

Parameters

other
Type: MonoGameSceneGraphTransformations

[Missing <param name="other"/> documentation for "M:MonoGameSceneGraph.Transformations.#ctor(MonoGameSceneGraph.Transformations)"]

See Also

Reference

Transformations Class
Transformations Overload


Transformations Methods

Transformations Methods

The Transformations type exposes the following members.

Methods
 | Name | Description
Public method | BuildMatrix | Build and return a matrix from current transformations.
Public method | BuildRotationMatrix | Build and return just the rotation matrix for this treansformations.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

Transformations Class


Transformations.BuildMatrix Method

TransformationsBuildMatrix Method
Build and return a matrix from current transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Matrix BuildMatrix(
    TransformOrder transformOrder = TransformOrder.ScaleRotationPosition,
    RotationOrder rotationOrder = RotationOrder.RotateYXZ
)
Public Function BuildMatrix (
    Optional transformOrder As TransformOrder = TransformOrder.ScaleRotationPosition,
    Optional rotationOrder As RotationOrder = RotationOrder.RotateYXZ
) As Matrix
public:
Matrix BuildMatrix(
    TransformOrder transformOrder = TransformOrder::ScaleRotationPosition,
    RotationOrder rotationOrder = RotationOrder::RotateYXZ
)
member BuildMatrix :
        ?transformOrder : TransformOrder *
        ?rotationOrder : RotationOrder
(* Defaults:
        let _transformOrder = defaultArg transformOrder TransformOrder.ScaleRotationPosition
        let _rotationOrder = defaultArg rotationOrder RotationOrder.RotateYXZ
*)
-> Matrix

Parameters

transformOrder (Optional)
Type: MonoGameSceneGraphTransformOrder
In which order to apply transformations to produce final matrix.
rotationOrder (Optional)
Type: MonoGameSceneGraphRotationOrder
In which order to apply rotation (axis order) when applying rotation.

Return Value

Type: Matrix
Matrix with all transformations applied.
See Also

Reference

Transformations Class


Transformations.BuildRotationMatrix Method

TransformationsBuildRotationMatrix Method
Build and return just the rotation matrix for this treansformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Matrix BuildRotationMatrix(
    RotationOrder rotationOrder = RotationOrder.RotateYXZ
)
Public Function BuildRotationMatrix (
    Optional rotationOrder As RotationOrder = RotationOrder.RotateYXZ
) As Matrix
public:
Matrix BuildRotationMatrix(
    RotationOrder rotationOrder = RotationOrder::RotateYXZ
)
member BuildRotationMatrix :
        ?rotationOrder : RotationOrder
(* Defaults:
        let _rotationOrder = defaultArg rotationOrder RotationOrder.RotateYXZ
*)
-> Matrix

Parameters

rotationOrder (Optional)
Type: MonoGameSceneGraphRotationOrder
In which order to apply rotation (axis order) when applying rotation.

Return Value

Type: Matrix

[Missing <returns> documentation for "M:MonoGameSceneGraph.Transformations.BuildRotationMatrix(MonoGameSceneGraph.RotationOrder)"]

See Also

Reference

Transformations Class


Transformations Fields

Transformations Fields

The Transformations type exposes the following members.

Fields
 | Name | Description
Public field | Position | Node position / translation.
Public field | Rotation | Node rotation.
Public field | Scale | Node scale.
Top
See Also

Reference

Transformations Class


Transformations.Position Field

TransformationsPosition Field
Node position / translation.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Vector3 Position
Public Position As Vector3
public:
Vector3 Position
val mutable Position: Vector3

Field Value

Type: Vector3
See Also

Reference

Transformations Class


Transformations.Rotation Field

TransformationsRotation Field
Node rotation.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Vector3 Rotation
Public Rotation As Vector3
public:
Vector3 Rotation
val mutable Rotation: Vector3

Field Value

Type: Vector3
See Also

Reference

Transformations Class


Transformations.Scale Field

TransformationsScale Field
Node scale.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public Vector3 Scale
Public Scale As Vector3
public:
Vector3 Scale
val mutable Scale: Vector3

Field Value

Type: Vector3
See Also

Reference

Transformations Class


TransformOrder Enumeration

TransformOrder Enumeration
Different way to build matrix from transformations.

Namespace: MonoGameSceneGraph
Assembly: MonoGameSceneGraph (in MonoGameSceneGraph.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy
public enum TransformOrder
Public Enumeration TransformOrder
public enum class TransformOrder
type TransformOrder
Members
Member name | Value | Description
PositionRotationScale | 0 | Apply position, then rotation, then scale.
PositionScaleRotation | 1 | Apply position, then scale, then rotation.
ScalePositionRotation | 2 | Apply scale, then position, then rotation.
ScaleRotationPosition | 3 | Apply scale, then rotation, then position.
RotationScalePosition | 4 | Apply rotation, then scale, then position.
RotationPositionScale | 5 | Apply rotation, then position, then scale.
See Also

Reference

MonoGameSceneGraph Namespace