Export (0) Print
Expand All

MeshHelper.TransformScene Method

Bb199525.note(en-us,XNAGameStudio.41).gifNote
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
)

Parameters

scene
Type: NodeContent
Scene hierarchy being transformed.
transform
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

ADD
Show:
© 2015 Microsoft