Skip to content

Commit

Permalink
remove unused FbxPivot
Browse files Browse the repository at this point in the history
  • Loading branch information
nkast committed Dec 23, 2024
1 parent eef35c2 commit 2014293
Showing 1 changed file with 0 additions and 100 deletions.
100 changes: 0 additions & 100 deletions src/Xna.Framework.Content.Pipeline.Graphics/OpenAssetImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,106 +102,6 @@ public class OpenAssetImporter : ContentImporter<NodeContent>
// --> Limitation #6: When scale, rotation, or translation is animated, all components
// X, Y, Z need to be key framed.

#region Nested Types
/// <summary>Defines the frame for local scale/rotation/translation of FBX nodes.</summary>
/// <remarks>
/// <para>
/// The transformation pivot defines the frame for local scale/rotation/translation. The
/// local transform of a node is:
/// </para>
/// <para>
/// Local Transform = Translation * RotationOffset * RotationPivot * PreRotation
/// * Rotation * PostRotation * RotationPivotInverse * ScalingOffset
/// * ScalingPivot * Scaling * ScalingPivotInverse
/// </para>
/// <para>
/// where the matrix multiplication order is right-to-left.
/// </para>
/// <para>
/// 3ds max uses three additional transformations:
/// </para>
/// <para>
/// Local Transform = Translation * Rotation * Scaling
/// * GeometricTranslation * GeometricRotation * GeometricScaling
/// </para>
/// <para>
/// Transformation pivots are stored per FBX node. When Assimp hits an FBX node with
/// a transformation pivot it generates additional nodes named
/// </para>
/// <para>
/// <i>OriginalName</i>_$AssimpFbx$_<i>TransformName</i>
/// </para>
/// <para>
/// where <i>TransformName</i> is one of:
/// </para>
/// <para>
/// Translation, RotationOffset, RotationPivot, PreRotation, Rotation, PostRotation,
/// RotationPivotInverse, ScalingOffset, ScalingPivot, Scaling, ScalingPivotInverse,
/// GeometricTranslation, GeometricRotation, GeometricScaling
/// </para>
/// </remarks>
/// <seealso href="http://download.autodesk.com/us/fbx/20112/FBX_SDK_HELP/index.html?url=WS1a9193826455f5ff1f92379812724681e696651.htm,topicNumber=d0e7429"/>
/// <seealso href="http://area.autodesk.com/forum/autodesk-fbx/fbx-sdk/the-makeup-of-the-local-matrix-of-an-kfbxnode/"/>
private class FbxPivot
{
public enum PivotType
{
Invalid,
Translation,
RotationOffset,
RotationPivot,
PreRotation,
Rotation,
PostRotation,
RotationPivotInverse,
ScalingOffset,
ScalingPivot,
Scaling,
ScalingPivotInverse,
GeometricTranslation,
GeometricRotation,
GeometricScaling,
}

public PivotType Type;
public Matrix4x4 Transform;

public static PivotType GetPivotType(string nodeName)
{
if (nodeName.EndsWith("_Translation"))
return PivotType.Translation;
else if (nodeName.EndsWith("_RotationOffset"))
return PivotType.RotationOffset;
else if (nodeName.EndsWith("_RotationPivot"))
return PivotType.RotationPivot;
else if (nodeName.EndsWith("_PreRotation"))
return PivotType.PreRotation;
else if (nodeName.EndsWith("_Rotation"))
return PivotType.Rotation;
else if (nodeName.EndsWith("_PostRotation"))
return PivotType.PostRotation;
else if (nodeName.EndsWith("_RotationPivotInverse"))
return PivotType.RotationPivotInverse;
else if (nodeName.EndsWith("_ScalingOffset"))
return PivotType.ScalingOffset;
else if (nodeName.EndsWith("_ScalingPivot"))
return PivotType.ScalingPivot;
else if (nodeName.EndsWith("_Scaling"))
return PivotType.Scaling;
else if (nodeName.EndsWith("_ScalingPivotInverse"))
return PivotType.ScalingPivotInverse;
else if (nodeName.EndsWith("_GeometricTranslation"))
return PivotType.GeometricTranslation;
else if (nodeName.EndsWith("_GeometricRotation"))
return PivotType.GeometricRotation;
else if (nodeName.EndsWith("_GeometricScaling"))
return PivotType.GeometricScaling;
else
return PivotType.Invalid;
}
}
#endregion

private static readonly List<VectorKey> EmptyVectorKeys = new List<VectorKey>(0);
private static readonly List<QuaternionKey> EmptyQuaternionKeys = new List<QuaternionKey>(0);

Expand Down

0 comments on commit 2014293

Please sign in to comment.