BEPUutilities.RigidTransform.Transform C# (CSharp) Метод

Transform() публичный статический Метод

Transforms a rigid transform by another rigid transform.
public static Transform ( RigidTransform &a, RigidTransform &b, RigidTransform &combined ) : void
a RigidTransform The first, "local" rigid transform.
b RigidTransform The second, "world" rigid transform.
combined RigidTransform Combined rigid transform.
Результат void
        public static void Transform(ref RigidTransform a, ref RigidTransform b, out RigidTransform combined)
        {
            Vector3 intermediate;
            Vector3.Transform(ref a.Position, ref b.Orientation, out intermediate);
            Vector3.Add(ref intermediate, ref b.Position, out combined.Position);
            Quaternion.Concatenate(ref a.Orientation, ref b.Orientation, out combined.Orientation);

        }
        ///<summary>

Same methods

RigidTransform::Transform ( Vector3 &position, RigidTransform &transform, Vector3 &result ) : void

Usage Example

Пример #1
0
        ///<summary>
        /// Gets the closest points between the shapes.
        ///</summary>
        ///<param name="shapeA">First shape of the pair.</param>
        ///<param name="shapeB">Second shape of the pair.</param>
        ///<param name="transformA">Transform to apply to the first shape.</param>
        ///<param name="transformB">Transform to apply to the second shape.</param>
        /// <param name="cachedSimplex">Simplex from a previous updated used to warmstart the current attempt.  Updated after each run.</param>
        ///<param name="closestPointA">Closest point on the first shape to the second shape.</param>
        ///<param name="closestPointB">Closest point on the second shape to the first shape.</param>
        ///<returns>Whether or not the objects were intersecting.  If they are intersecting, then the closest points cannot be identified.</returns>
        public static bool GetClosestPoints(ConvexShape shapeA, ConvexShape shapeB, ref RigidTransform transformA, ref RigidTransform transformB,
                                            ref CachedSimplex cachedSimplex, out System.Numerics.Vector3 closestPointA, out System.Numerics.Vector3 closestPointB)
        {
            RigidTransform localtransformB;

            MinkowskiToolbox.GetLocalTransform(ref transformA, ref transformB, out localtransformB);

            bool toReturn = GetClosestPoints(shapeA, shapeB, ref localtransformB, ref cachedSimplex, out closestPointA, out closestPointB);

            RigidTransform.Transform(ref closestPointA, ref transformA, out closestPointA);
            RigidTransform.Transform(ref closestPointB, ref transformA, out closestPointB);
            return(toReturn);
        }
All Usage Examples Of BEPUutilities.RigidTransform::Transform