Beispiel #1
0
        /**
         * Accumulates another transform with this one
         *
         * Rotation is accumulated multiplicatively (Rotation = SourceAtom.Rotation * Rotation)
         * Translation is accumulated additively (Translation += SourceAtom.Translation)
         * Scale3D is accumulated additively (Scale3D += SourceAtom.Scale3D)
         *
         * @param SourceAtom The other transform to accumulate into this one
         */
        public void AccumulateWithAdditiveScale3D(FTransform SourceAtom)
        {
            if (FMath.Square(SourceAtom.Rotation.W) < 1.0f - Const.DELTA * Const.DELTA)
            {
                Rotation = SourceAtom.Rotation * Rotation;
            }

            Translation += SourceAtom.Translation;
            Scale3D     += SourceAtom.Scale3D;

            DiagnosticCheckNaN_All();
        }
Beispiel #2
0
        /** Accumulates another transform with this one, with a blending weight
         *
         * Let SourceAtom = Atom * BlendWeight
         * Rotation is accumulated multiplicatively (Rotation = SourceAtom.Rotation * Rotation).
         * Translation is accumulated additively (Translation += SourceAtom.Translation)
         * Scale3D is accumulated multiplicatively (Scale3D *= SourceAtom.Scale3D)
         *
         * Note: Rotation will not be normalized! Will have to be done manually.
         *
         * @param Atom The other transform to accumulate into this one
         * @param BlendWeight The weight to multiply Atom by before it is accumulated.
         */
        public void Accumulate(FTransform Atom, float BlendWeight)
        {
            FTransform SourceAtom = Atom * BlendWeight;

            // Add ref pose relative animation to base animation, only if rotation is significant.
            if (FMath.Square(SourceAtom.Rotation.W) < 1.0f - Const.DELTA * Const.DELTA)
            {
                Rotation = SourceAtom.Rotation * Rotation;
            }

            Translation += SourceAtom.Translation;
            Scale3D     *= SourceAtom.Scale3D;

            DiagnosticCheckNaN_All();
        }
Beispiel #3
0
        /**
         * Accumulates another transform with this one
         *
         * Rotation is accumulated multiplicatively (Rotation = SourceAtom.Rotation * Rotation)
         * Translation is accumulated additively (Translation += SourceAtom.Translation)
         * Scale3D is accumulated multiplicatively (Scale3D *= SourceAtom.Scale3D)
         *
         * @param SourceAtom The other transform to accumulate into this one
         */
        public void Accumulate(FTransform SourceAtom)
        {
            // Add ref pose relative animation to base animation, only if rotation is significant.
            if (FMath.Square(SourceAtom.Rotation.W) < 1.0f - Const.DELTA * Const.DELTA)
            {
                Rotation = SourceAtom.Rotation * Rotation;
            }

            Translation += SourceAtom.Translation;
            Scale3D     *= SourceAtom.Scale3D;

            DiagnosticCheckNaN_All();

            //checkSlow( IsRotationNormalized() );
        }