public override void Close()
 {
     base.Close();
     ClipmapId = uint.MaxValue;
     AtmosphereWaveLenghts = null;
     PrunningFunc = null;
 }
 public override void Close()
 {
     base.Close();
     ClipmapId             = uint.MaxValue;
     AtmosphereWaveLenghts = null;
     PrunningFunc          = null;
 }
        internal MyClipmapHandler(uint id, MyClipmapScaleEnum scaleGroup, MatrixD worldMatrix, Vector3I sizeLod0, Vector3D massiveCenter, float massiveRadius, bool spherize, RenderFlags additionalFlags, VRage.Voxels.MyClipmap.PruningFunc prunningFunc)
        {
            m_clipmapBase   = new MyClipmap(id, scaleGroup, worldMatrix, sizeLod0, this, massiveCenter, massiveRadius, prunningFunc);
            m_massiveCenter = massiveCenter;
            m_renderFlags   = additionalFlags;
            m_mergeHandler  = null;

            if (spherize)
            {
                m_massiveRadius = massiveRadius;
            }

            if (MyLodMeshMergeHandler.ShouldAllocate(m_mergeHandler))
            {
                m_mergeHandler = AllocateMergeHandler();
            }

            MyClipmap.AddToUpdate(MyEnvironment.CameraPosition, Base);
        }
示例#4
0
        internal MyClipmapHandler(uint id, MyClipmapScaleEnum scaleGroup, MatrixD worldMatrix, Vector3I sizeLod0, Vector3D massiveCenter, float massiveRadius, bool spherize, RenderFlags additionalFlags, VRage.Voxels.MyClipmap.PruningFunc prunningFunc)
        {
            m_clipmapBase   = new MyClipmap(id, scaleGroup, worldMatrix, sizeLod0, this, massiveCenter, massiveRadius, prunningFunc);
            m_massiveCenter = massiveCenter;
            m_renderFlags   = additionalFlags;

            if (spherize)
            {
                m_massiveRadius = massiveRadius;
            }

            const int mergeLodSubdivideCount = 3;

            m_mergeHandler = new MyLodMeshMergeHandler(Base, MyCellCoord.MAX_LOD_COUNT, mergeLodSubdivideCount, ref worldMatrix, ref massiveCenter, massiveRadius, m_renderFlags);

            MyClipmap.AddToUpdate(MyEnvironment.CameraPosition, Base);
        }