Add ILandChannel.GetLandObject(Vector3 position) as this is a very common input to GetLandObject()

This conforms to the existing ILandChannel.ParcelsNearPoint() method
0.7.4-extended
Justin Clark-Casey (justincc) 2013-03-14 22:56:26 +00:00
parent cf52e8072c
commit 6804549428
4 changed files with 22 additions and 0 deletions

View File

@ -55,6 +55,13 @@ namespace OpenSim.Region.Framework.Interfaces
/// <returns>Land object at the point supplied</returns> /// <returns>Land object at the point supplied</returns>
ILandObject GetLandObject(float x, float y); ILandObject GetLandObject(float x, float y);
/// <summary>
/// Get the parcel at the specified point
/// </summary>
/// <param name="position">Vector where x and y components are between 0 and 256. z component is ignored.</param>
/// <returns>Land object at the point supplied</returns>
ILandObject GetLandObject(Vector3 position);
/// <summary> /// <summary>
/// Get the parcels near the specified point /// Get the parcels near the specified point
/// </summary> /// </summary>

View File

@ -95,6 +95,11 @@ namespace OpenSim.Region.CoreModules.World.Land
return null; return null;
} }
public ILandObject GetLandObject(Vector3 position)
{
return GetLandObject(position.X, position.Y);
}
public ILandObject GetLandObject(int x, int y) public ILandObject GetLandObject(int x, int y)
{ {
if (m_landManagementModule != null) if (m_landManagementModule != null)

View File

@ -68,6 +68,11 @@ public class RegionCombinerLargeLandChannel : ILandChannel
RootRegionLandChannel.Clear(setupDefaultParcel); RootRegionLandChannel.Clear(setupDefaultParcel);
} }
public ILandObject GetLandObject(Vector3 position)
{
return GetLandObject(position.X, position.Y);
}
public ILandObject GetLandObject(int x, int y) public ILandObject GetLandObject(int x, int y)
{ {
//m_log.DebugFormat("[BIGLANDTESTINT]: <{0},{1}>", x, y); //m_log.DebugFormat("[BIGLANDTESTINT]: <{0},{1}>", x, y);

View File

@ -81,6 +81,11 @@ namespace OpenSim.Tests.Common.Mock
return obj; return obj;
} }
public ILandObject GetLandObject(Vector3 position)
{
return GetLandObject(position.X, position.Y);
}
public ILandObject GetLandObject(int x, int y) public ILandObject GetLandObject(int x, int y)
{ {
return GetNoLand(); return GetNoLand();