From eb491d2c3601fc4909370f100a802086a80dc043 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 5 Oct 2010 22:56:20 +0100 Subject: Patch to allow other cam angles. Not complete. Thanks, Antont. --- .../CoreModules/World/Warp3DMap/MapImageModule.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs index 49b4364..dab29d0 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs @@ -112,8 +112,21 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap public Bitmap CreateMapTile() { + Vector3 camPos = new Vector3(127.5f, 127.5f, 221.7025033688163f); + Viewport viewport = new Viewport(camPos, -Vector3.UnitZ, 1024f, 0.1f, (int)Constants.RegionSize, (int)Constants.RegionSize, (float)Constants.RegionSize, (float)Constants.RegionSize); + return CreateMapTile(viewport); + } + + public Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height) + { + Viewport viewport = new Viewport(camPos, camDir, fov, (float)Constants.RegionSize, 0.1f, width, height); + return CreateMapTile(viewport); + } + + public Bitmap CreateMapTile(Viewport viewport) + { bool drawPrimVolume = true; - bool textureTerrain = true; + bool textureTerrain = false; //true; try { @@ -128,9 +141,6 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap m_colors.Clear(); - Vector3 camPos = new Vector3(127.5f, 127.5f, 221.7025033688163f); - Viewport viewport = new Viewport(camPos, -Vector3.UnitZ, 1024f, 0.1f, (int)Constants.RegionSize, (int)Constants.RegionSize, (float)Constants.RegionSize, (float)Constants.RegionSize); - int width = viewport.Width; int height = viewport.Height; -- cgit v1.1 From b424af61878e28df9b627f3f12ac8916743e1760 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 5 Oct 2010 23:06:29 +0100 Subject: Revert an accidental default value change --- OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs index dab29d0..803a33a 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs @@ -126,7 +126,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap public Bitmap CreateMapTile(Viewport viewport) { bool drawPrimVolume = true; - bool textureTerrain = false; //true; + bool textureTerrain = true; try { -- cgit v1.1 From 5d613231920dd513dfa8c5328c7ce1bfd59a359b Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 5 Oct 2010 23:49:21 +0100 Subject: Add the view generating method to the image generator interface --- OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs | 5 +++++ OpenSim/Region/Framework/Interfaces/ITerrain.cs | 2 ++ 2 files changed, 7 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs index 9e6e366..8408bf9 100644 --- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs @@ -545,5 +545,10 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap return returnpt; } + + public Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height) + { + return null; + } } } diff --git a/OpenSim/Region/Framework/Interfaces/ITerrain.cs b/OpenSim/Region/Framework/Interfaces/ITerrain.cs index 8aacb35..38cf020 100644 --- a/OpenSim/Region/Framework/Interfaces/ITerrain.cs +++ b/OpenSim/Region/Framework/Interfaces/ITerrain.cs @@ -26,6 +26,7 @@ */ using OpenSim.Framework; +using OpenMetaverse; namespace OpenSim.Region.Framework.Interfaces { @@ -74,6 +75,7 @@ namespace OpenSim.Region.Framework.Interfaces public interface IMapImageGenerator { System.Drawing.Bitmap CreateMapTile(); + System.Drawing.Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height); byte[] WriteJpeg2000Image(); } } -- cgit v1.1