當前位置: 首頁>>代碼示例>>C#>>正文


C# SceneObjectPart.SetSitTarget方法代碼示例

本文整理匯總了C#中OpenSim.Region.Framework.Scenes.SceneObjectPart.SetSitTarget方法的典型用法代碼示例。如果您正苦於以下問題:C# SceneObjectPart.SetSitTarget方法的具體用法?C# SceneObjectPart.SetSitTarget怎麽用?C# SceneObjectPart.SetSitTarget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenSim.Region.Framework.Scenes.SceneObjectPart的用法示例。


在下文中一共展示了SceneObjectPart.SetSitTarget方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: RandomSOP


//.........這裏部分代碼省略.........
                InteractOnFirstClick = true,
                InteractPermissions = MediaPermission.Group,
                WhiteList = new string[] { "ur mamma" },
                Width = 5
            };

            shape.PathBegin = 3;
            shape.PathCurve = 127;
            shape.PathEnd = 10;
            shape.PathRadiusOffset = 127;
            shape.PathRevolutions = 2;
            shape.PathScaleX = 50;
            shape.PathScaleY = 100;
            shape.PathShearX = 33;
            shape.PathShearY = 44;
            shape.PathSkew = 126;
            shape.PathTaperX = 110;
            shape.PathTaperY = 66;
            shape.PathTwist = 99;
            shape.PathTwistBegin = 3;
            shape.PCode = 3;
            shape.PreferredPhysicsShape = PhysicsShapeType.Prim;
            shape.ProfileBegin = 77;
            shape.ProfileCurve = 5;
            shape.ProfileEnd = 7;
            shape.ProfileHollow = 9;
            shape.ProfileShape = OpenSim.Framework.ProfileShape.IsometricTriangle;
            shape.ProjectionAmbiance = 0.1f;
            shape.ProjectionEntry = true;
            shape.ProjectionFocus = 3.4f;
            shape.ProjectionFOV = 4.0f;
            shape.ProjectionTextureUUID = UUID.Random();
            shape.Scale = Util.RandomVector();
            shape.SculptEntry = true;
            shape.SculptTexture = UUID.Random();
            shape.SculptType = 40;
            shape.VertexCount = 1;
            shape.HighLODBytes = 2;
            shape.MidLODBytes = 3;
            shape.LowLODBytes = 4;
            shape.LowestLODBytes = 5;

            SceneObjectPart part = new SceneObjectPart(UUID.Zero, shape, new Vector3(1, 2, 3), new Quaternion(4, 5, 6, 7), Vector3.Zero, false);
            part.Name = name;
            part.Description = "Desc";
            part.AngularVelocity = Util.RandomVector();
            part.BaseMask = 0x0876;
            part.Category = 10;
            part.ClickAction = 5;
            part.CollisionSound = UUID.Random();
            part.CollisionSoundVolume = 1.1f;
            part.CreationDate = OpenSim.Framework.Util.UnixTimeSinceEpoch();
            part.CreatorID = UUID.Random();
            part.EveryoneMask = 0x0543;
            part.Flags = PrimFlags.CameraSource | PrimFlags.DieAtEdge;
            part.GroupID = UUID.Random();
            part.GroupMask = 0x0210;
            part.LastOwnerID = UUID.Random();
            part.LinkNum = 4;
            part.LocalId = localId;
            part.Material = 0x1;
            part.MediaUrl = "http://bam";
            part.NextOwnerMask = 0x0234;
            part.CreatorID = UUID.Random();
            part.ObjectFlags = 10101;
            part.OwnerID = UUID.Random();
            part.OwnerMask = 0x0567;
            part.OwnershipCost = 5;
            part.ParentID = 0202;
            part.ParticleSystem = new byte[] { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, };
            part.PassTouches = true;
            part.PhysicalAngularVelocity = Util.RandomVector();
            part.RegionHandle = 1234567;
            part.RegionID = UUID.Random();
            part.RotationOffset = Util.RandomQuat();
            part.SalePrice = 42;
            part.SavedAttachmentPoint = 6;
            part.SavedAttachmentPos = Util.RandomVector();
            part.SavedAttachmentRot = Util.RandomQuat();
            part.ScriptAccessPin = 87654;
            part.SerializedPhysicsData = new byte[] { 0xA, 0xB, 0xC, 0xD, 0xE, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, };
            part.ServerWeight = 3.0f;
            part.StreamingCost = 2.0f;
            part.SitName = "Sitting";
            part.Sound = UUID.Random();
            part.SoundGain = 3.4f;
            part.SoundOptions = 9;
            part.SoundRadius = 10.3f;
            part.Text = "Test";
            part.TextColor = System.Drawing.Color.FromArgb(1, 2, 3, 4);
            part.TextureAnimation = new byte[] { 0xA, 0xB, 0xC, 0xD, 0xE, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0xD };
            part.TouchName = "DoIt";
            part.UUID = UUID.Random();
            part.Velocity = Util.RandomVector();
            part.FromItemID = UUID.Random();

            part.SetSitTarget(Util.RandomVector(), Util.RandomQuat());

            return part;
        }
開發者ID:kf6kjg,項目名稱:halcyon,代碼行數:101,代碼來源:Util.cs

示例2: RandomSOP

        public static SceneObjectPart RandomSOP(string name, uint localId)
        {
            OpenSim.Framework.PrimitiveBaseShape shape = MockPrmitiveBaseShape();

            SceneObjectPart part = new SceneObjectPart(UUID.Zero, shape, new Vector3(1, 2, 3), new Quaternion(4, 5, 6, 7), Vector3.Zero, false);
            part.Name = name;
            part.Description = "Desc";
            part.AngularVelocity = SceneUtil.RandomVector();
            part.BaseMask = 0x0876;
            part.Category = 10;
            part.ClickAction = 5;
            part.CollisionSound = UUID.Random();
            part.CollisionSoundVolume = 1.1f;
            part.CreationDate = OpenSim.Framework.Util.UnixTimeSinceEpoch();
            part.CreatorID = UUID.Random();
            part.EveryoneMask = 0x0543;
            part.Flags = PrimFlags.CameraSource | PrimFlags.DieAtEdge;
            part.GroupID = UUID.Random();
            part.GroupMask = 0x0210;
            part.LastOwnerID = UUID.Random();
            part.LinkNum = 4;
            part.LocalId = localId;
            part.Material = 0x1;
            part.MediaUrl = "http://bam";
            part.NextOwnerMask = 0x0234;
            part.CreatorID = UUID.Random();
            part.ObjectFlags = 10101;
            part.OwnerID = UUID.Random();
            part.OwnerMask = 0x0567;
            part.OwnershipCost = 5;
            part.ParentID = 0202;
            part.ParticleSystem = new byte[] { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, };
            part.PassTouches = true;
            part.PhysicalAngularVelocity = SceneUtil.RandomVector();
            part.RegionHandle = 1234567;
            part.RegionID = UUID.Random();
            part.RotationOffset = SceneUtil.RandomQuat();
            part.SalePrice = 42;
            part.SavedAttachmentPoint = 6;
            part.SavedAttachmentPos = SceneUtil.RandomVector();
            part.SavedAttachmentRot = SceneUtil.RandomQuat();
            part.ScriptAccessPin = 87654;
            part.SerializedPhysicsData = new byte[] { 0xA, 0xB, 0xC, 0xD, 0xE, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, };
            part.ServerWeight = 3.0f;
            part.StreamingCost = 2.0f;
            part.SitName = "Sitting";
            part.Sound = UUID.Random();
            part.SoundGain = 3.4f;
            part.SoundOptions = 9;
            part.SoundRadius = 10.3f;
            part.Text = "Test";
            part.TextColor = System.Drawing.Color.FromArgb(1, 2, 3, 4);
            part.TextureAnimation = new byte[] { 0xA, 0xB, 0xC, 0xD, 0xE, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0xD };
            part.TouchName = "DoIt";
            part.UUID = UUID.Random();
            part.Velocity = SceneUtil.RandomVector();
            part.FromItemID = UUID.Random();

            part.SetSitTarget(SceneUtil.RandomVector(), SceneUtil.RandomQuat());

            return part;
        }
開發者ID:kf6kjg,項目名稱:halcyon,代碼行數:62,代碼來源:SceneUtil.cs


注:本文中的OpenSim.Region.Framework.Scenes.SceneObjectPart.SetSitTarget方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。