本文整理汇总了C#中OpenSim.Region.Framework.Scenes.SceneObjectPart.ScheduleFullUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# SceneObjectPart.ScheduleFullUpdate方法的具体用法?C# SceneObjectPart.ScheduleFullUpdate怎么用?C# SceneObjectPart.ScheduleFullUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Region.Framework.Scenes.SceneObjectPart
的用法示例。
在下文中一共展示了SceneObjectPart.ScheduleFullUpdate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetScale
protected void SetScale(SceneObjectPart part, LSL_Vector scale)
{
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return;
IOpenRegionSettingsModule WSModule = m_host.ParentGroup.Scene.RequestModuleInterface<IOpenRegionSettingsModule>();
if (WSModule != null)
{
if (WSModule.MinimumPrimScale != -1)
{
if (scale.x < WSModule.MinimumPrimScale)
scale.x = WSModule.MinimumPrimScale;
if (scale.y < WSModule.MinimumPrimScale)
scale.y = WSModule.MinimumPrimScale;
if (scale.z < WSModule.MinimumPrimScale)
scale.z = WSModule.MinimumPrimScale;
}
if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical &&
WSModule.MaximumPhysPrimScale != -1)
{
if (scale.x > WSModule.MaximumPhysPrimScale)
scale.x = WSModule.MaximumPhysPrimScale;
if (scale.y > WSModule.MaximumPhysPrimScale)
scale.y = WSModule.MaximumPhysPrimScale;
if (scale.z > WSModule.MaximumPhysPrimScale)
scale.z = WSModule.MaximumPhysPrimScale;
}
if (WSModule.MaximumPrimScale != -1)
{
if (scale.x > WSModule.MaximumPrimScale)
scale.x = WSModule.MaximumPrimScale;
if (scale.y > WSModule.MaximumPrimScale)
scale.y = WSModule.MaximumPrimScale;
if (scale.z > WSModule.MaximumPrimScale)
scale.z = WSModule.MaximumPrimScale;
}
}
Vector3 tmp = part.Scale;
tmp.X = (float)scale.x;
tmp.Y = (float)scale.y;
tmp.Z = (float)scale.z;
part.Scale = tmp;
part.ScheduleFullUpdate(PrimUpdateFlags.FindBest);
part.ParentGroup.HasGroupChanged = true;
}
示例2: SetParticleSystem
//.........这里部分代码省略.........
prules.PartAcceleration.X = (float)tempv.x;
prules.PartAcceleration.Y = (float)tempv.y;
prules.PartAcceleration.Z = (float)tempv.z;
break;
case (int)ScriptBaseClass.PSYS_SRC_PATTERN:
int tmpi = (int)rules.GetLSLIntegerItem(i + 1);
prules.Pattern = (Primitive.ParticleSystem.SourcePattern)tmpi;
break;
// PSYS_SRC_INNERANGLE and PSYS_SRC_ANGLE_BEGIN use the same variables. The
// PSYS_SRC_OUTERANGLE and PSYS_SRC_ANGLE_END also use the same variable. The
// client tells the difference between the two by looking at the 0x02 bit in
// the PartFlags variable.
case (int)ScriptBaseClass.PSYS_SRC_INNERANGLE:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.InnerAngle = (float)tempf;
prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off.
break;
case (int)ScriptBaseClass.PSYS_SRC_OUTERANGLE:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.OuterAngle = (float)tempf;
prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off.
break;
case (int)ScriptBaseClass.PSYS_SRC_TEXTURE:
prules.Texture = KeyOrName(rules.GetLSLStringItem(i + 1));
break;
case (int)ScriptBaseClass.PSYS_SRC_BURST_RATE:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.BurstRate = (float)tempf;
break;
case (int)ScriptBaseClass.PSYS_SRC_BURST_PART_COUNT:
prules.BurstPartCount = (byte)(int)rules.GetLSLIntegerItem(i + 1);
break;
case (int)ScriptBaseClass.PSYS_SRC_BURST_RADIUS:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.BurstRadius = (float)tempf;
break;
case (int)ScriptBaseClass.PSYS_SRC_BURST_SPEED_MIN:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.BurstSpeedMin = (float)tempf;
break;
case (int)ScriptBaseClass.PSYS_SRC_BURST_SPEED_MAX:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.BurstSpeedMax = (float)tempf;
break;
case (int)ScriptBaseClass.PSYS_SRC_MAX_AGE:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.MaxAge = (float)tempf;
break;
case (int)ScriptBaseClass.PSYS_SRC_TARGET_KEY:
UUID key = UUID.Zero;
if (UUID.TryParse(rules.Data[i + 1].ToString(), out key))
{
prules.Target = key;
}
else
{
prules.Target = part.UUID;
}
break;
case (int)ScriptBaseClass.PSYS_SRC_OMEGA:
// AL: This is an assumption, since it is the only thing that would match.
tempv = rules.GetVector3Item(i + 1);
prules.AngularVelocity.X = (float)tempv.x;
prules.AngularVelocity.Y = (float)tempv.y;
prules.AngularVelocity.Z = (float)tempv.z;
break;
case (int)ScriptBaseClass.PSYS_SRC_ANGLE_BEGIN:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.InnerAngle = (float)tempf;
prules.PartFlags |= 0x02; // Set new angle format.
break;
case (int)ScriptBaseClass.PSYS_SRC_ANGLE_END:
tempf = (float)rules.GetLSLFloatItem(i + 1);
prules.OuterAngle = (float)tempf;
prules.PartFlags |= 0x02; // Set new angle format.
break;
}
}
prules.CRC = 1;
part.AddNewParticleSystem(prules);
part.ParentGroup.HasGroupChanged = true;
}
part.ScheduleFullUpdate(PrimUpdateFlags.Particles);
}
示例3: SetMediaEntry
/// <summary>
/// Set the media entry on the face of the given part.
/// </summary>
/// <param name="part">/param>
/// <param name="face"></param>
/// <param name="me">If null, then the media entry is cleared.</param>
public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
{
// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face);
CheckFaceParam(part, face);
if (null == part.Shape.Media)
{
if (me == null)
return;
else
part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]);
}
lock (part.Shape.Media)
part.Shape.Media[face] = me;
UpdateMediaUrl(part, UUID.Zero);
SetPartMediaFlags(part, face, me != null);
part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
}
示例4: SetRootPartOwner
/// <summary>
/// Set the owner of the root part.
/// </summary>
/// <param name="part"></param>
/// <param name="cAgentID"></param>
/// <param name="cGroupID"></param>
public void SetRootPartOwner(SceneObjectPart part, UUID cAgentID, UUID cGroupID)
{
part.LastOwnerID = part.OwnerID;
part.OwnerID = cAgentID;
part.GroupID = cGroupID;
if (part.OwnerID != cAgentID)
{
// Apply Next Owner Permissions if we're not bypassing permissions
if (!m_scene.Permissions.BypassPermissions())
ApplyNextOwnerPermissions();
}
part.ScheduleFullUpdate();
}
示例5: SetPointLight
/// <summary>
/// Set a light point on a part
/// </summary>
/// FIXME: Much of this code should probably be in SceneObjectGroup
///
/// <param name="part"></param>
/// <param name="light"></param>
/// <param name="color"></param>
/// <param name="intensity"></param>
/// <param name="radius"></param>
/// <param name="falloff"></param>
protected void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff)
{
if (part == null)
return;
if (light)
{
part.Shape.LightEntry = true;
part.Shape.LightColorR = Util.Clip((float)color.x, 0.0f, 1.0f);
part.Shape.LightColorG = Util.Clip((float)color.y, 0.0f, 1.0f);
part.Shape.LightColorB = Util.Clip((float)color.z, 0.0f, 1.0f);
part.Shape.LightIntensity = intensity;
part.Shape.LightRadius = radius;
part.Shape.LightFalloff = falloff;
}
else
{
part.Shape.LightEntry = false;
}
part.ParentGroup.HasGroupChanged = true;
part.ScheduleFullUpdate();
}
示例6: StopSound
private static void StopSound(SceneObjectPart m_host)
{
m_host.AdjustSoundGain(0);
// Xantor 20080528: Clear prim data of sound instead
if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host))
{
if (m_host.ParentGroup.LoopSoundMasterPrim == m_host)
{
foreach (SceneObjectPart part in m_host.ParentGroup.LoopSoundSlavePrims)
{
part.Sound = UUID.Zero;
part.SoundFlags = 1 << 5;
part.SoundRadius = 0;
part.ScheduleFullUpdate();
part.SendFullUpdateToAllClients();
}
m_host.ParentGroup.LoopSoundMasterPrim = null;
m_host.ParentGroup.LoopSoundSlavePrims.Clear();
}
else
{
m_host.Sound = UUID.Zero;
m_host.SoundFlags = 1 << 5;
m_host.SoundRadius = 0;
m_host.ScheduleFullUpdate();
m_host.SendFullUpdateToAllClients();
}
}
else
{
m_host.Sound = UUID.Zero;
m_host.SoundFlags = 1 << 5;
m_host.SoundRadius = 0;
m_host.ScheduleFullUpdate();
m_host.SendFullUpdateToAllClients();
}
}
示例7: PlaybackState
public void PlaybackState(SceneObjectPart part)
{
if (part != null)
{
part.Undoing = true;
if (part.ParentID == 0)
{
if (Position != Vector3.Zero)
{
part.ParentGroup.AbsolutePosition = Position;
}
part.RotationOffset = Rotation;
if (Scale != Vector3.Zero)
{
part.Scale = Scale;
}
lock (part.ParentGroup.Children)
{
foreach (SceneObjectPart child in
part.ParentGroup.Children.Values.Where(child => child.UUID != part.UUID))
{
child.Undo(); //No updates here, child undo will do it on their own
}
}
}
else
{
if (Position != Vector3.Zero)
{
part.OffsetPosition = Position;
}
part.UpdateRotation(Rotation);
if (Scale != Vector3.Zero)
{
part.Resize(Scale);
}
}
part.Undoing = false;
part.ScheduleFullUpdate();
}
}
示例8: SetSlice
private bool SetSlice(SceneObjectPart part, float begin, float end)
{
switch (GetScriptPrimType(part.Shape))
{
case OpenMetaverse.PrimType.Box:
case OpenMetaverse.PrimType.Cylinder:
case OpenMetaverse.PrimType.Prism:
part.Shape.PathBegin = PackBeginCut(begin);
part.Shape.PathEnd = PackEndCut(end);
part.ScheduleFullUpdate();
return true;
default:
return false;
}
}
示例9: SetTaper
private bool SetTaper(SceneObjectPart part, float x, float y)
{
switch (GetScriptPrimType(part.Shape))
{
case OpenMetaverse.PrimType.Box:
case OpenMetaverse.PrimType.Cylinder:
case OpenMetaverse.PrimType.Prism:
part.Shape.PathScaleX = PackTaper(x);
part.Shape.PathScaleY = PackTaper(y);
part.ScheduleFullUpdate();
return true;
case OpenMetaverse.PrimType.Torus:
case OpenMetaverse.PrimType.Tube:
case OpenMetaverse.PrimType.Ring:
part.Shape.PathTaperX = PackSTaper(x);
part.Shape.PathTaperY = PackSTaper(y);
part.ScheduleFullUpdate();
return true;
default:
return false;
}
}
示例10: SetProfilecut
private bool SetProfilecut(SceneObjectPart part, float begin, float end)
{
switch (GetScriptPrimType(part.Shape))
{
case OpenMetaverse.PrimType.Torus:
case OpenMetaverse.PrimType.Tube:
case OpenMetaverse.PrimType.Ring:
part.Shape.ProfileBegin = PackBeginCut(begin);
part.Shape.ProfileEnd = PackEndCut(end);
part.ScheduleFullUpdate();
return true;
default:
return false;
}
}
示例11: SetSkew
private bool SetSkew(SceneObjectPart part, float value)
{
switch (GetScriptPrimType(part.Shape))
{
case OpenMetaverse.PrimType.Torus:
case OpenMetaverse.PrimType.Tube:
case OpenMetaverse.PrimType.Ring:
part.Shape.PathSkew = PackSkew(value);
part.ScheduleFullUpdate();
return true;
default:
return false;
}
}
示例12: SetHollowShape
private bool SetHollowShape(SceneObjectPart part, int value)
{
switch (GetScriptPrimType(part.Shape))
{
default:
part.Shape.HollowShape = (HollowShape)value;
part.ScheduleFullUpdate();
return true;
}
}
示例13: SetHollow
private bool SetHollow(SceneObjectPart part, float value)
{
switch (GetScriptPrimType(part.Shape))
{
default:
part.Shape.ProfileHollow = PackHollow(value);
part.ScheduleFullUpdate();
return true;
}
}
示例14: SetHoleSize
private bool SetHoleSize(SceneObjectPart part, float x, float y)
{
switch (GetScriptPrimType(part.Shape))
{
case OpenMetaverse.PrimType.Torus:
case OpenMetaverse.PrimType.Tube:
case OpenMetaverse.PrimType.Ring:
part.Shape.PathScaleX = PackHoleSize(x);
part.Shape.PathScaleY = PackHoleSize(y);
part.ScheduleFullUpdate();
return true;
default:
return false;
}
}
示例15: SetTextureAnim
private void SetTextureAnim(SceneObjectPart part, int mode, int face, int sizex, int sizey, double start, double length, double rate)
{
Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
pTexAnim.Flags = (Primitive.TextureAnimMode)mode;
//ALL_SIDES
if (face == ScriptBaseClass.ALL_SIDES)
face = 255;
pTexAnim.Face = (uint)face;
pTexAnim.Length = (float)length;
pTexAnim.Rate = (float)rate;
pTexAnim.SizeX = (uint)sizex;
pTexAnim.SizeY = (uint)sizey;
pTexAnim.Start = (float)start;
part.AddTextureAnimation(pTexAnim);
part.ScheduleFullUpdate(PrimUpdateFlags.FindBest);
part.ParentGroup.HasGroupChanged = true;
}