Universe.Physics.BulletSPlugin.BSAPITemplate.Shutdown C# (CSharp) Method

Shutdown() public abstract method

public abstract Shutdown ( BulletWorld sim ) : void
sim BulletWorld
return void
        public abstract void Shutdown(BulletWorld sim);

Usage Example

Example #1
0
        public override void Dispose()
        {
            // MainConsole.Instance.DebugFormat("{0}: Dispose()", LogHeader);

            // make sure no stepping happens while we're deleting stuff
            m_initialized = false;

            foreach (KeyValuePair <uint, BSPhysObject> kvp in PhysObjects)
            {
                kvp.Value.Destroy();
            }
            PhysObjects.Clear();

            // Now that the prims are all cleaned up, there should be no constraints left
            if (Constraints != null)
            {
                Constraints.Dispose();
                Constraints = null;
            }

            if (Shapes != null)
            {
                Shapes.Dispose();
                Shapes = null;
            }

            if (TerrainManager != null)
            {
                TerrainManager.ReleaseGroundPlaneAndTerrain();
                TerrainManager.Dispose();
                TerrainManager = null;
            }

            // Anything left in the unmanaged code should be cleaned out
            PE.Shutdown(World);
        }
BSAPITemplate