本文整理汇总了C#中SceneObjectPart.DefaultPhysicsShapeType方法的典型用法代码示例。如果您正苦于以下问题:C# SceneObjectPart.DefaultPhysicsShapeType方法的具体用法?C# SceneObjectPart.DefaultPhysicsShapeType怎么用?C# SceneObjectPart.DefaultPhysicsShapeType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneObjectPart
的用法示例。
在下文中一共展示了SceneObjectPart.DefaultPhysicsShapeType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SOPToXml2
//.........这里部分代码省略.........
WriteUUID(writer, "FolderID", sop.FolderID, options);
writer.WriteElementString("InventorySerial", sop.InventorySerial.ToString());
WriteTaskInventory(writer, sop.TaskInventory, options, sop.ParentGroup.Scene);
WriteUUID(writer, "UUID", sop.UUID, options);
writer.WriteElementString("LocalId", sop.LocalId.ToString());
writer.WriteElementString("Name", sop.Name);
writer.WriteElementString("Material", sop.Material.ToString());
writer.WriteElementString("PassTouches", sop.PassTouches.ToString().ToLower());
writer.WriteElementString("PassCollisions", sop.PassCollisions.ToString().ToLower());
writer.WriteElementString("RegionHandle", sop.RegionHandle.ToString());
writer.WriteElementString("ScriptAccessPin", sop.ScriptAccessPin.ToString());
WriteVector(writer, "GroupPosition", sop.GroupPosition);
WriteVector(writer, "OffsetPosition", sop.OffsetPosition);
WriteQuaternion(writer, "RotationOffset", sop.RotationOffset);
WriteVector(writer, "Velocity", sop.Velocity);
WriteVector(writer, "AngularVelocity", sop.AngularVelocity);
WriteVector(writer, "Acceleration", sop.Acceleration);
writer.WriteElementString("Description", sop.Description);
writer.WriteStartElement("Color");
writer.WriteElementString("R", sop.Color.R.ToString(Utils.EnUsCulture));
writer.WriteElementString("G", sop.Color.G.ToString(Utils.EnUsCulture));
writer.WriteElementString("B", sop.Color.B.ToString(Utils.EnUsCulture));
writer.WriteElementString("A", sop.Color.A.ToString(Utils.EnUsCulture));
writer.WriteEndElement();
writer.WriteElementString("Text", sop.Text);
writer.WriteElementString("SitName", sop.SitName);
writer.WriteElementString("TouchName", sop.TouchName);
writer.WriteElementString("LinkNum", sop.LinkNum.ToString());
writer.WriteElementString("ClickAction", sop.ClickAction.ToString());
WriteShape(writer, sop.Shape, options);
WriteVector(writer, "Scale", sop.Scale);
WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation);
WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition);
WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL);
WriteQuaternion(writer, "SitTargetOrientationLL", sop.SitTargetOrientationLL);
writer.WriteElementString("ParentID", sop.ParentID.ToString());
writer.WriteElementString("CreationDate", sop.CreationDate.ToString());
writer.WriteElementString("Category", sop.Category.ToString());
writer.WriteElementString("SalePrice", sop.SalePrice.ToString());
writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString());
writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString());
UUID groupID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.GroupID;
WriteUUID(writer, "GroupID", groupID, options);
UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.OwnerID;
WriteUUID(writer, "OwnerID", ownerID, options);
UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.LastOwnerID;
WriteUUID(writer, "LastOwnerID", lastOwnerID, options);
writer.WriteElementString("BaseMask", sop.BaseMask.ToString());
writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString());
writer.WriteElementString("GroupMask", sop.GroupMask.ToString());
writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString());
writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString());
WriteFlags(writer, "Flags", sop.Flags.ToString(), options);
WriteUUID(writer, "CollisionSound", sop.CollisionSound, options);
writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());
if (sop.MediaUrl != null)
writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
WriteVector(writer, "AttachedPos", sop.AttachedPos);
if (sop.DynAttrs.CountNamespaces > 0)
{
writer.WriteStartElement("DynAttrs");
sop.DynAttrs.WriteXml(writer);
writer.WriteEndElement();
}
WriteBytes(writer, "TextureAnimation", sop.TextureAnimation);
WriteBytes(writer, "ParticleSystem", sop.ParticleSystem);
writer.WriteElementString("PayPrice0", sop.PayPrice[0].ToString());
writer.WriteElementString("PayPrice1", sop.PayPrice[1].ToString());
writer.WriteElementString("PayPrice2", sop.PayPrice[2].ToString());
writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString());
writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString());
if(sop.PhysicsShapeType != sop.DefaultPhysicsShapeType())
writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower());
if (sop.Density != 1000.0f)
writer.WriteElementString("Density", sop.Density.ToString().ToLower());
if (sop.Friction != 0.6f)
writer.WriteElementString("Friction", sop.Friction.ToString().ToLower());
if (sop.Restitution != 0.5f)
writer.WriteElementString("Bounce", sop.Restitution.ToString().ToLower());
if (sop.GravityModifier != 1.0f)
writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower());
writer.WriteEndElement();
}