BEPUphysics.PhysicsResources.GiveBack C# (CSharp) Method

GiveBack() public static method

Returns a resource to the pool.
public static GiveBack ( RawList triangleIndices ) : void
triangleIndices RawList TriangleIndices list to return.
return void
        public static void GiveBack(RawList<TriangleMeshConvexContactManifold.TriangleIndices> triangleIndices)
        {
            triangleIndices.Clear();
            SubPoolTriangleIndicesList.GiveBack(triangleIndices);
        }

Same methods

PhysicsResources::GiveBack ( RawList list ) : void
PhysicsResources::GiveBack ( RawList list ) : void
PhysicsResources::GiveBack ( RawList list ) : void
PhysicsResources::GiveBack ( RawList list ) : void
PhysicsResources::GiveBack ( RawList list ) : void
PhysicsResources::GiveBack ( BEPUphysics.DeactivationManagement.SimulationIslandConnection connection ) : void
PhysicsResources::GiveBack ( TriangleCollidable triangle ) : void
PhysicsResources::GiveBack ( TriangleShape triangle ) : void

Usage Example

示例#1
0
        /// <summary>
        /// <para>Casts a convex shape against the space.</para>
        /// <para>Convex casts are sensitive to length; avoid extremely long convex casts for better stability and performance.</para>
        /// </summary>
        /// <param name="castShape">Shape to cast.</param>
        /// <param name="startingTransform">Initial transform of the shape.</param>
        /// <param name="sweep">Sweep to apply to the shape. Avoid extremely long convex casts for better stability and performance.</param>
        /// <param name="filter">Delegate to prune out hit candidates before performing a cast against them. Return true from the filter to process an entry or false to ignore the entry.</param>
        /// <param name="castResult">Hit data, if any.</param>
        /// <returns>Whether or not the cast hit anything.</returns>
        public bool ConvexCast(ConvexShape castShape, ref RigidTransform startingTransform, ref Vector3 sweep, Func <BroadPhaseEntry, bool> filter, out RayCastResult castResult)
        {
            var  castResults = PhysicsResources.GetRayCastResultList();
            bool didHit      = ConvexCast(castShape, ref startingTransform, ref sweep, filter, castResults);

            castResult = castResults.Elements[0];
            for (int i = 1; i < castResults.Count; i++)
            {
                RayCastResult candidate = castResults.Elements[i];
                if (candidate.HitData.T < castResult.HitData.T)
                {
                    castResult = candidate;
                }
            }
            PhysicsResources.GiveBack(castResults);
            return(didHit);
        }
All Usage Examples Of BEPUphysics.PhysicsResources::GiveBack