Пример #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
		/// <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;
		}
 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);
 }