本文整理汇总了C#中OpenSim.Region.Framework.Scenes.SceneObjectPart.GetForceMouselook方法的典型用法代码示例。如果您正苦于以下问题:C# SceneObjectPart.GetForceMouselook方法的具体用法?C# SceneObjectPart.GetForceMouselook怎么用?C# SceneObjectPart.GetForceMouselook使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Region.Framework.Scenes.SceneObjectPart
的用法示例。
在下文中一共展示了SceneObjectPart.GetForceMouselook方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreatePrimParameters
//.........这里部分代码省略.........
parameters.Add(_Database.CreateParameter("PositionY", prim.OffsetPosition.Y));
parameters.Add(_Database.CreateParameter("PositionZ", prim.OffsetPosition.Z));
parameters.Add(_Database.CreateParameter("GroupPositionX", prim.GroupPosition.X));
parameters.Add(_Database.CreateParameter("GroupPositionY", prim.GroupPosition.Y));
parameters.Add(_Database.CreateParameter("GroupPositionZ", prim.GroupPosition.Z));
parameters.Add(_Database.CreateParameter("VelocityX", prim.Velocity.X));
parameters.Add(_Database.CreateParameter("VelocityY", prim.Velocity.Y));
parameters.Add(_Database.CreateParameter("VelocityZ", prim.Velocity.Z));
parameters.Add(_Database.CreateParameter("AngularVelocityX", prim.AngularVelocity.X));
parameters.Add(_Database.CreateParameter("AngularVelocityY", prim.AngularVelocity.Y));
parameters.Add(_Database.CreateParameter("AngularVelocityZ", prim.AngularVelocity.Z));
parameters.Add(_Database.CreateParameter("AccelerationX", prim.Acceleration.X));
parameters.Add(_Database.CreateParameter("AccelerationY", prim.Acceleration.Y));
parameters.Add(_Database.CreateParameter("AccelerationZ", prim.Acceleration.Z));
// quaternions
parameters.Add(_Database.CreateParameter("RotationX", prim.RotationOffset.X));
parameters.Add(_Database.CreateParameter("RotationY", prim.RotationOffset.Y));
parameters.Add(_Database.CreateParameter("RotationZ", prim.RotationOffset.Z));
parameters.Add(_Database.CreateParameter("RotationW", prim.RotationOffset.W));
// Sit target
Vector3 sitTargetPos = prim.SitTargetPositionLL;
parameters.Add(_Database.CreateParameter("SitTargetOffsetX", sitTargetPos.X));
parameters.Add(_Database.CreateParameter("SitTargetOffsetY", sitTargetPos.Y));
parameters.Add(_Database.CreateParameter("SitTargetOffsetZ", sitTargetPos.Z));
Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
parameters.Add(_Database.CreateParameter("SitTargetOrientW", sitTargetOrient.W));
parameters.Add(_Database.CreateParameter("SitTargetOrientX", sitTargetOrient.X));
parameters.Add(_Database.CreateParameter("SitTargetOrientY", sitTargetOrient.Y));
parameters.Add(_Database.CreateParameter("SitTargetOrientZ", sitTargetOrient.Z));
parameters.Add(_Database.CreateParameter("PayPrice", prim.PayPrice[0]));
parameters.Add(_Database.CreateParameter("PayButton1", prim.PayPrice[1]));
parameters.Add(_Database.CreateParameter("PayButton2", prim.PayPrice[2]));
parameters.Add(_Database.CreateParameter("PayButton3", prim.PayPrice[3]));
parameters.Add(_Database.CreateParameter("PayButton4", prim.PayPrice[4]));
if ((prim.SoundFlags & 1) != 0) // Looped
{
parameters.Add(_Database.CreateParameter("LoopedSound", prim.Sound));
parameters.Add(_Database.CreateParameter("LoopedSoundGain", prim.SoundGain));
}
else
{
parameters.Add(_Database.CreateParameter("LoopedSound", UUID.Zero));
parameters.Add(_Database.CreateParameter("LoopedSoundGain", 0.0f));
}
parameters.Add(_Database.CreateParameter("TextureAnimation", prim.TextureAnimation));
parameters.Add(_Database.CreateParameter("ParticleSystem", prim.ParticleSystem));
parameters.Add(_Database.CreateParameter("OmegaX", prim.AngularVelocity.X));
parameters.Add(_Database.CreateParameter("OmegaY", prim.AngularVelocity.Y));
parameters.Add(_Database.CreateParameter("OmegaZ", prim.AngularVelocity.Z));
parameters.Add(_Database.CreateParameter("CameraEyeOffsetX", prim.GetCameraEyeOffset().X));
parameters.Add(_Database.CreateParameter("CameraEyeOffsetY", prim.GetCameraEyeOffset().Y));
parameters.Add(_Database.CreateParameter("CameraEyeOffsetZ", prim.GetCameraEyeOffset().Z));
parameters.Add(_Database.CreateParameter("CameraAtOffsetX", prim.GetCameraAtOffset().X));
parameters.Add(_Database.CreateParameter("CameraAtOffsetY", prim.GetCameraAtOffset().Y));
parameters.Add(_Database.CreateParameter("CameraAtOffsetZ", prim.GetCameraAtOffset().Z));
if (prim.GetForceMouselook())
parameters.Add(_Database.CreateParameter("ForceMouselook", 1));
else
parameters.Add(_Database.CreateParameter("ForceMouselook", 0));
parameters.Add(_Database.CreateParameter("ScriptAccessPin", prim.ScriptAccessPin));
if (prim.AllowedDrop)
parameters.Add(_Database.CreateParameter("AllowedDrop", 1));
else
parameters.Add(_Database.CreateParameter("AllowedDrop", 0));
if (prim.DIE_AT_EDGE)
parameters.Add(_Database.CreateParameter("DieAtEdge", 1));
else
parameters.Add(_Database.CreateParameter("DieAtEdge", 0));
parameters.Add(_Database.CreateParameter("SalePrice", prim.SalePrice));
parameters.Add(_Database.CreateParameter("SaleType", prim.ObjectSaleType));
byte clickAction = prim.ClickAction;
parameters.Add(_Database.CreateParameter("ClickAction", clickAction));
parameters.Add(_Database.CreateParameter("Material", prim.Material));
parameters.Add(_Database.CreateParameter("CollisionSound", prim.CollisionSound));
parameters.Add(_Database.CreateParameter("CollisionSoundVolume", prim.CollisionSoundVolume));
if (prim.PassTouches)
parameters.Add(_Database.CreateParameter("PassTouches", 1));
else
parameters.Add(_Database.CreateParameter("PassTouches", 0));
parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
return parameters.ToArray();
}
示例2: FillPrimCommand
//.........这里部分代码省略.........
cmd.Parameters.AddWithValue("PositionX", (double)prim.OffsetPosition.X);
cmd.Parameters.AddWithValue("PositionY", (double)prim.OffsetPosition.Y);
cmd.Parameters.AddWithValue("PositionZ", (double)prim.OffsetPosition.Z);
cmd.Parameters.AddWithValue("GroupPositionX", (double)prim.GroupPosition.X);
cmd.Parameters.AddWithValue("GroupPositionY", (double)prim.GroupPosition.Y);
cmd.Parameters.AddWithValue("GroupPositionZ", (double)prim.GroupPosition.Z);
cmd.Parameters.AddWithValue("VelocityX", (double)prim.Velocity.X);
cmd.Parameters.AddWithValue("VelocityY", (double)prim.Velocity.Y);
cmd.Parameters.AddWithValue("VelocityZ", (double)prim.Velocity.Z);
cmd.Parameters.AddWithValue("AngularVelocityX", (double)prim.AngularVelocity.X);
cmd.Parameters.AddWithValue("AngularVelocityY", (double)prim.AngularVelocity.Y);
cmd.Parameters.AddWithValue("AngularVelocityZ", (double)prim.AngularVelocity.Z);
cmd.Parameters.AddWithValue("AccelerationX", (double)prim.Acceleration.X);
cmd.Parameters.AddWithValue("AccelerationY", (double)prim.Acceleration.Y);
cmd.Parameters.AddWithValue("AccelerationZ", (double)prim.Acceleration.Z);
// quaternions
cmd.Parameters.AddWithValue("RotationX", (double)prim.RotationOffset.X);
cmd.Parameters.AddWithValue("RotationY", (double)prim.RotationOffset.Y);
cmd.Parameters.AddWithValue("RotationZ", (double)prim.RotationOffset.Z);
cmd.Parameters.AddWithValue("RotationW", (double)prim.RotationOffset.W);
// Sit target
Vector3 sitTargetPos = prim.SitTargetPositionLL;
cmd.Parameters.AddWithValue("SitTargetOffsetX", (double)sitTargetPos.X);
cmd.Parameters.AddWithValue("SitTargetOffsetY", (double)sitTargetPos.Y);
cmd.Parameters.AddWithValue("SitTargetOffsetZ", (double)sitTargetPos.Z);
Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
cmd.Parameters.AddWithValue("SitTargetOrientW", (double)sitTargetOrient.W);
cmd.Parameters.AddWithValue("SitTargetOrientX", (double)sitTargetOrient.X);
cmd.Parameters.AddWithValue("SitTargetOrientY", (double)sitTargetOrient.Y);
cmd.Parameters.AddWithValue("SitTargetOrientZ", (double)sitTargetOrient.Z);
cmd.Parameters.AddWithValue("PayPrice", prim.PayPrice[0]);
cmd.Parameters.AddWithValue("PayButton1", prim.PayPrice[1]);
cmd.Parameters.AddWithValue("PayButton2", prim.PayPrice[2]);
cmd.Parameters.AddWithValue("PayButton3", prim.PayPrice[3]);
cmd.Parameters.AddWithValue("PayButton4", prim.PayPrice[4]);
if ((prim.SoundFlags & 1) != 0) // Looped
{
cmd.Parameters.AddWithValue("LoopedSound", prim.Sound.ToString());
cmd.Parameters.AddWithValue("LoopedSoundGain", prim.SoundGain);
}
else
{
cmd.Parameters.AddWithValue("LoopedSound", UUID.Zero);
cmd.Parameters.AddWithValue("LoopedSoundGain", 0.0f);
}
cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation);
cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem);
cmd.Parameters.AddWithValue("OmegaX", (double)prim.RotationalVelocity.X);
cmd.Parameters.AddWithValue("OmegaY", (double)prim.RotationalVelocity.Y);
cmd.Parameters.AddWithValue("OmegaZ", (double)prim.RotationalVelocity.Z);
cmd.Parameters.AddWithValue("CameraEyeOffsetX", (double)prim.GetCameraEyeOffset().X);
cmd.Parameters.AddWithValue("CameraEyeOffsetY", (double)prim.GetCameraEyeOffset().Y);
cmd.Parameters.AddWithValue("CameraEyeOffsetZ", (double)prim.GetCameraEyeOffset().Z);
cmd.Parameters.AddWithValue("CameraAtOffsetX", (double)prim.GetCameraAtOffset().X);
cmd.Parameters.AddWithValue("CameraAtOffsetY", (double)prim.GetCameraAtOffset().Y);
cmd.Parameters.AddWithValue("CameraAtOffsetZ", (double)prim.GetCameraAtOffset().Z);
if (prim.GetForceMouselook())
cmd.Parameters.AddWithValue("ForceMouselook", 1);
else
cmd.Parameters.AddWithValue("ForceMouselook", 0);
cmd.Parameters.AddWithValue("ScriptAccessPin", prim.ScriptAccessPin);
if (prim.AllowedDrop)
cmd.Parameters.AddWithValue("AllowedDrop", 1);
else
cmd.Parameters.AddWithValue("AllowedDrop", 0);
if (prim.DIE_AT_EDGE)
cmd.Parameters.AddWithValue("DieAtEdge", 1);
else
cmd.Parameters.AddWithValue("DieAtEdge", 0);
cmd.Parameters.AddWithValue("SalePrice", prim.SalePrice);
cmd.Parameters.AddWithValue("SaleType", Convert.ToInt16(prim.ObjectSaleType));
byte clickAction = prim.ClickAction;
cmd.Parameters.AddWithValue("ClickAction", clickAction);
cmd.Parameters.AddWithValue("Material", prim.Material);
cmd.Parameters.AddWithValue("CollisionSound", prim.CollisionSound.ToString());
cmd.Parameters.AddWithValue("CollisionSoundVolume", prim.CollisionSoundVolume);
if (prim.PassTouches)
cmd.Parameters.AddWithValue("PassTouches", 1);
else
cmd.Parameters.AddWithValue("PassTouches", 0);
cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
}
示例3: fillPrimRow
//.........这里部分代码省略.........
row["GroupPositionY"] = prim.GroupPosition.Y;
row["GroupPositionZ"] = prim.GroupPosition.Z;
row["VelocityX"] = prim.Velocity.X;
row["VelocityY"] = prim.Velocity.Y;
row["VelocityZ"] = prim.Velocity.Z;
row["AngularVelocityX"] = prim.AngularVelocity.X;
row["AngularVelocityY"] = prim.AngularVelocity.Y;
row["AngularVelocityZ"] = prim.AngularVelocity.Z;
row["AccelerationX"] = prim.Acceleration.X;
row["AccelerationY"] = prim.Acceleration.Y;
row["AccelerationZ"] = prim.Acceleration.Z;
// quaternions
row["RotationX"] = prim.RotationOffset.X;
row["RotationY"] = prim.RotationOffset.Y;
row["RotationZ"] = prim.RotationOffset.Z;
row["RotationW"] = prim.RotationOffset.W;
// Sit target
Vector3 sitTargetPos = prim.SitTargetPositionLL;
row["SitTargetOffsetX"] = sitTargetPos.X;
row["SitTargetOffsetY"] = sitTargetPos.Y;
row["SitTargetOffsetZ"] = sitTargetPos.Z;
Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
row["SitTargetOrientW"] = sitTargetOrient.W;
row["SitTargetOrientX"] = sitTargetOrient.X;
row["SitTargetOrientY"] = sitTargetOrient.Y;
row["SitTargetOrientZ"] = sitTargetOrient.Z;
row["ColorR"] = Convert.ToInt32(prim.Color.R);
row["ColorG"] = Convert.ToInt32(prim.Color.G);
row["ColorB"] = Convert.ToInt32(prim.Color.B);
row["ColorA"] = Convert.ToInt32(prim.Color.A);
row["PayPrice"] = prim.PayPrice[0];
row["PayButton1"] = prim.PayPrice[1];
row["PayButton2"] = prim.PayPrice[2];
row["PayButton3"] = prim.PayPrice[3];
row["PayButton4"] = prim.PayPrice[4];
row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation);
row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem);
row["OmegaX"] = prim.AngularVelocity.X;
row["OmegaY"] = prim.AngularVelocity.Y;
row["OmegaZ"] = prim.AngularVelocity.Z;
row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X;
row["CameraEyeOffsetY"] = prim.GetCameraEyeOffset().Y;
row["CameraEyeOffsetZ"] = prim.GetCameraEyeOffset().Z;
row["CameraAtOffsetX"] = prim.GetCameraAtOffset().X;
row["CameraAtOffsetY"] = prim.GetCameraAtOffset().Y;
row["CameraAtOffsetZ"] = prim.GetCameraAtOffset().Z;
if ((prim.SoundFlags & 1) != 0) // Looped
{
row["LoopedSound"] = prim.Sound.ToString();
row["LoopedSoundGain"] = prim.SoundGain;
}
else
{
row["LoopedSound"] = UUID.Zero.ToString();
row["LoopedSoundGain"] = 0.0f;
}
if (prim.GetForceMouselook())
row["ForceMouselook"] = 1;
else
row["ForceMouselook"] = 0;
row["ScriptAccessPin"] = prim.ScriptAccessPin;
if (prim.AllowedDrop)
row["AllowedDrop"] = 1;
else
row["AllowedDrop"] = 0;
if (prim.DIE_AT_EDGE)
row["DieAtEdge"] = 1;
else
row["DieAtEdge"] = 0;
row["SalePrice"] = prim.SalePrice;
row["SaleType"] = Convert.ToInt16(prim.ObjectSaleType);
// click action
row["ClickAction"] = prim.ClickAction;
row["SalePrice"] = prim.SalePrice;
row["Material"] = prim.Material;
row["CollisionSound"] = prim.CollisionSound.ToString();
row["CollisionSoundVolume"] = prim.CollisionSoundVolume;
if (prim.VolumeDetectActive)
row["VolumeDetect"] = 1;
else
row["VolumeDetect"] = 0;
row["MediaURL"] = prim.MediaUrl;
}
示例4: ContinueSitAsRootAgent
private void ContinueSitAsRootAgent(IClientAPI client, SceneObjectPart part, Vector3 offset)
{
Vector3 pos = new Vector3();
Quaternion sitOrientation = Quaternion.Identity;
Vector3 cameraEyeOffset = Vector3.Zero;
Vector3 cameraAtOffset = Vector3.Zero;
bool forceMouselook = false;
DumpDebug("ContinueSitAsRootAgent", "n/a");
if (part != null)
{
lock (m_posInfo)
{
part.SitTargetAvatar = client.AgentId;
sitOrientation = part.SitTargetOrientation;
pos = part.AbsolutePosition + offset;
cameraAtOffset = part.GetCameraAtOffset();
cameraEyeOffset = part.GetCameraEyeOffset();
forceMouselook = part.GetForceMouselook();
m_requestedSitTargetUUID = part.UUID;
m_requestedSitTargetID = part.LocalId;
Vector3 sitTargetPos = part.SitTargetPosition;
Quaternion sitTargetOrient = part.SitTargetOrientation;
Vector3 newPos = sitTargetPos;
newPos += m_sitTargetCorrectionOffset;
m_bodyRot = sitTargetOrient;
//Rotation = sitTargetOrient;
SetAgentPositionInfo(true, newPos, part, part.AbsolutePosition, Vector3.Zero);
}
//m_animPersistUntil = 0; // abort any timed animation
// Avatar has arrived on prim
int avatarsRemainingOnPrim = part.ParentGroup.RidingAvatarArrivedFromOtherSim();
if (avatarsRemainingOnPrim > 0)
{
m_log.InfoFormat("[SCENE PRESENCE]: {0} Recognizing incoming avatar {1} seated on {2} ({3} remain)",
Scene.RegionInfo.RegionName, this.UUID.ToString(), part.ParentGroup.Name, part.ParentGroup.AvatarsToExpect);
}
m_scene.EventManager.TriggerOnCrossedAvatarReady(part, this.UUID);
//mitigation for client not getting the required immediate update for crossing objects
//part.ParentGroup.SendFullUpdateToClientImmediate(this.ControllingClient);
// Trigger any remaining events that rely on the avatar being present.
if (!part.ParentGroup.IsAttachment)
if (avatarsRemainingOnPrim == 0)
part.ParentGroup.TriggerScriptChangedEvent(Changed.REGION);
}
else
{
m_log.ErrorFormat("[SCENE PRESENCE]: ContinueSitAsRootAgent could not find seated prim {0} for agent {1}", part.UUID.ToString(), client.AgentId.ToString());
}
}