本文整理汇总了C#中libsecondlife.LLVector3.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# LLVector3.ToString方法的具体用法?C# LLVector3.ToString怎么用?C# LLVector3.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsecondlife.LLVector3
的用法示例。
在下文中一共展示了LLVector3.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObjectUpdateHandler
public void ObjectUpdateHandler(Packet packet, Simulator simulator)
{
uint id = 0;
LLUUID uuid = null;
if (WaitingOnUpdate)
{
CurrentPrimMutex.WaitOne();
foreach (Block block in packet.Blocks())
{
foreach (Field field in block.Fields)
{
if (field.Layout.Name == "ID")
{
id = (uint)field.Data;
}
else if (field.Layout.Name == "FullID")
{
uuid = (LLUUID)field.Data;
}
else if (field.Layout.Name == "ObjectData")
{
byte[] byteArray = (byte[])field.Data;
LLVector3 position = new LLVector3(byteArray, 0);
if (CurrentPrim != null && position != CurrentPrim.Position)
{
txtLog.AppendText(position.ToString() + " doesn't match CurrentPrim.Position " +
CurrentPrim.Position.ToString() + "\n"/* + ", ignoring"*/);
//return;
}
}
}
}
CurrentPrim.ID = id;
CurrentPrim.UUID = uuid;
WaitingOnUpdate = false;
CurrentPrimMutex.ReleaseMutex();
}
}
示例2: VectorQuaternionMath
public void VectorQuaternionMath()
{
// Convert a vector to a quaternion and back
LLVector3 a = new LLVector3(1f, 0.5f, 0.75f);
LLQuaternion b = a.ToQuaternion();
LLVector3 c;
b.GetEulerAngles(out c.X, out c.Y, out c.Z);
Assert.IsTrue(a == c, c.ToString() + " does not equal " + a.ToString());
}
示例3: Self_OnInstantMessage
private void Self_OnInstantMessage(LLUUID fromAgentID, string fromAgentName, LLUUID toAgentID,
uint parentEstateID, LLUUID regionID, LLVector3 position, MainAvatar.InstantMessageDialog dialog,
bool groupIM, LLUUID imSessionID, DateTime timestamp, string message,
MainAvatar.InstantMessageOnline offline, byte[] binaryBucket)
{
if (MasterKey != LLUUID.Zero)
{
if (fromAgentID != MasterKey)
{
// Received an IM from someone that is not the bot's master, ignore
Console.WriteLine("<IM>" + fromAgentName + " (not master): " + message + "@" + regionID.ToString() + ":" + position.ToString() );
return;
}
}
else
{
if (GroupMembers != null && !GroupMembers.ContainsKey(fromAgentID))
{
// Received an IM from someone outside the bot's group, ignore
Console.WriteLine("<IM>" + fromAgentName + " (not in group): " + message + "@" + regionID.ToString() + ":" + position.ToString());
return;
}
}
Console.WriteLine("<IM>" + fromAgentName + ": " + message);
if (dialog == MainAvatar.InstantMessageDialog.RequestTeleport)
{
Console.WriteLine("Accepting teleport lure.");
Self.TeleportLureRespond(fromAgentID, true);
}
else
{
if (dialog == MainAvatar.InstantMessageDialog.InventoryOffered)
{
Console.WriteLine("Accepting inventory offer.");
Self.InstantMessage(Self.FirstName + " " + Self.LastName, fromAgentID, String.Empty,
imSessionID, MainAvatar.InstantMessageDialog.InventoryAccepted,
MainAvatar.InstantMessageOnline.Offline, Self.Position, LLUUID.Zero,
Self.InventoryRootFolderUUID.GetBytes());
}
else
{
DoCommand(message, fromAgentID, imSessionID);
}
}
}
示例4: Self_OnInstantMessage
private void Self_OnInstantMessage(LLUUID fromAgentID, string fromAgentName, LLUUID toAgentID, uint parentEstateID,
LLUUID regionID, LLVector3 position, byte dialog, bool groupIM, LLUUID imSessionID, DateTime timestamp,
string message, byte offline, byte[] binaryBucket)
{
if (Master.Length > 0)
{
if (fromAgentName.ToLower().Trim() != Master.ToLower().Trim())
{
// Received an IM from someone that is not the bot's master, ignore
Console.WriteLine("<IM>" + fromAgentName + " (not master): " + message + "@" + regionID.ToString() + ":" + position.ToString() );
return;
}
}
else
{
if (GroupMembers != null && !GroupMembers.ContainsKey(fromAgentID))
{
// Received an IM from someone outside the bot's group, ignore
Console.WriteLine("<IM>" + fromAgentName + " (not in group): " + message + "@" + regionID.ToString() + ":" + position.ToString());
return;
}
}
Console.WriteLine("<IM>" + fromAgentName + ": " + message);
if (Self.ID == toAgentID)
{
if (dialog == 22)
{
Console.WriteLine("Accepting teleport lure");
Self.TeleportLureRespond(fromAgentID, true);
}
else
{
DoCommand(message, fromAgentID, imSessionID);
}
}
else
{
// This shouldn't happen
Console.WriteLine("A bot that we aren't tracking received an IM?");
}
}