MeshHelper.TransformScene Method

Note

This method is available only when developing for Windows.

Applies a transformation to the contents of a scene hierarchy.

Syntax

'Declaration
Public Shared Sub TransformScene ( _
         scene As NodeContent, _
         transform As Matrix _
)
public static void TransformScene (
         NodeContent scene,
         Matrix transform
)
public:
static void TransformScene(
         NodeContent scene,
         Matrix transform
)

Parameters

  • scene
    Type: NodeContent
    Scene hierarchy being transformed.
  • transform
    Type: Matrix
    Matrix used in the transformation

Remarks

The resulting world space positions are similar to the results obtained from applying the specified transform to the Transform property of the scene object. However, this method performs the transformation by cascading down through the scene hierarchy and modifying the actual underlying vertex positions. This does not introduce unwanted artifacts into the node transforms. For instance, this method can be used to mirror a scene without leaving mirroring in the transform matrices.

Typically, you would convert a scene from a left-handed to a right-handed coordinate system and then transform it with the following matrix ((1, 0, 0), (0, 1, 0), (0, 0, −1)).

Requirements

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics

Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

See Also

Reference

MeshHelper Class
MeshHelper Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace

Platforms

Windows 7, Windows Vista, Windows XP