Ejemplo n.º 1
0
        internal MyLodMeshMergeHandler(MyClipmap parentClipmap, int lodCount, int lodDivisions, ref MatrixD worldMatrix, ref Vector3D massiveCenter, float massiveRadius, RenderFlags renderFlags)
        {
            Debug.Assert(lodCount <= NUM_DIVISIONS_PER_LOD.Length, "Only " + NUM_DIVISIONS_PER_LOD.Length + " lods allowed, " + lodCount + " requested. Consider adding elements to NUM_DIVISIONS_PER_LOD.");
            Debug.Assert(parentClipmap != null, "Parent clipmap of merge handler cannot be null!");
            m_mergesPerLod = new MyLodMeshMerge[lodCount];

            for (int lodIndex = 0; lodIndex < m_mergesPerLod.Length; ++lodIndex)
            {
                int divisions = NUM_DIVISIONS_PER_LOD[lodIndex];
                m_mergesPerLod[lodIndex] = new MyLodMeshMerge(parentClipmap, lodIndex, divisions, ref worldMatrix, ref massiveCenter, massiveRadius, renderFlags);
                m_dirtyLodMergeIndices.Add(lodIndex);
            }

            m_parentClipmap = parentClipmap;
        }
        internal MyLodMeshMergeHandler(MyClipmap parentClipmap, int lodCount, int lodDivisions, ref MatrixD worldMatrix, ref Vector3D massiveCenter, float massiveRadius, RenderFlags renderFlags)
        {
            if (!MyRenderProxy.Settings.EnableVoxelMerging)
            {
                return;
            }

            m_mergesPerLod = new MyLodMeshMerge[lodCount];

            for (int lodIndex = 0; lodIndex < m_mergesPerLod.Length; ++lodIndex)
            {
                int divisions = NUM_DIVISIONS_PER_LOD[lodIndex];
                m_mergesPerLod[lodIndex] = new MyLodMeshMerge(parentClipmap, lodIndex, divisions, ref worldMatrix, ref massiveCenter, massiveRadius, renderFlags);
                m_dirtyLodMergeIndices.Add(lodIndex);
            }
        }
        internal MyLodMeshMergeHandler(MyClipmap parentClipmap, int lodCount, int lodDivisions, ref MatrixD worldMatrix, ref Vector3D massiveCenter, float massiveRadius, RenderFlags renderFlags)
        {
            if (!MyRenderProxy.Settings.EnableVoxelMerging)
                return;

            m_mergesPerLod = new MyLodMeshMerge[lodCount];

            for(int lodIndex = 0; lodIndex < m_mergesPerLod.Length; ++lodIndex)
            {
                int divisions = NUM_DIVISIONS_PER_LOD[lodIndex];
                m_mergesPerLod[lodIndex] = new MyLodMeshMerge(parentClipmap, lodIndex, divisions, ref worldMatrix, ref massiveCenter, massiveRadius, renderFlags);
                m_dirtyLodMergeIndices.Add(lodIndex);
            }
        }
Ejemplo n.º 4
0
        internal MyLodMeshMergeHandler(MyClipmap parentClipmap, int lodCount, int lodDivisions, ref MatrixD worldMatrix, ref Vector3D massiveCenter, float massiveRadius, RenderFlags renderFlags)
        {
            Debug.Assert(lodCount <= NUM_DIVISIONS_PER_LOD.Length, "Only " + NUM_DIVISIONS_PER_LOD.Length + " lods allowed, " + lodCount + " requested. Consider adding elements to NUM_DIVISIONS_PER_LOD.");
            Debug.Assert(parentClipmap != null, "Parent clipmap of merge handler cannot be null!");
            m_mergesPerLod = new MyLodMeshMerge[lodCount];

            for (int lodIndex = 0; lodIndex < m_mergesPerLod.Length; ++lodIndex)
            {
                int divisions = NUM_DIVISIONS_PER_LOD[lodIndex];
                m_mergesPerLod[lodIndex] = new MyLodMeshMerge(parentClipmap, lodIndex, divisions, ref worldMatrix, ref massiveCenter, massiveRadius, renderFlags);
                m_dirtyLodMergeIndices.Add(lodIndex);
            }

            m_parentClipmap = parentClipmap;
        }