More work on the AllNewSceneObject* classes.
parent
1c68c7a37f
commit
dde8aafb8a
|
@ -560,7 +560,6 @@ namespace OpenSim.Framework.Types
|
|||
|
||||
public void loadConfigurationOptions()
|
||||
{
|
||||
|
||||
configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "","0.0",true);
|
||||
configMember.addConfigurationOption("estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "","0",true);
|
||||
configMember.addConfigurationOption("parent_estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", true);
|
||||
|
@ -603,7 +602,6 @@ namespace OpenSim.Framework.Types
|
|||
configMember.addConfigurationOption("terrain_multiplier", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true);
|
||||
configMember.addConfigurationOption("water_height", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, "", "20.0", true);
|
||||
configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true);
|
||||
|
||||
}
|
||||
|
||||
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
||||
|
|
|
@ -18,6 +18,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
protected AllNewSceneObjectPart2 m_rootPart;
|
||||
protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>();
|
||||
|
||||
protected ulong m_regionHandle;
|
||||
protected Scene m_scene;
|
||||
|
||||
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
||||
|
||||
/// <summary>
|
||||
|
@ -45,9 +48,14 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public AllNewSceneObjectGroup2()
|
||||
public AllNewSceneObjectGroup2(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
|
||||
{
|
||||
m_regionHandle = regionHandle;
|
||||
m_scene = world;
|
||||
|
||||
this.Pos = pos;
|
||||
this.m_rootPart = new AllNewSceneObjectPart2(m_regionHandle, this, ownerID, localID, shape, pos);
|
||||
this.m_parts.Add(this.m_rootPart.UUID, this.m_rootPart);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -142,6 +150,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void TriggerTainted()
|
||||
{
|
||||
if (OnPrimCountTainted != null)
|
||||
|
@ -194,6 +205,50 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
client.OutPacket(proper);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="localID"></param>
|
||||
public void GetInventory(IClientAPI remoteClient, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.GetInventory(remoteClient, localID);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="inUse"></param>
|
||||
/// <param name="data"></param>
|
||||
public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.UpdateExtraParam(type, inUse, data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <param name="textureEntry"></param>
|
||||
public void UpdateTextureEntry(uint localID, byte[] textureEntry)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.UpdateTextureEntry(textureEntry);
|
||||
}
|
||||
}
|
||||
|
||||
#region Shape
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -210,11 +265,20 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
#endregion
|
||||
|
||||
#region Position
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pos"></param>
|
||||
public void UpdateGroupPosition(LLVector3 pos)
|
||||
{
|
||||
this.m_pos = pos;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pos"></param>
|
||||
/// <param name="localID"></param>
|
||||
public void UpdateSinglePosition(LLVector3 pos, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
|
@ -231,6 +295,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pos"></param>
|
||||
private void UpdateRootPosition(LLVector3 pos)
|
||||
{
|
||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||
|
@ -258,6 +326,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
#endregion
|
||||
|
||||
#region Roation
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="rot"></param>
|
||||
public void UpdateGroupRotation(LLQuaternion rot)
|
||||
{
|
||||
this.m_rootPart.UpdateRotation(rot);
|
||||
|
@ -274,6 +346,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
this.m_pos = pos;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="rot"></param>
|
||||
/// <param name="localID"></param>
|
||||
public void UpdateSingleRotation(LLQuaternion rot, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
|
@ -289,6 +366,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="rot"></param>
|
||||
private void UpdateRootRotation(LLQuaternion rot)
|
||||
{
|
||||
this.m_rootPart.UpdateRotation(rot);
|
||||
|
@ -310,6 +392,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
///
|
||||
|
|
|
@ -252,6 +252,15 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
#endregion
|
||||
|
||||
#region Constructors
|
||||
/// <summary>
|
||||
/// Create a completely new SceneObjectPart (prim)
|
||||
/// </summary>
|
||||
/// <param name="regionHandle"></param>
|
||||
/// <param name="parent"></param>
|
||||
/// <param name="ownerID"></param>
|
||||
/// <param name="localID"></param>
|
||||
/// <param name="shape"></param>
|
||||
/// <param name="position"></param>
|
||||
public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position)
|
||||
{
|
||||
this.m_regionHandle = regionHandle;
|
||||
|
@ -266,6 +275,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
this.m_Shape = shape;
|
||||
|
||||
this.OffsetPosition = position;
|
||||
this.RotationOffset = LLQuaternion.Identity;
|
||||
this.Velocity = new LLVector3(0, 0, 0);
|
||||
this.AngularVelocity = new LLVector3(0, 0, 0);
|
||||
this.Acceleration = new LLVector3(0, 0, 0);
|
||||
|
||||
//temporary code just so the m_flags field doesn't give a compiler warning
|
||||
if (m_flags ==LLObject.ObjectFlags.AllowInventoryDrop)
|
||||
|
@ -273,6 +286,33 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recreate a SceneObjectPart (prim)
|
||||
/// </summary>
|
||||
/// <param name="regionHandle"></param>
|
||||
/// <param name="parent"></param>
|
||||
/// <param name="ownerID"></param>
|
||||
/// <param name="localID"></param>
|
||||
/// <param name="shape"></param>
|
||||
/// <param name="position"></param>
|
||||
public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, int creationDate, LLUUID ownerID, LLUUID creatorID, LLUUID lastOwnerID, uint localID, PrimitiveBaseShape shape, LLVector3 position, LLQuaternion rotation, uint flags)
|
||||
{
|
||||
this.m_regionHandle = regionHandle;
|
||||
this.m_parentGroup = parent;
|
||||
|
||||
this.CreationDate = creationDate;
|
||||
this.OwnerID = ownerID;
|
||||
this.CreatorID = creatorID;
|
||||
this.LastOwnerID = lastOwnerID;
|
||||
this.UUID = LLUUID.Random();
|
||||
this.LocalID = (uint)(localID);
|
||||
this.m_Shape = shape;
|
||||
|
||||
this.OffsetPosition = position;
|
||||
this.RotationOffset = rotation;
|
||||
this.ObjectFlags = flags;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Scheduling
|
||||
|
|
|
@ -794,7 +794,7 @@ namespace OpenSim.Region.Terrain
|
|||
s.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Outputs to a LL compatible RAW in the most efficient manner possible
|
||||
/// </summary>
|
||||
/// <remarks>Does not calculate the revert map</remarks>
|
||||
|
|
Loading…
Reference in New Issue