Exemplo n.º 1
0
        internal override void Write(ResourceWriter writer)
        {
            switch (Type)
            {
            case KeyframeType.NodePR:
            case KeyframeType.NodePRS:
                writer.WriteVector3(Position);
                writer.WriteQuaternion(Rotation);
                if (Type == KeyframeType.NodePRS)
                {
                    writer.WriteVector3(Scale);
                }
                break;

            case KeyframeType.NodePRHalf:
            case KeyframeType.NodePRSHalf:
            case KeyframeType.NodePRHalf_2:
                writer.WriteVector3Half(Position);
                writer.WriteQuaternionHalf(Rotation);
                if (Type == KeyframeType.NodePRSHalf)
                {
                    writer.WriteVector3Half(Scale);
                }
                break;

            case KeyframeType.NodePHalf:
                writer.WriteVector3Half(Position);
                break;

            case KeyframeType.NodeRHalf:
                writer.WriteQuaternionHalf(Rotation);
                break;

            case KeyframeType.NodeSHalf:
                writer.WriteVector3Half(Scale);
                break;

            default:
                throw new InvalidOperationException(nameof(Type));
            }
        }
Exemplo n.º 2
0
 internal override void Write(ResourceWriter writer)
 {
     writer.WriteVector3Half(Position);
 }