MeshHelper.TransformScene Method

This method is available only when developing for Windows.
Applies a transformation to the contents of a scene hierarchy.

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

public static void TransformScene (
         NodeContent scene,
         Matrix transform


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

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)).

Windows 7, Windows Vista, Windows XP

Community Additions