Initial windlight codebase commit
parent
2e6dce434f
commit
29a740ec8c
|
@ -902,7 +902,7 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
// Need to translate to MXP somehow
|
// Need to translate to MXP somehow
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGenericMessage(string method, List<string> message)
|
public void SendGenericMessage(string method, List<byte[]> message)
|
||||||
{
|
{
|
||||||
// Need to translate to MXP somehow
|
// Need to translate to MXP somehow
|
||||||
}
|
}
|
||||||
|
|
|
@ -483,7 +483,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGenericMessage(string method, List<string> message)
|
public void SendGenericMessage(string method, List<byte[]> message)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
|
@ -671,7 +671,12 @@ VALUES
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
|
||||||
|
{
|
||||||
|
//This connector doesn't support the windlight module yet
|
||||||
|
//Return default LL windlight settings
|
||||||
|
return new RegionMeta7WindlightData();
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads the settings of a region.
|
/// Loads the settings of a region.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -696,7 +701,7 @@ VALUES
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//If comes here then there is now region setting for that region
|
//If we reach this point then there are new region settings for that region
|
||||||
regionSettings = new RegionSettings();
|
regionSettings = new RegionSettings();
|
||||||
regionSettings.RegionUUID = regionUUID;
|
regionSettings.RegionUUID = regionUUID;
|
||||||
regionSettings.OnSave += StoreRegionSettings;
|
regionSettings.OnSave += StoreRegionSettings;
|
||||||
|
|
|
@ -691,6 +691,97 @@ namespace OpenSim.Data.MySQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
|
||||||
|
{
|
||||||
|
RegionMeta7WindlightData nWP = new RegionMeta7WindlightData();
|
||||||
|
nWP.OnSave += StoreRegionWindlightSettings;
|
||||||
|
lock (m_Connection)
|
||||||
|
{
|
||||||
|
|
||||||
|
string command = "select * from `regionwindlight` where region_id = ?regionID";
|
||||||
|
|
||||||
|
MySqlCommand cmd = new MySqlCommand(command);
|
||||||
|
|
||||||
|
cmd.Parameters.AddWithValue("?regionID", regionUUID.ToString());
|
||||||
|
|
||||||
|
IDataReader result = ExecuteReader(cmd);
|
||||||
|
if (!result.Read())
|
||||||
|
{
|
||||||
|
//No result, so store our default windlight profile and return it
|
||||||
|
nWP.regionID = regionUUID;
|
||||||
|
StoreRegionWindlightSettings(nWP);
|
||||||
|
return nWP;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UUID.TryParse(result["region_id"].ToString(), out nWP.regionID);
|
||||||
|
nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]);
|
||||||
|
nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]);
|
||||||
|
nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]);
|
||||||
|
nWP.waterFogDensityExponent = Convert.ToSingle(result["water_fog_density_exponent"]);
|
||||||
|
nWP.underwaterFogModifier = Convert.ToSingle(result["underwater_fog_modifier"]);
|
||||||
|
nWP.reflectionWaveletScale.X = Convert.ToSingle(result["reflection_wavelet_scale_1"]);
|
||||||
|
nWP.reflectionWaveletScale.Y = Convert.ToSingle(result["reflection_wavelet_scale_2"]);
|
||||||
|
nWP.reflectionWaveletScale.Z = Convert.ToSingle(result["reflection_wavelet_scale_3"]);
|
||||||
|
nWP.fresnelScale = Convert.ToSingle(result["fresnel_scale"]);
|
||||||
|
nWP.fresnelOffset = Convert.ToSingle(result["fresnel_offset"]);
|
||||||
|
nWP.refractScaleAbove = Convert.ToSingle(result["refract_scale_above"]);
|
||||||
|
nWP.refractScaleBelow = Convert.ToSingle(result["refract_scale_below"]);
|
||||||
|
nWP.blurMultiplier = Convert.ToSingle(result["blur_multiplier"]);
|
||||||
|
nWP.bigWaveDirection.X = Convert.ToSingle(result["big_wave_direction_x"]);
|
||||||
|
nWP.bigWaveDirection.Y = Convert.ToSingle(result["big_wave_direction_y"]);
|
||||||
|
nWP.littleWaveDirection.X = Convert.ToSingle(result["little_wave_direction_x"]);
|
||||||
|
nWP.littleWaveDirection.Y = Convert.ToSingle(result["little_wave_direction_y"]);
|
||||||
|
UUID.TryParse(result["normal_map_texture"].ToString(), out nWP.normalMapTexture);
|
||||||
|
nWP.horizon.X = Convert.ToSingle(result["horizon_r"]);
|
||||||
|
nWP.horizon.Y = Convert.ToSingle(result["horizon_g"]);
|
||||||
|
nWP.horizon.Z = Convert.ToSingle(result["horizon_b"]);
|
||||||
|
nWP.horizon.W = Convert.ToSingle(result["horizon_i"]);
|
||||||
|
nWP.hazeHorizon = Convert.ToSingle(result["haze_horizon"]);
|
||||||
|
nWP.blueDensity.X = Convert.ToSingle(result["blue_density_r"]);
|
||||||
|
nWP.blueDensity.Y = Convert.ToSingle(result["blue_density_g"]);
|
||||||
|
nWP.blueDensity.Z = Convert.ToSingle(result["blue_density_b"]);
|
||||||
|
nWP.blueDensity.W = Convert.ToSingle(result["blue_density_i"]);
|
||||||
|
nWP.hazeDensity = Convert.ToSingle(result["haze_density"]);
|
||||||
|
nWP.densityMultiplier = Convert.ToSingle(result["density_multiplier"]);
|
||||||
|
nWP.distanceMultiplier = Convert.ToSingle(result["distance_multiplier"]);
|
||||||
|
nWP.maxAltitude = Convert.ToUInt16(result["max_altitude"]);
|
||||||
|
nWP.sunMoonColor.X = Convert.ToSingle(result["sun_moon_color_r"]);
|
||||||
|
nWP.sunMoonColor.Y = Convert.ToSingle(result["sun_moon_color_g"]);
|
||||||
|
nWP.sunMoonColor.Z = Convert.ToSingle(result["sun_moon_color_b"]);
|
||||||
|
nWP.sunMoonColor.W = Convert.ToSingle(result["sun_moon_color_i"]);
|
||||||
|
nWP.sunMoonPosition = Convert.ToSingle(result["sun_moon_position"]);
|
||||||
|
nWP.ambient.X = Convert.ToSingle(result["ambient_r"]);
|
||||||
|
nWP.ambient.Y = Convert.ToSingle(result["ambient_g"]);
|
||||||
|
nWP.ambient.Z = Convert.ToSingle(result["ambient_b"]);
|
||||||
|
nWP.ambient.W = Convert.ToSingle(result["ambient_i"]);
|
||||||
|
nWP.eastAngle = Convert.ToSingle(result["east_angle"]);
|
||||||
|
nWP.sunGlowFocus = Convert.ToSingle(result["sun_glow_focus"]);
|
||||||
|
nWP.sunGlowSize = Convert.ToSingle(result["sun_glow_size"]);
|
||||||
|
nWP.sceneGamma = Convert.ToSingle(result["scene_gamma"]);
|
||||||
|
nWP.starBrightness = Convert.ToSingle(result["star_brightness"]);
|
||||||
|
nWP.cloudColor.X = Convert.ToSingle(result["cloud_color_r"]);
|
||||||
|
nWP.cloudColor.Y = Convert.ToSingle(result["cloud_color_g"]);
|
||||||
|
nWP.cloudColor.Z = Convert.ToSingle(result["cloud_color_b"]);
|
||||||
|
nWP.cloudColor.W = Convert.ToSingle(result["cloud_color_i"]);
|
||||||
|
nWP.cloudXYDensity.X = Convert.ToSingle(result["cloud_x"]);
|
||||||
|
nWP.cloudXYDensity.Y = Convert.ToSingle(result["cloud_y"]);
|
||||||
|
nWP.cloudXYDensity.Z = Convert.ToSingle(result["cloud_density"]);
|
||||||
|
nWP.cloudCoverage = Convert.ToSingle(result["cloud_coverage"]);
|
||||||
|
nWP.cloudScale = Convert.ToSingle(result["cloud_scale"]);
|
||||||
|
nWP.cloudDetailXYDensity.X = Convert.ToSingle(result["cloud_detail_x"]);
|
||||||
|
nWP.cloudDetailXYDensity.Y = Convert.ToSingle(result["cloud_detail_y"]);
|
||||||
|
nWP.cloudDetailXYDensity.Z = Convert.ToSingle(result["cloud_detail_density"]);
|
||||||
|
nWP.cloudScrollX = Convert.ToSingle(result["cloud_scroll_x"]);
|
||||||
|
nWP.cloudScrollXLock = Convert.ToBoolean(result["cloud_scroll_x_lock"]);
|
||||||
|
nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
|
||||||
|
nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
|
||||||
|
nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nWP;
|
||||||
|
}
|
||||||
|
|
||||||
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
||||||
{
|
{
|
||||||
RegionSettings rs = null;
|
RegionSettings rs = null;
|
||||||
|
@ -724,6 +815,107 @@ namespace OpenSim.Data.MySQL
|
||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void StoreRegionWindlightSettings(RegionMeta7WindlightData wl)
|
||||||
|
{
|
||||||
|
lock (m_Connection)
|
||||||
|
{
|
||||||
|
using (MySqlCommand cmd = m_Connection.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.CommandText = "REPLACE INTO `regionwindlight` (`region_id`, `water_color_r`, `water_color_g`, ";
|
||||||
|
cmd.CommandText += "`water_color_b`, `water_fog_density_exponent`, `underwater_fog_modifier`, ";
|
||||||
|
cmd.CommandText += "`reflection_wavelet_scale_1`, `reflection_wavelet_scale_2`, `reflection_wavelet_scale_3`, ";
|
||||||
|
cmd.CommandText += "`fresnel_scale`, `fresnel_offset`, `refract_scale_above`, `refract_scale_below`, ";
|
||||||
|
cmd.CommandText += "`blur_multiplier`, `big_wave_direction_x`, `big_wave_direction_y`, `little_wave_direction_x`, ";
|
||||||
|
cmd.CommandText += "`little_wave_direction_y`, `normal_map_texture`, `horizon_r`, `horizon_g`, `horizon_b`, ";
|
||||||
|
cmd.CommandText += "`horizon_i`, `haze_horizon`, `blue_density_r`, `blue_density_g`, `blue_density_b`, ";
|
||||||
|
cmd.CommandText += "`blue_density_i`, `haze_density`, `density_multiplier`, `distance_multiplier`, `max_altitude`, ";
|
||||||
|
cmd.CommandText += "`sun_moon_color_r`, `sun_moon_color_g`, `sun_moon_color_b`, `sun_moon_color_i`, `sun_moon_position`, ";
|
||||||
|
cmd.CommandText += "`ambient_r`, `ambient_g`, `ambient_b`, `ambient_i`, `east_angle`, `sun_glow_focus`, `sun_glow_size`, ";
|
||||||
|
cmd.CommandText += "`scene_gamma`, `star_brightness`, `cloud_color_r`, `cloud_color_g`, `cloud_color_b`, `cloud_color_i`, ";
|
||||||
|
cmd.CommandText += "`cloud_x`, `cloud_y`, `cloud_density`, `cloud_coverage`, `cloud_scale`, `cloud_detail_x`, ";
|
||||||
|
cmd.CommandText += "`cloud_detail_y`, `cloud_detail_density`, `cloud_scroll_x`, `cloud_scroll_x_lock`, `cloud_scroll_y`, ";
|
||||||
|
cmd.CommandText += "`cloud_scroll_y_lock`, `draw_classic_clouds`) VALUES (?region_id, ?water_color_r, ";
|
||||||
|
cmd.CommandText += "?water_color_g, ?water_color_b, ?water_fog_density_exponent, ?underwater_fog_modifier, ?reflection_wavelet_scale_1, ";
|
||||||
|
cmd.CommandText += "?reflection_wavelet_scale_2, ?reflection_wavelet_scale_3, ?fresnel_scale, ?fresnel_offset, ?refract_scale_above, ";
|
||||||
|
cmd.CommandText += "?refract_scale_below, ?blur_multiplier, ?big_wave_direction_x, ?big_wave_direction_y, ?little_wave_direction_x, ";
|
||||||
|
cmd.CommandText += "?little_wave_direction_y, ?normal_map_texture, ?horizon_r, ?horizon_g, ?horizon_b, ?horizon_i, ?haze_horizon, ";
|
||||||
|
cmd.CommandText += "?blue_density_r, ?blue_density_g, ?blue_density_b, ?blue_density_i, ?haze_density, ?density_multiplier, ";
|
||||||
|
cmd.CommandText += "?distance_multiplier, ?max_altitude, ?sun_moon_color_r, ?sun_moon_color_g, ?sun_moon_color_b, ";
|
||||||
|
cmd.CommandText += "?sun_moon_color_i, ?sun_moon_position, ?ambient_r, ?ambient_g, ?ambient_b, ?ambient_i, ?east_angle, ";
|
||||||
|
cmd.CommandText += "?sun_glow_focus, ?sun_glow_size, ?scene_gamma, ?star_brightness, ?cloud_color_r, ?cloud_color_g, ";
|
||||||
|
cmd.CommandText += "?cloud_color_b, ?cloud_color_i, ?cloud_x, ?cloud_y, ?cloud_density, ?cloud_coverage, ?cloud_scale, ";
|
||||||
|
cmd.CommandText += "?cloud_detail_x, ?cloud_detail_y, ?cloud_detail_density, ?cloud_scroll_x, ?cloud_scroll_x_lock, ";
|
||||||
|
cmd.CommandText += "?cloud_scroll_y, ?cloud_scroll_y_lock, ?draw_classic_clouds)";
|
||||||
|
|
||||||
|
cmd.Parameters.AddWithValue("region_id", wl.regionID);
|
||||||
|
cmd.Parameters.AddWithValue("water_color_r", wl.waterColor.X);
|
||||||
|
cmd.Parameters.AddWithValue("water_color_g", wl.waterColor.Y);
|
||||||
|
cmd.Parameters.AddWithValue("water_color_b", wl.waterColor.Z);
|
||||||
|
cmd.Parameters.AddWithValue("water_fog_density_exponent", wl.waterFogDensityExponent);
|
||||||
|
cmd.Parameters.AddWithValue("underwater_fog_modifier", wl.underwaterFogModifier);
|
||||||
|
cmd.Parameters.AddWithValue("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X);
|
||||||
|
cmd.Parameters.AddWithValue("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y);
|
||||||
|
cmd.Parameters.AddWithValue("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z);
|
||||||
|
cmd.Parameters.AddWithValue("fresnel_scale", wl.fresnelScale);
|
||||||
|
cmd.Parameters.AddWithValue("fresnel_offset", wl.fresnelOffset);
|
||||||
|
cmd.Parameters.AddWithValue("refract_scale_above", wl.refractScaleAbove);
|
||||||
|
cmd.Parameters.AddWithValue("refract_scale_below", wl.refractScaleBelow);
|
||||||
|
cmd.Parameters.AddWithValue("blur_multiplier", wl.blurMultiplier);
|
||||||
|
cmd.Parameters.AddWithValue("big_wave_direction_x", wl.bigWaveDirection.X);
|
||||||
|
cmd.Parameters.AddWithValue("big_wave_direction_y", wl.bigWaveDirection.Y);
|
||||||
|
cmd.Parameters.AddWithValue("little_wave_direction_x", wl.littleWaveDirection.X);
|
||||||
|
cmd.Parameters.AddWithValue("little_wave_direction_y", wl.littleWaveDirection.Y);
|
||||||
|
cmd.Parameters.AddWithValue("normal_map_texture", wl.normalMapTexture);
|
||||||
|
cmd.Parameters.AddWithValue("horizon_r", wl.horizon.X);
|
||||||
|
cmd.Parameters.AddWithValue("horizon_g", wl.horizon.Y);
|
||||||
|
cmd.Parameters.AddWithValue("horizon_b", wl.horizon.Z);
|
||||||
|
cmd.Parameters.AddWithValue("horizon_i", wl.horizon.W);
|
||||||
|
cmd.Parameters.AddWithValue("haze_horizon", wl.hazeHorizon);
|
||||||
|
cmd.Parameters.AddWithValue("blue_density_r", wl.blueDensity.X);
|
||||||
|
cmd.Parameters.AddWithValue("blue_density_g", wl.blueDensity.Y);
|
||||||
|
cmd.Parameters.AddWithValue("blue_density_b", wl.blueDensity.Z);
|
||||||
|
cmd.Parameters.AddWithValue("blue_density_i", wl.blueDensity.W);
|
||||||
|
cmd.Parameters.AddWithValue("haze_density", wl.hazeDensity);
|
||||||
|
cmd.Parameters.AddWithValue("density_multiplier", wl.densityMultiplier);
|
||||||
|
cmd.Parameters.AddWithValue("distance_multiplier", wl.distanceMultiplier);
|
||||||
|
cmd.Parameters.AddWithValue("max_altitude", wl.maxAltitude);
|
||||||
|
cmd.Parameters.AddWithValue("sun_moon_color_r", wl.sunMoonColor.X);
|
||||||
|
cmd.Parameters.AddWithValue("sun_moon_color_g", wl.sunMoonColor.Y);
|
||||||
|
cmd.Parameters.AddWithValue("sun_moon_color_b", wl.sunMoonColor.Z);
|
||||||
|
cmd.Parameters.AddWithValue("sun_moon_color_i", wl.sunMoonColor.W);
|
||||||
|
cmd.Parameters.AddWithValue("sun_moon_position", wl.sunMoonPosition);
|
||||||
|
cmd.Parameters.AddWithValue("ambient_r", wl.ambient.X);
|
||||||
|
cmd.Parameters.AddWithValue("ambient_g", wl.ambient.Y);
|
||||||
|
cmd.Parameters.AddWithValue("ambient_b", wl.ambient.Z);
|
||||||
|
cmd.Parameters.AddWithValue("ambient_i", wl.ambient.W);
|
||||||
|
cmd.Parameters.AddWithValue("east_angle", wl.eastAngle);
|
||||||
|
cmd.Parameters.AddWithValue("sun_glow_focus", wl.sunGlowFocus);
|
||||||
|
cmd.Parameters.AddWithValue("sun_glow_size", wl.sunGlowSize);
|
||||||
|
cmd.Parameters.AddWithValue("scene_gamma", wl.sceneGamma);
|
||||||
|
cmd.Parameters.AddWithValue("star_brightness", wl.starBrightness);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_color_r", wl.cloudColor.X);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_color_g", wl.cloudColor.Y);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_color_b", wl.cloudColor.Z);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_color_i", wl.cloudColor.W);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_x", wl.cloudXYDensity.X);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_y", wl.cloudXYDensity.Y);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_density", wl.cloudXYDensity.Z);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_coverage", wl.cloudCoverage);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_scale", wl.cloudScale);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_detail_x", wl.cloudDetailXYDensity.X);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_detail_y", wl.cloudDetailXYDensity.Y);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_detail_density", wl.cloudDetailXYDensity.Z);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_scroll_x", wl.cloudScrollX);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_scroll_x_lock", wl.cloudScrollXLock);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock);
|
||||||
|
cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds);
|
||||||
|
|
||||||
|
ExecuteNonQuery(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void StoreRegionSettings(RegionSettings rs)
|
public void StoreRegionSettings(RegionSettings rs)
|
||||||
{
|
{
|
||||||
lock (m_Connection)
|
lock (m_Connection)
|
||||||
|
|
|
@ -50,7 +50,12 @@ namespace OpenSim.Data.Null
|
||||||
public void StoreRegionSettings(RegionSettings rs)
|
public void StoreRegionSettings(RegionSettings rs)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
|
||||||
|
{
|
||||||
|
//This connector doesn't support the windlight module yet
|
||||||
|
//Return default LL windlight settings
|
||||||
|
return new RegionMeta7WindlightData();
|
||||||
|
}
|
||||||
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -272,7 +272,12 @@ namespace OpenSim.Data.SQLite
|
||||||
Commit();
|
Commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
|
||||||
|
{
|
||||||
|
//This connector doesn't support the windlight module yet
|
||||||
|
//Return default LL windlight settings
|
||||||
|
return new RegionMeta7WindlightData();
|
||||||
|
}
|
||||||
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
||||||
{
|
{
|
||||||
lock (ds)
|
lock (ds)
|
||||||
|
|
|
@ -1077,7 +1077,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
void SendInstantMessage(GridInstantMessage im);
|
void SendInstantMessage(GridInstantMessage im);
|
||||||
|
|
||||||
void SendGenericMessage(string method, List<string> message);
|
void SendGenericMessage(string method, List<byte[]> message);
|
||||||
|
|
||||||
void SendLayerData(float[] map);
|
void SendLayerData(float[] map);
|
||||||
void SendLayerData(int px, int py, float[] map);
|
void SendLayerData(int px, int py, float[] map);
|
||||||
|
|
|
@ -36,8 +36,59 @@ using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
public class RegionMeta7WindlightData
|
||||||
|
{
|
||||||
|
public UUID regionID = UUID.Zero;
|
||||||
|
public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f);
|
||||||
|
public float waterFogDensityExponent = 4.0f;
|
||||||
|
public float underwaterFogModifier = 0.25f;
|
||||||
|
public Vector3 reflectionWaveletScale = new Vector3(2.0f,2.0f,2.0f);
|
||||||
|
public float fresnelScale = 0.40f;
|
||||||
|
public float fresnelOffset = 0.50f;
|
||||||
|
public float refractScaleAbove = 0.03f;
|
||||||
|
public float refractScaleBelow = 0.20f;
|
||||||
|
public float blurMultiplier = 0.040f;
|
||||||
|
public Vector2 bigWaveDirection = new Vector2(1.05f,-0.42f);
|
||||||
|
public Vector2 littleWaveDirection = new Vector2(1.11f,-1.16f);
|
||||||
|
public UUID normalMapTexture = new UUID("822ded49-9a6c-f61c-cb89-6df54f42cdf4");
|
||||||
|
public Vector4 horizon = new Vector4(0.26f, 0.24f, 0.34f, 0.33f);
|
||||||
|
public float hazeHorizon = 0.19f;
|
||||||
|
public Vector4 blueDensity = new Vector4(0.10f, 0.93f, 0.02f, 0.93f);
|
||||||
|
public float hazeDensity = 0.70f;
|
||||||
|
public float densityMultiplier = 0.18f;
|
||||||
|
public float distanceMultiplier = 0.8f;
|
||||||
|
public UInt16 maxAltitude = 1605;
|
||||||
|
public Vector4 sunMoonColor = new Vector4(0.24f, 0.26f, 0.30f, 0.30f);
|
||||||
|
public float sunMoonPosition = 0.335f;
|
||||||
|
public Vector4 ambient = new Vector4(0.35f,0.35f,0.35f,0.35f);
|
||||||
|
public float eastAngle = 0.0f;
|
||||||
|
public float sunGlowFocus = 0.10f;
|
||||||
|
public float sunGlowSize = 0.10f;
|
||||||
|
public float sceneGamma = 1.0f;
|
||||||
|
public float starBrightness = 0.0f;
|
||||||
|
public Vector4 cloudColor = new Vector4(0.41f, 0.41f, 0.41f, 0.41f);
|
||||||
|
public Vector3 cloudXYDensity = new Vector3(1.00f, 0.53f, 1.00f);
|
||||||
|
public float cloudCoverage = 0.27f;
|
||||||
|
public float cloudScale = 0.42f;
|
||||||
|
public Vector3 cloudDetailXYDensity = new Vector3(1.00f, 0.53f, 0.12f);
|
||||||
|
public float cloudScrollX = 0.20f;
|
||||||
|
public bool cloudScrollXLock = false;
|
||||||
|
public float cloudScrollY = 0.01f;
|
||||||
|
public bool cloudScrollYLock = false;
|
||||||
|
public bool drawClassicClouds = false;
|
||||||
|
|
||||||
|
public delegate void SaveDelegate(RegionMeta7WindlightData wl);
|
||||||
|
public event SaveDelegate OnSave;
|
||||||
|
public void Save()
|
||||||
|
{
|
||||||
|
if (OnSave != null)
|
||||||
|
OnSave(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SimpleRegionInfo
|
public class SimpleRegionInfo
|
||||||
{
|
{
|
||||||
|
@ -304,8 +355,7 @@ namespace OpenSim.Framework
|
||||||
private bool m_clampPrimSize = false;
|
private bool m_clampPrimSize = false;
|
||||||
private int m_objectCapacity = 0;
|
private int m_objectCapacity = 0;
|
||||||
private string m_regionType = String.Empty;
|
private string m_regionType = String.Empty;
|
||||||
|
private RegionMeta7WindlightData m_windlight = new RegionMeta7WindlightData();
|
||||||
|
|
||||||
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
|
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
|
||||||
|
|
||||||
// MT: Yes. Estates can't span trust boundaries. Therefore, it can be
|
// MT: Yes. Estates can't span trust boundaries. Therefore, it can be
|
||||||
|
@ -454,6 +504,21 @@ namespace OpenSim.Framework
|
||||||
set { m_regionSettings = value; }
|
set { m_regionSettings = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RegionMeta7WindlightData WindlightSettings
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (m_windlight == null)
|
||||||
|
{
|
||||||
|
m_windlight = new RegionMeta7WindlightData();
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_windlight;
|
||||||
|
}
|
||||||
|
|
||||||
|
set { m_windlight = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public int NonphysPrimMax
|
public int NonphysPrimMax
|
||||||
{
|
{
|
||||||
get { return m_nonphysPrimMax; }
|
get { return m_nonphysPrimMax; }
|
||||||
|
|
|
@ -764,16 +764,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGenericMessage(string method, List<string> message)
|
public void SendGenericMessage(string method, List<byte[]> message)
|
||||||
{
|
{
|
||||||
GenericMessagePacket gmp = new GenericMessagePacket();
|
GenericMessagePacket gmp = new GenericMessagePacket();
|
||||||
gmp.MethodData.Method = Util.StringToBytes256(method);
|
gmp.MethodData.Method = Util.StringToBytes256(method);
|
||||||
gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count];
|
gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (string val in message)
|
foreach (byte[] val in message)
|
||||||
{
|
{
|
||||||
gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock();
|
gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock();
|
||||||
gmp.ParamList[i++].Parameter = Util.StringToBytes256(val);
|
gmp.ParamList[i++].Parameter = val;
|
||||||
}
|
}
|
||||||
OutPacket(gmp, ThrottleOutPacketType.Task);
|
OutPacket(gmp, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,7 +433,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGenericMessage(string method, List<string> message)
|
public void SendGenericMessage(string method, List<byte[]> message)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
|
|
||||||
void StoreRegionSettings(RegionSettings rs);
|
void StoreRegionSettings(RegionSettings rs);
|
||||||
RegionSettings LoadRegionSettings(UUID regionUUID);
|
RegionSettings LoadRegionSettings(UUID regionUUID);
|
||||||
|
RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID);
|
||||||
|
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -539,6 +539,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// Load region settings
|
// Load region settings
|
||||||
m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
|
m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
|
||||||
|
m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID);
|
||||||
|
|
||||||
if (m_storageManager.EstateDataStore != null)
|
if (m_storageManager.EstateDataStore != null)
|
||||||
{
|
{
|
||||||
m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
|
m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
|
||||||
|
|
|
@ -101,7 +101,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
|
||||||
|
{
|
||||||
|
//This connector doesn't support the windlight module yet
|
||||||
|
//Return default LL windlight settings
|
||||||
|
return new RegionMeta7WindlightData();
|
||||||
|
}
|
||||||
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
public RegionSettings LoadRegionSettings(UUID regionUUID)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -936,7 +936,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGenericMessage(string method, List<string> message)
|
public void SendGenericMessage(string method, List<byte[]> message)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -522,7 +522,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGenericMessage(string method, List<string> message)
|
public void SendGenericMessage(string method, List<byte[]> message)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,7 +491,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGenericMessage(string method, List<string> message)
|
public void SendGenericMessage(string method, List<byte[]> message)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue