Esempio n. 1
0
        public override Bitmap render(BBox bbox, int width, int height, int elevation)
        {
            MapRenderCL mr       = new MapRenderCL();
            string      regionID = m_scene.RegionInfo.RegionID.ToString();

            try
            {
                bool result = mr.mapRender(regionID,
                                           bbox.MinX, bbox.MinY, 0, bbox.MaxX, bbox.MaxY, (float)elevation,
                                           m_primitiveList.ToArray(), m_primitiveList.Count,
                                           width, height,
                                           MapPath);

                if (result)
                {
                    Bitmap bmp = new Bitmap(MapPath + regionID + ".bmp");
                    bmp.MakeTransparent(Color.FromArgb(0, 0, 0, 0));
                    return(bmp);
                }
                else
                {
                    Bitmap bmp = new Bitmap(width, height);
                    return(bmp);
                }
            }
            catch (Exception e)
            {
                m_log.Error(e.Message + e.StackTrace);
                Bitmap bmp = new Bitmap(width, height);
                return(bmp);
            }
        }
Esempio n. 2
0
        public override Bitmap render(BBox bbox, int width, int height, int elevation)
        {
            LLVector3CL[]        pos = new LLVector3CL[m_volumeCount];
            LLVector3CL[]        sca = new LLVector3CL[m_volumeCount];
            LLQuaternionCL[]     rot = new LLQuaternionCL[m_volumeCount];
            LLVolumeParamsCL[]   vop = new LLVolumeParamsCL[m_volumeCount];
            TextureEntryListCL[] tel = new TextureEntryListCL[m_volumeCount];
            for (int i = 0; i < m_volumeCount; i++)
            {
                pos[i] = m_positions[i];
                sca[i] = m_scales[i];
                rot[i] = m_rotations[i];
                vop[i] = m_volumeParams[i];
                tel[i] = m_textureEntryLists[i];
            }
            MapRenderCL mr       = new MapRenderCL();
            string      regionID = m_scene.RegionInfo.RegionID.ToString();


            mr.mapRender(
                regionID,
                bbox.MinX, bbox.MinY, 0, bbox.MaxX, bbox.MaxY, (float)elevation,
                vop,
                m_volumeCount,
                pos,
                rot,
                sca,
                tel,
                width,
                height,
                "e:\\\\MonoImage\\\\",
                "e:\\\\regionMap\\\\");
            Bitmap bmp = new Bitmap("e:\\\\regionMap\\\\" + regionID + ".bmp");

            bmp.MakeTransparent(Color.FromArgb(0, 0, 0, 0));
            return(bmp);
        }
Esempio n. 3
0
        public override Bitmap render(BBox bbox, int width, int height, int elevation)
        {
            MapRenderCL mr = new MapRenderCL();
            string regionID = m_scene.RegionInfo.RegionID.ToString();
            try
            {
                bool result = mr.mapRender(regionID,
                    bbox.MinX, bbox.MinY, 0, bbox.MaxX, bbox.MaxY, (float)elevation,
                    m_primitiveList.ToArray(), m_primitiveList.Count,
                    width, height,
                    MapPath);

                if (result)
                {
                    Bitmap bmp = new Bitmap(MapPath + regionID + ".bmp");
                    bmp.MakeTransparent(Color.FromArgb(0, 0, 0, 0));
                    return bmp;
                }
                else
                {
                    Bitmap bmp = new Bitmap(width, height);
                    return bmp;
                }
            }
            catch (Exception e)
            {
                m_log.Error(e.Message + e.StackTrace);
                Bitmap bmp = new Bitmap(width, height);
                return bmp;
            }
        }
Esempio n. 4
0
        public override Bitmap render(BBox bbox, int width, int height, int elevation)
        {
            LLVector3CL[] pos = new LLVector3CL[m_volumeCount];
            LLVector3CL[] sca = new LLVector3CL[m_volumeCount];
            LLQuaternionCL[] rot = new LLQuaternionCL[m_volumeCount];
            LLVolumeParamsCL[] vop = new LLVolumeParamsCL[m_volumeCount];
            TextureEntryListCL[] tel = new TextureEntryListCL[m_volumeCount];
            for (int i = 0; i < m_volumeCount; i++)
            {
                pos[i] = m_positions[i];
                sca[i] = m_scales[i];
                rot[i] = m_rotations[i];
                vop[i] = m_volumeParams[i];
                tel[i] = m_textureEntryLists[i];
            }
            MapRenderCL mr = new MapRenderCL();
            string regionID = m_scene.RegionInfo.RegionID.ToString();

            mr.mapRender(
                regionID,
                bbox.MinX, bbox.MinY, 0, bbox.MaxX, bbox.MaxY, (float)elevation,
                vop,
                m_volumeCount,
                pos,
                rot,
                sca,
                tel,
                width,
                height,
                "e:\\\\MonoImage\\\\",
                "e:\\\\regionMap\\\\");
            Bitmap bmp = new Bitmap("e:\\\\regionMap\\\\" + regionID + ".bmp");
            bmp.MakeTransparent(Color.FromArgb(0, 0, 0, 0));
            return bmp;
        }