MeshHelper.TransformScene Method

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)

Syntax

public static void TransformScene (
         NodeContent scene,
         Matrix transform
)

Parameters

  • scene
    Scene hierarchy being transformed.
  • transform
    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)).

See Also

Reference

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

Platforms

Windows XP SP2, Windows Vista