本文整理汇总了C#中OpenSim.Framework.LandData类的典型用法代码示例。如果您正苦于以下问题:C# LandData类的具体用法?C# LandData怎么用?C# LandData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LandData类属于OpenSim.Framework命名空间,在下文中一共展示了LandData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setup
public void setup()
{
// setup LandData object
this.land = new LandData();
this.land.AABBMax = new Vector3(0, 0, 0);
this.land.AABBMin = new Vector3(128, 128, 128);
this.land.Area = 128;
this.land.AuctionID = 0;
this.land.AuthBuyerID = new UUID();
this.land.Category = ParcelCategory.Residential;
this.land.ClaimDate = 0;
this.land.ClaimPrice = 0;
this.land.GlobalID = new UUID("54ff9641-dd40-4a2c-b1f1-47dd3af24e50");
this.land.GroupID = new UUID("d740204e-bbbf-44aa-949d-02c7d739f6a5");
this.land.GroupPrims = 0;
this.land.Description = "land data to test LandDataSerializer";
this.land.Flags = (uint)(ParcelFlags.AllowDamage | ParcelFlags.AllowVoiceChat);
this.land.LandingType = (byte)LandingType.Direct;
this.land.Name = "LandDataSerializerTest Land";
this.land.Status = ParcelStatus.Leased;
this.land.LocalID = 0;
this.land.MediaAutoScale = (byte)0x01;
this.land.MediaID = new UUID("d4452578-2f25-4b97-a81b-819af559cfd7");
this.land.MediaURL = "http://videos.opensimulator.org/bumblebee.mp4";
this.land.OwnerID = new UUID("1b8eedf9-6d15-448b-8015-24286f1756bf");
this.landWithParcelAccessList = this.land.Copy();
this.landWithParcelAccessList.ParcelAccessList.Clear();
ParcelManager.ParcelAccessEntry pae0 = new ParcelManager.ParcelAccessEntry();
pae0.AgentID = new UUID("62d65d45-c91a-4f77-862c-46557d978b6c");
pae0.Flags = AccessList.Ban;
pae0.Time = new DateTime(2009, 10, 01);
this.landWithParcelAccessList.ParcelAccessList.Add(pae0);
ParcelManager.ParcelAccessEntry pae1 = new ParcelManager.ParcelAccessEntry();
pae1.AgentID = new UUID("ec2a8d18-2378-4fe0-8b68-2a31b57c481e");
pae1.Flags = AccessList.Access;
pae1.Time = new DateTime(2010, 10, 20);
this.landWithParcelAccessList.ParcelAccessList.Add(pae1);
}
示例2: IncomingLandObjectFromStorage
public void IncomingLandObjectFromStorage(LandData data)
{
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
new_land.LandData = data.Copy();
new_land.SetLandBitmapFromByteArray();
AddLandObject(new_land);
}
示例3: GetShowInSearch
private string GetShowInSearch(LandData parcel)
{
if ((parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)
return "true";
else
return "false";
}
示例4: GetBuildPermissions
private string GetBuildPermissions(LandData parcel)
{
if ((parcel.Flags & (uint)ParcelFlags.CreateObjects) == (uint)ParcelFlags.CreateObjects)
return "true";
else
return "false";
}
示例5: GetScriptsPermissions
private string GetScriptsPermissions(LandData parcel)
{
if ((parcel.Flags & (uint)ParcelFlags.AllowOtherScripts) == (uint)ParcelFlags.AllowOtherScripts)
return "true";
else
return "false";
}
示例6: ChannelName
private string ChannelName(Scene scene, LandData land)
{
// Create parcel voice channel. If no parcel exists, then the voice channel ID is the same
// as the directory ID. Otherwise, it reflects the parcel's ID.
// if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
if ((land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
{
m_log.DebugFormat("[MurmurVoice]: use Region:Parcel \"{0}:{1}\": parcel id {2}",
scene.RegionInfo.RegionName, land.Name, land.LocalID);
return land.GlobalID.ToString().Replace("-","");
}
else
{
m_log.DebugFormat("[MurmurVoice]: use EstateVoice Region:Parcel \"{0}:{1}\": parcel id {2}",
scene.RegionInfo.RegionName, scene.RegionInfo.RegionName, land.LocalID);
// return scene.RegionInfo.RegionID.ToString().Replace("-","");
return MurmurVoiceModule.m_murmurd_EstateChannel;
}
}
示例7: SendLandObjectOwners
public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
{
}
示例8: ChannelUri
private string ChannelUri(Scene scene, LandData land)
{
string channelUri = null;
string landUUID;
string landName;
// Create parcel voice channel. If no parcel exists, then the voice channel ID is the same
// as the directory ID. Otherwise, it reflects the parcel's ID.
lock (m_ParcelAddress)
{
if (m_ParcelAddress.ContainsKey(land.GlobalID.ToString()))
{
m_log.DebugFormat("[FreeSwitchVoice]: parcel id {0}: using sip address {1}",
land.GlobalID, m_ParcelAddress[land.GlobalID.ToString()]);
return m_ParcelAddress[land.GlobalID.ToString()];
}
}
if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
{
landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name);
landUUID = land.GlobalID.ToString();
m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}",
landName, land.LocalID, landUUID);
}
else
{
landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName);
landUUID = scene.RegionInfo.RegionID.ToString();
m_log.DebugFormat("[FreeSwitchVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}",
landName, land.LocalID, landUUID);
}
// slvoice handles the sip address differently if it begins with confctl, hiding it from the user in the friends list. however it also disables
// the personal speech indicators as well unless some siren14-3d codec magic happens. we dont have siren143d so we'll settle for the personal speech indicator.
channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(Encoding.ASCII.GetBytes(landUUID)), m_freeSwitchRealm);
lock (m_ParcelAddress)
{
if (!m_ParcelAddress.ContainsKey(land.GlobalID.ToString()))
{
m_ParcelAddress.Add(land.GlobalID.ToString(),channelUri);
}
}
return channelUri;
}
示例9: buildLandData
/// <summary>
/// Build a Land Data from the persisted data.
/// </summary>
/// <param name="row"></param>
/// <returns></returns>
private LandData buildLandData(DataRow row)
{
LandData newData = new LandData();
newData.GlobalID = new UUID((String) row["UUID"]);
newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
// Bitmap is a byte[512]
newData.Bitmap = (Byte[]) row["Bitmap"];
newData.Name = (String) row["Name"];
newData.Description = (String) row["Desc"];
newData.OwnerID = (UUID)(String) row["OwnerUUID"];
newData.IsGroupOwned = (Boolean) row["IsGroupOwned"];
newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.Category = (ParcelCategory) Convert.ToInt32(row["Category"]);
//Enum OpenMetaverse.Parcel.ParcelCategory
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
newData.GroupID = new UUID((String) row["GroupUUID"]);
newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
newData.Status = (ParcelStatus) Convert.ToInt32(row["LandStatus"]);
//Enum. OpenMetaverse.Parcel.ParcelStatus
newData.Flags = Convert.ToUInt32(row["LandFlags"]);
newData.LandingType = (Byte) row["LandingType"];
newData.MediaAutoScale = (Byte) row["MediaAutoScale"];
newData.MediaID = new UUID((String) row["MediaTextureUUID"]);
newData.MediaURL = (String) row["MediaURL"];
newData.MusicURL = (String) row["MusicURL"];
newData.PassHours = Convert.ToSingle(row["PassHours"]);
newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
newData.SnapshotID = (UUID)(String) row["SnapshotUUID"];
try
{
newData.UserLocation =
new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
Convert.ToSingle(row["UserLocationZ"]));
newData.UserLookAt =
new Vector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
Convert.ToSingle(row["UserLookAtZ"]));
}
catch (InvalidCastException)
{
m_log.ErrorFormat(":[SQLITE REGION DB]: unable to get parcel telehub settings for {1}", newData.Name);
newData.UserLocation = Vector3.Zero;
newData.UserLookAt = Vector3.Zero;
}
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
UUID authBuyerID = UUID.Zero;
UUID.TryParse((string)row["AuthbuyerID"], out authBuyerID);
newData.OtherCleanTime = Convert.ToInt32(row["OtherCleanTime"]);
newData.Dwell = Convert.ToInt32(row["Dwell"]);
return newData;
}
示例10: CreateLandParameters
/// <summary>
/// Creates the land parameters.
/// </summary>
/// <param name="land">land parameters.</param>
/// <param name="regionUUID">region UUID.</param>
/// <returns></returns>
private SqlParameter[] CreateLandParameters(LandData land, UUID regionUUID)
{
List<SqlParameter> parameters = new List<SqlParameter>();
parameters.Add(_Database.CreateParameter("UUID", land.GlobalID));
parameters.Add(_Database.CreateParameter("RegionUUID", regionUUID));
parameters.Add(_Database.CreateParameter("LocalLandID", land.LocalID));
// Bitmap is a byte[512]
parameters.Add(_Database.CreateParameter("Bitmap", land.Bitmap));
parameters.Add(_Database.CreateParameter("Name", land.Name));
parameters.Add(_Database.CreateParameter("Description", land.Description));
parameters.Add(_Database.CreateParameter("OwnerUUID", land.OwnerID));
parameters.Add(_Database.CreateParameter("IsGroupOwned", land.IsGroupOwned));
parameters.Add(_Database.CreateParameter("Area", land.Area));
parameters.Add(_Database.CreateParameter("AuctionID", land.AuctionID)); //Unemplemented
parameters.Add(_Database.CreateParameter("Category", (int)land.Category)); //Enum libsecondlife.Parcel.ParcelCategory
parameters.Add(_Database.CreateParameter("ClaimDate", land.ClaimDate));
parameters.Add(_Database.CreateParameter("ClaimPrice", land.ClaimPrice));
parameters.Add(_Database.CreateParameter("GroupUUID", land.GroupID));
parameters.Add(_Database.CreateParameter("SalePrice", land.SalePrice));
parameters.Add(_Database.CreateParameter("LandStatus", (int)land.Status)); //Enum. libsecondlife.Parcel.ParcelStatus
parameters.Add(_Database.CreateParameter("LandFlags", land.Flags));
parameters.Add(_Database.CreateParameter("LandingType", land.LandingType));
parameters.Add(_Database.CreateParameter("MediaAutoScale", land.MediaAutoScale));
parameters.Add(_Database.CreateParameter("MediaTextureUUID", land.MediaID));
parameters.Add(_Database.CreateParameter("MediaURL", land.MediaURL));
parameters.Add(_Database.CreateParameter("MusicURL", land.MusicURL));
parameters.Add(_Database.CreateParameter("PassHours", land.PassHours));
parameters.Add(_Database.CreateParameter("PassPrice", land.PassPrice));
parameters.Add(_Database.CreateParameter("SnapshotUUID", land.SnapshotID));
parameters.Add(_Database.CreateParameter("UserLocationX", land.UserLocation.X));
parameters.Add(_Database.CreateParameter("UserLocationY", land.UserLocation.Y));
parameters.Add(_Database.CreateParameter("UserLocationZ", land.UserLocation.Z));
parameters.Add(_Database.CreateParameter("UserLookAtX", land.UserLookAt.X));
parameters.Add(_Database.CreateParameter("UserLookAtY", land.UserLookAt.Y));
parameters.Add(_Database.CreateParameter("UserLookAtZ", land.UserLookAt.Z));
parameters.Add(_Database.CreateParameter("AuthBuyerID", land.AuthBuyerID));
parameters.Add(_Database.CreateParameter("OtherCleanTime", land.OtherCleanTime));
return parameters.ToArray();
}
示例11: OnLandObjectAdded
void OnLandObjectAdded(LandData newParcel)
{
//Taint it!
TaintPrimCount(m_Scene.RequestModuleInterface<IParcelManagementModule>().GetLandObject(newParcel.GlobalID));
}
示例12: RegionGetOrCreateChannel
private string RegionGetOrCreateChannel(Scene scene, LandData land)
{
string channelUri = null;
string channelId = null;
string landUUID;
string landName;
string parentId;
lock (m_parents) parentId = m_parents[scene.RegionInfo.RegionID.ToString()];
// Create parcel voice channel. If no parcel exists, then the voice channel ID is the same
// as the directory ID. Otherwise, it reflects the parcel's ID.
if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
{
landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name);
landUUID = land.GlobalID.ToString();
m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}",
landName, land.LocalID, landUUID);
}
else
{
landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName);
landUUID = scene.RegionInfo.RegionID.ToString();
m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}",
landName, land.LocalID, landUUID);
}
lock (vlock)
{
// Added by Adam to help debug channel not availible errors.
if (VivoxTryGetChannel(parentId, landUUID, out channelId, out channelUri))
m_log.DebugFormat("[VivoxVoice] Found existing channel at " + channelUri);
else if (VivoxTryCreateChannel(parentId, landUUID, landName, out channelUri))
m_log.DebugFormat("[VivoxVoice] Created new channel at " + channelUri);
else
throw new Exception("vivox channel uri not available");
m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ",
landName, parentId, channelUri);
}
return channelUri;
}
示例13: LandObject
public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
{
m_scene = scene;
if (m_scene == null)
LandBitmap = new bool[Constants.RegionSize / landUnit, Constants.RegionSize / landUnit];
else
LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit];
LandData = new LandData();
LandData.OwnerID = owner_id;
if (is_group_owned)
LandData.GroupID = owner_id;
else
LandData.GroupID = UUID.Zero;
LandData.IsGroupOwned = is_group_owned;
}
示例14: UpdateLandObject
public void UpdateLandObject(int local_id, LandData data)
{
LandData newData = data.Copy();
newData.LocalID = local_id;
ILandObject land;
lock (m_landList)
{
if (m_landList.TryGetValue(local_id, out land))
land.LandData = newData;
}
if (land != null)
m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, land);
}
示例15: fillLandRow
/// <summary>
///
/// </summary>
/// <param name="row"></param>
/// <param name="land"></param>
/// <param name="regionUUID"></param>
private void fillLandRow(DataRow row, LandData land, UUID regionUUID)
{
row["UUID"] = land.GlobalID.ToString();
row["RegionUUID"] = regionUUID.ToString();
row["LocalLandID"] = land.LocalID;
// Bitmap is a byte[512]
row["Bitmap"] = land.Bitmap;
row["Name"] = land.Name;
row["Desc"] = land.Description;
row["OwnerUUID"] = land.OwnerID.ToString();
row["IsGroupOwned"] = land.IsGroupOwned;
row["Area"] = land.Area;
row["AuctionID"] = land.AuctionID; //Unemplemented
row["Category"] = land.Category; //Enum OpenMetaverse.Parcel.ParcelCategory
row["ClaimDate"] = land.ClaimDate;
row["ClaimPrice"] = land.ClaimPrice;
row["GroupUUID"] = land.GroupID.ToString();
row["SalePrice"] = land.SalePrice;
row["LandStatus"] = land.Status; //Enum. OpenMetaverse.Parcel.ParcelStatus
row["LandFlags"] = land.Flags;
row["LandingType"] = land.LandingType;
row["MediaAutoScale"] = land.MediaAutoScale;
row["MediaTextureUUID"] = land.MediaID.ToString();
row["MediaURL"] = land.MediaURL;
row["MusicURL"] = land.MusicURL;
row["PassHours"] = land.PassHours;
row["PassPrice"] = land.PassPrice;
row["SnapshotUUID"] = land.SnapshotID.ToString();
row["UserLocationX"] = land.UserLocation.X;
row["UserLocationY"] = land.UserLocation.Y;
row["UserLocationZ"] = land.UserLocation.Z;
row["UserLookAtX"] = land.UserLookAt.X;
row["UserLookAtY"] = land.UserLookAt.Y;
row["UserLookAtZ"] = land.UserLookAt.Z;
row["AuthbuyerID"] = land.AuthBuyerID.ToString();
row["OtherCleanTime"] = land.OtherCleanTime;
row["Dwell"] = land.Dwell;
}