コード例 #1
0
 public void FreeTagPoint(TagPoint tagPoint)
 {
     if (this.tagPointList.ContainsValue(tagPoint))
     {
         if (tagPoint.Parent != null)
         {
             tagPoint.Parent.RemoveChild(tagPoint);
         }
     }
 }
コード例 #2
0
        public TagPoint CreateTagPointOnBone(Bone bone, Quaternion offsetOrientation, Vector3 offsetPosition)
        {
            var tagPoint = new TagPoint(++this.nextTagPointAutoHandle, this);

            this.tagPointList[this.nextTagPointAutoHandle] = tagPoint;

            tagPoint.Translate(offsetPosition);
            tagPoint.Rotate(offsetOrientation);
            tagPoint.SetBindingPose();
            bone.AddChild(tagPoint);

            return(tagPoint);
        }
コード例 #3
0
ファイル: Entity.cs プロジェクト: ryan-bunker/axiom3d
		/// <summary>
		///		Internal implementation of attaching a 'child' object to this entity and assign
		///		the parent node to the child entity.
		/// </summary>
		/// <param name="sceneObject">Object to attach.</param>
		/// <param name="tagPoint">TagPoint to attach the object to.</param>
		protected void AttachObjectImpl( MovableObject sceneObject, TagPoint tagPoint )
		{
			this.childObjectList.Add( sceneObject.Name, sceneObject );
			sceneObject.NotifyAttached( tagPoint, true );
		}
コード例 #4
0
		public void FreeTagPoint( TagPoint tagPoint )
		{
			if ( this.tagPointList.ContainsValue( tagPoint ) )
			{
				if ( tagPoint.Parent != null )
				{
					tagPoint.Parent.RemoveChild( tagPoint );
				}
			}
		}
コード例 #5
0
		public TagPoint CreateTagPointOnBone( Bone bone, Quaternion offsetOrientation, Vector3 offsetPosition )
		{
			var tagPoint = new TagPoint( ++this.nextTagPointAutoHandle, this );
			this.tagPointList[ this.nextTagPointAutoHandle ] = tagPoint;

			tagPoint.Translate( offsetPosition );
			tagPoint.Rotate( offsetOrientation );
			tagPoint.SetBindingPose();
			bone.AddChild( tagPoint );

			return tagPoint;
		}
コード例 #6
0
 public void RemoveTagPointFromBone(Bone bone, TagPoint tagPoint)
 {
     bone.RemoveChild(tagPoint);
     tagPointList.Remove(tagPoint);
 }
コード例 #7
0
 public void RemoveTagPointFromBone(Bone bone, TagPoint tagPoint)
 {
     bone.RemoveChild(tagPoint);
     tagPointList.Remove(tagPoint);
 }
コード例 #8
0
 public void DetachObjectFromBone(TagPoint tagPoint)
 {
     DetachObjectFromBone(tagPoint.Parent.Name, tagPoint);
 }
コード例 #9
0
        public void DetachObjectFromBone(string boneName, TagPoint tagPoint)
        {
            MovableObject sceneObject = tagPoint.ChildObject;

            if (!sceneObject.IsAttached) {
                throw new AxiomException("SceneObject '{0}' is not already attached", sceneObject.Name);
            }

            DetachNodeFromBone(boneName, tagPoint);
            DetachObjectImpl(sceneObject);
        }
コード例 #10
0
        public void DetachNodeFromBone(string boneName, TagPoint tagPoint)
        {
            if (!this.HasSkeleton) {
                throw new AxiomException("Entity '{0}' has no skeleton to attach an object to.", this.name);
            }

            Bone bone = skeletonInstance.GetBone(boneName);

            if (bone == null) {
                throw new AxiomException("Entity '{0}' does not have a skeleton with a bone named '{1}'.",
                                         this.name, boneName);
            }
            skeletonInstance.RemoveTagPointFromBone(bone, tagPoint);
        }
コード例 #11
0
        public void AttachObjectToTagPoint(TagPoint tagPoint, MovableObject sceneObject)
        {
            tagPoint.ChildObject = sceneObject;

            AttachObjectImpl(sceneObject, tagPoint);
        }
コード例 #12
0
 /// <summary>
 ///		Internal implementation of attaching a 'child' object to this entity and assign 
 ///		the parent node to the child entity.
 /// </summary>
 /// <param name="sceneObject">Object to attach.</param>
 /// <param name="tagPoint">TagPoint to attach the object to.</param>
 protected void AttachObjectImpl(MovableObject sceneObject, TagPoint tagPoint)
 {
     childObjectList[sceneObject.Name] = sceneObject;
     sceneObject.NotifyAttached(tagPoint, true);
 }