• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# AttachmentPoint类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AttachmentPoint的典型用法代码示例。如果您正苦于以下问题:C# AttachmentPoint类的具体用法?C# AttachmentPoint怎么用?C# AttachmentPoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AttachmentPoint类属于命名空间,在下文中一共展示了AttachmentPoint类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MyText

 public MyText(Point3d pt3, string cont, double th, Database db, AttachmentPoint ap)
 {
     this.SetDatabaseDefaults();
     this.Location = pt3;
     this.Contents = cont;
     this.TextStyleId = db.Textstyle;
     this.TextHeight = th;
     this.Attachment = ap;
 }
开发者ID:koryun08,项目名称:AutoCAD-CSharp-plug-in1,代码行数:9,代码来源:TypeViewerForm.xaml.cs


示例2: Attachment

 public Attachment(AttachmentPoint attachmentPoint, PixelFormat pixelFormat, PixelInternalFormat pixelInternalFormat, PixelType pixelType, int index = 0, bool mipmaps = false)
 {
     AttachmentPoint = attachmentPoint;
     PixelFormat = pixelFormat;
     PixelInternalFormat = pixelInternalFormat;
     PixelType = pixelType;
     Index = index;
     MipMaps = mipmaps;
 }
开发者ID:johang88,项目名称:triton,代码行数:9,代码来源:Definition.cs


示例3: MText

 public static MText MText(Point3d pt3, string cont, double th, Database db, AttachmentPoint ap)
 {
     MText mt = new MText();
     mt.SetDatabaseDefaults();
     mt.Location = pt3;
     mt.Contents = cont;
     mt.TextStyleId = db.Textstyle;
     mt.TextHeight = th;
     mt.Attachment = ap;
     return mt;
 }
开发者ID:koryun08,项目名称:AutoCAD-CSharp-plug-in1,代码行数:11,代码来源:Service.cs


示例4: GetInternalReports

 public ReportList GetInternalReports(AttachmentPoint point, Visibility visibility)
 {
     List<Report> reports = new List<Report>();
     foreach (Report report in Reports)
     {
         if (!report.HasFlag(Flag.Internal)) continue;
         if (report.AttachmentPoint != point) continue;
         bool visible = report.Visibility == visibility;
         visible = visible || Visibility.All == report.Visibility;
         if (!visible) continue;
         reports.Add(report);
     }
     return reports;
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:14,代码来源:ReportService.cs


示例5: InitPrintButton

        private void InitPrintButton(AttachmentPoint attachmentPoint, PrintButton button)
        {
            button.AttachmentPoint = attachmentPoint;
            Visibility visibility;
            switch (_oClientType)
            {
                case OClientTypes.Person:
                    visibility = Visibility.Individual;
                    break;

                case OClientTypes.Group:
                    visibility = Visibility.Group;
                    break;

                case OClientTypes.Corporate:
                    visibility = Visibility.Corporate;
                    break;

                default:
                    visibility = Visibility.All;
                    break;
            }
            button.Visibility = visibility;

            button.ReportInitializer =
                report =>
                {
                    report.SetParamValue("user_id", User.CurrentUser.Id);
                    if (_credit != null) report.SetParamValue("contract_id", _credit.Id);
                    if (_saving != null) report.SetParamValue("saving_id", _saving.Id);
                    if (_guarantee != null) report.SetParamValue("guarantee_id", _guarantee.Id);
                };
            button.LoadReports();

            //from extension
            foreach (var item in PrintButtonContextMenuStrips)
            {
                var menuItems = item.GetContextMenuStrip(_client, _credit, _guarantee, _saving, attachmentPoint.ToString());
                if (menuItems == null) continue;

                foreach (var menuItem in menuItems)
                {
                    button.Menu.Items.Add(menuItem);
                }
            }
        }
开发者ID:fdrgnmx,项目名称:opencbs,代码行数:46,代码来源:ClientForm.cs


示例6: AttachmentAt

 public InventoryItem AttachmentAt(AttachmentPoint point)
 {
     lock (attachments)
     {
         foreach (KeyValuePair<UUID, AttachmentInfo> att in attachments)
         {
             if (att.Value.Point == point)
             {
                 return att.Value.Item;
             }
         }
     }
     return null;
 }
开发者ID:robincornelius,项目名称:radegast,代码行数:14,代码来源:InventoryConsole.cs


示例7: Attach

 /// <summary>
 /// Attach an item to our agent specifying attachment details
 /// </summary>
 /// <param name="itemID">The <seealso cref="OpenMetaverse.UUID"/> of the item to attach</param>
 /// <param name="ownerID">The <seealso cref="OpenMetaverse.UUID"/> attachments owner</param>
 /// <param name="name">The name of the attachment</param>
 /// <param name="description">The description of the attahment</param>
 /// <param name="perms">The <seealso cref="OpenMetaverse.Permissions"/> to apply when attached</param>
 /// <param name="itemFlags">The <seealso cref="OpenMetaverse.InventoryItemFlags"/> of the attachment</param>
 /// <param name="attachPoint">The <seealso cref="OpenMetaverse.AttachmentPoint"/> on the agent
 /// to attach the item to</param>
 public void Attach(UUID itemID, UUID ownerID, string name, string description,
     Permissions perms, uint itemFlags, AttachmentPoint attachPoint)
 {
     Attach(itemID, ownerID, name, description, perms, itemFlags, attachPoint, true);
 }
开发者ID:CCIR,项目名称:libopenmetaverse,代码行数:16,代码来源:AppearanceManager.cs


示例8: Unattach

    public void Unattach(AttachmentPoint parentJoint, AttachmentPoint childJoint)
    {
        // First remove all children of limb from skeleton...
        foreach (RobotComponent limb in childJoint.owner.getDirectChildren())
        {
            childJoint.owner.Unattach(limb.parentAttachmentPoint, limb.parentAttachmentPoint.child);
        }

        AttachmentSlot slot = parentJoint.slot;
        Bone bone = Skeleton.GetBoneForSlot(slot);

        // Unparent from lower joint bone if it exists (for limbs)
        if (bone && bone.LowerJoint)
        {
            bone = bone.LowerJoint;
        }

        AttachmentType attachmentType = childJoint.owner.parentAttachmentPoint.attachmentType;

        RobotComponent child = childJoint.owner;
        child.Skeleton = null;

        if (LevelMusic.Instance)
        {
            LevelMusic.Instance.DetachLimb(childJoint.owner.limbType, childJoint.owner.Slot);
        }

        parentJoint.child = null;
        childJoint.parent = null;
        childJoint.owner.parentComponent = null;
        childJoint.owner.parentAttachmentPoint= null;

        if (parentJoint.connectsGround)
        {
            groundConnections.Remove(childJoint.owner);
        }

        parentJoint.childTransform = parentJoint.transform;

        // parent child to null
        bone.Detach(child.transform);
        child.transform.parent = null;
        child.parentComponent = null;
        child.Skeleton = null;

        // Unparent all child joints from bones
        foreach (AttachmentPoint joint in childJoint.owner.allJoints)
        {
            Bone jointBone = Skeleton.GetBoneForSlot(joint.slot);
            jointBone.Detach(joint.transform);
            joint.transform.parent = joint.owner.transform;
        }

        child.transform.localScale = Vector3.one;

        childJoint.owner.OnRemove();

        OnLimbRemoved(childJoint.owner, slot, attachmentType);

        // stop listening to childs' add/removeArm event
        childJoint.owner.LimbAdded -= OnLimbAdded;
        childJoint.owner.LimbRemoved -= OnLimbRemoved;

        // Restore rigid body to unattached childJoint part
        childJoint.owner.ResetPhysics();
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:66,代码来源:RobotComponent.cs


示例9: AttachToLevelObject

    public void AttachToLevelObject(AttachmentPoint levelAttachment)
    {
        joint = PlayerBehavior.Player.gameObject.AddComponent<DistanceJoint2D>();
        joint.anchor = transform.position - PlayerBehavior.Player.transform.position;
        joint.connectedBody = levelAttachment.collider2D.attachedRigidbody;
        joint.connectedAnchor = levelAttachment.transform.position
            - levelAttachment.collider2D.attachedRigidbody.transform.position;

        child = levelAttachment;
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:10,代码来源:AttachmentPoint.cs


示例10: Attach

 /// <summary>
 /// Attach an item to an avatar at a specific attach point
 /// </summary>
 /// <param name="item">A <seealso cref="OpenMetaverse.InventoryItem"/> to attach</param>
 /// <param name="attachPoint">the <seealso cref="OpenMetaverse.AttachmentPoint"/> on the avatar 
 /// to attach the item to</param>
 public void Attach(InventoryItem item, AttachmentPoint attachPoint)
 {
     Attach(item.Guid, item.OwnerID, item.Name, item.Description, item.Permissions, item.Flags, 
         attachPoint);
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:11,代码来源:AppearanceManager.cs


示例11: SetSelectedParent

    void SetSelectedParent(AttachmentPoint point)
    {
        if (selectedParentJoint != point)
        {
            if (selectedParentJoint != null)
            {
                selectedParentJoint.selected = false;

                if (selectedParentJoint.owner != null)
                {
                    selectedParentJoint.owner.OnDestroy -= OnParentDestroyed;
                }
            }

            if (point != null)
            {
                point.selected = true;
                if (point.owner != null)
                {
                    point.owner.OnDestroy += OnParentDestroyed;
                }
                AudioSource.PlayClipAtPoint(jointHoverClip, transform.position);
            }
        }

        selectedParentJoint = point;
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:27,代码来源:PlayerAttachmentController.cs


示例12: SetSelectedChild

    void SetSelectedChild(AttachmentPoint point)
    {
        if (selectedChildJoint != point)
        {
            if (selectedChildJoint != null)
            {
                selectedChildJoint.selected = false;

                if (selectedChildJoint.owner != null)
                {
                    selectedChildJoint.owner.OnDestroy -= OnChildDestroyed;
                    selectedChildJoint.owner.GetComponent<PulsingSprite>().Disable();
                }
            }

            if (point != null)
            {
                point.selected = true;
                if (point.owner != null)
                {
                    point.owner.OnDestroy += OnChildDestroyed;
                    point.owner.GetComponent<PulsingSprite>().Enable();
                }
                AudioSource.PlayClipAtPoint(jointHoverClip, transform.position);
            }
        }

        selectedChildJoint = point;
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:29,代码来源:PlayerAttachmentController.cs


示例13: Attach

 /// <summary>
 /// Attach an inventory item
 /// </summary>
 /// <param name="item">Item to be attached</param>
 /// <param name="point">Attachment point</param>
 /// <param name="replace">Replace existing attachment at that point first?</param>
 public void Attach(InventoryItem item, AttachmentPoint point, bool replace)
 {
     Client.Appearance.Attach(item, point, replace);
     AddLink(item);
 }
开发者ID:Nuriat,项目名称:radegast,代码行数:11,代码来源:CurrentOutfitFolder.cs


示例14: Attach

    public void Attach(AttachmentPoint parentJoint, AttachmentPoint childJoint)
    {
        AttachmentSlot slot = parentJoint.slot;
        Bone bone = Skeleton.GetBoneForSlot(slot);

        RobotComponent child = childJoint.owner;

        // Parent to lower joint bone if it exists (for limbs)
        if (bone.LowerJoint)
        {
            bone = bone.LowerJoint;
        }

        child.currentBone = bone;
        child.Skeleton = Skeleton;

        // parent child to player object
        child.transform.parent = transform.rootParent();
        // attach child to bone
        bone.Attach(child.transform);

        if (childJoint.rigidbody2D)
        {
            // If we don't set body to kinematic, it will get will physics update that will
            // move component after attaching...
            child.rigidbody2D.isKinematic = true;
        }

        if (childJoint.owner.rigidbody2D)
        {
            Destroy(childJoint.owner.rigidbody2D);
        }

        // Parent all child joints to the bones themselves (for torso)
        foreach (AttachmentPoint joint in childJoint.owner.allJoints)
        {
            Bone jointBone = Skeleton.GetBoneForSlot(joint.slot);
            joint.bone = jointBone;
            joint.transform.parent = transform.rootParent();
            jointBone.Attach(joint.transform);
        }

        parentJoint.child = childJoint;
        childJoint.parent = parentJoint;

        childJoint.owner.parentComponent = parentJoint.owner;
        childJoint.owner.parentAttachmentPoint = parentJoint;

        if (parentJoint.connectsGround)
        {
            groundConnections.Add(childJoint.owner);
        }

        // listen to childs' add/removelimb event
        childJoint.owner.LimbAdded += OnLimbAdded;
        childJoint.owner.LimbRemoved += OnLimbRemoved;

        foreach (RobotComponent limb in child.getAllChildren())
        {
            AttachmentType type = limb.parentAttachmentPoint.attachmentType;

            if (LevelMusic.Instance)
            {
                LevelMusic.Instance.AttachLimb(limb.limbType, limb.Slot);
            }

            OnLimbAdded(limb, slot, type);
        }

        parentJoint.childTransform = childJoint.transform;

        child.OnAttach();

        child.ResetColliders();

        getRootComponent().ResetSpriteOrders();
        getRootComponent().ResetPhysics();
    }
开发者ID:stjahns,项目名称:INTD450,代码行数:78,代码来源:RobotComponent.cs


示例15: SetMText

 /// <summary>
 /// Установка параметров MText.
 /// </summary>
 /// <param name="mt">Объект MText</param>
 /// <param name="pt3">Местоположение</param>
 /// <param name="cont">Содержимое</param>
 /// <param name="th">Высота текста</param>
 /// <param name="db">База данных документа</param>
 /// <param name="ap">Точка выравнивания</param>
 /// <param name="ang">Угол поворота текста (в градусах)</param>
 public static void SetMText(MText mt, Point3d pt3, string cont, double th, Database db, AttachmentPoint ap, double ang)
 {
     mt.SetDatabaseDefaults();
     mt.Location = pt3;
     mt.Contents = cont;
     mt.TextStyleId = db.Textstyle;
     mt.TextHeight = th;
     mt.Attachment = ap;
     mt.Rotation = ang * Math.PI / 180;
 }
开发者ID:koryun08,项目名称:AutoCAD-CSharp-plug-in1,代码行数:20,代码来源:Service.cs


示例16: InitPrintButton

        private void InitPrintButton(AttachmentPoint attachmentPoint, PrintButton button)
        {
            button.AttachmentPoint = attachmentPoint;
            Visibility visibility;
            switch (_oClientType)
            {
                case OClientTypes.Person:
                    visibility = Visibility.Individual;
                    break;

                case OClientTypes.Group:
                    visibility = Visibility.Group;
                    break;

                case OClientTypes.Corporate:
                    visibility = Visibility.Corporate;
                    break;

                default:
                    visibility = Visibility.All;
                    break;
            }
            button.Visibility = visibility;

            button.ReportInitializer =
                report =>
                {
                    report.SetParamValue("user_id", User.CurrentUser.Id);
                    if (_credit != null) report.SetParamValue("contract_id", _credit.Id);
                    if (_saving != null) report.SetParamValue("saving_id", _saving.Id);
                    if (_guarantee != null) report.SetParamValue("guarantee_id", _guarantee.Id);
                };
            button.LoadReports();
        }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:34,代码来源:ClientForm.cs


示例17: AttachTo

        private void AttachTo(InventoryItem item, AttachmentPoint pnt)
        {
            client.Appearance.Attach(item, pnt, false);

            client.Inventory.CreateLink(instance.CoF.UUID, item.UUID, item.Name, string.Empty, AssetType.Link, item.InventoryType, UUID.Random(), (success, newItem) =>
            {
                if (success)
                {
                    client.Inventory.RequestFetchInventory(newItem.UUID, newItem.OwnerID);
                }
            });

            WearTakeoff(true, selectednode);
        }
开发者ID:NullProjects,项目名称:METAbolt,代码行数:14,代码来源:InventoryConsole.cs


示例18: TestAttachedObject

 private void TestAttachedObject(SceneObjectGroup attSo, AttachmentPoint attPoint, UUID ownerId)
 {
     Assert.That(attSo.AttachmentPoint, Is.EqualTo((byte)attPoint));
     Assert.That(attSo.IsAttachment);
     Assert.That(attSo.UsesPhysics, Is.False);
     Assert.That(attSo.IsTemporary, Is.False);
     Assert.That(attSo.OwnerID, Is.EqualTo(ownerId));
 }
开发者ID:CassieEllen,项目名称:opensim,代码行数:8,代码来源:NPCModuleTests.cs


示例19: Attach

        /// <summary>
        /// Attach an item to an avatar specifying attachment details
        /// </summary>
        /// <param name="itemID">The <seealso cref="libsecondlife.LLUUID"/> of the item to attach</param>
        /// <param name="ownerID">The <seealso cref="libsecondlife.LLUUID"/> attachments owner</param>
        /// <param name="name">The name of the attachment</param>
        /// <param name="description">The description of the attahment</param>
        /// <param name="perms">The <seealso cref="libsecondlife.Permissions"/> to apply when attached</param>
        /// <param name="itemFlags">The <seealso cref="libsecondlife.InventoryItemFlags"/> of the attachment</param>
        /// <param name="attachPoint">the <seealso cref="libsecondlife.AttachmentPoint"/> on the avatar 
        /// to attach the item to</param>
        public void Attach(LLUUID itemID, LLUUID ownerID, string name, string description,
            Permissions perms, InventoryItemFlags itemFlags, AttachmentPoint attachPoint)
        {
            // TODO: At some point it might be beneficial to have AppearanceManager track what we
            // are currently wearing for attachments to make enumeration and detachment easier

            RezSingleAttachmentFromInvPacket attach = new RezSingleAttachmentFromInvPacket();

            attach.AgentData.AgentID = Client.Self.AgentID;
            attach.AgentData.SessionID = Client.Self.SessionID;

            attach.ObjectData.AttachmentPt = (byte)attachPoint;
            attach.ObjectData.Description = Helpers.StringToField(description);
            attach.ObjectData.EveryoneMask = (uint)perms.EveryoneMask;
            attach.ObjectData.GroupMask = (uint)perms.GroupMask;
            attach.ObjectData.ItemFlags = (uint)itemFlags;
            attach.ObjectData.ItemID = itemID;
            attach.ObjectData.Name = Helpers.StringToField(name);
            attach.ObjectData.NextOwnerMask = (uint)perms.NextOwnerMask;
            attach.ObjectData.OwnerID = ownerID;

            Client.Network.SendPacket(attach);
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:34,代码来源:AppearanceManager.cs


示例20: AttachObject

        /// <summary>
        /// Attach an object to this avatar
        /// </summary>
        /// <param name="simulator">A reference to the <seealso cref="OpenMetaverse.Simulator"/> object where the object resides</param>
        /// <param name="localID">The objects ID which is local to the simulator the object is in</param>
        /// <param name="attachPoint">The point on the avatar the object will be attached</param>
        /// <param name="rotation">The rotation of the attached object</param>
        public void AttachObject(Simulator simulator, uint localID, AttachmentPoint attachPoint, Quaternion rotation)
        {
            ObjectAttachPacket attach = new ObjectAttachPacket();
            attach.AgentData.AgentID = Client.Self.AgentID;
            attach.AgentData.SessionID = Client.Self.SessionID;
            attach.AgentData.AttachmentPoint = (byte)attachPoint;

            attach.ObjectData = new ObjectAttachPacket.ObjectDataBlock[1];
            attach.ObjectData[0] = new ObjectAttachPacket.ObjectDataBlock();
            attach.ObjectData[0].ObjectLocalID = localID;
            attach.ObjectData[0].Rotation = rotation;

            Client.Network.SendPacket(attach, simulator);
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:21,代码来源:ObjectManager.cs



注:本文中的AttachmentPoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Attack类代码示例发布时间:2022-05-24
下一篇:
C# Attachment类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap