Exemplo n.º 1
0
 public KLabel CreateInitializedKLabel(IKNode parent)
 {
     KLabel label = new KLabel();
     KShapeLayout shapeLayout = new KShapeLayout();
     label.KShapeLayout = shapeLayout;
     label.Text = "";
     label.Parent = parent;
     return label;
 }
Exemplo n.º 2
0
 // Use this for initialization
 protected virtual void Start()
 {
     RootNode = gameObject.GetComponentInParent <CCDSolverBehaviour>();
     if (RootNode == null)
     {
         throw new MissingComponentException(string.Format("IKNodeBehaviour {0} needs a CCDSolverBehaviour in parent hirachy", gameObject.name));
     }
     IKNode = new IKNode(transform.position, transform.rotation);
     CalculateChainIndex();
 }
Exemplo n.º 3
0
        public static void AddLayoutOptions(IKNode parentNode)
        {
            parentNode.KShapeLayout.LayoutDirection = LayoutDirectionEnum.RIGHT;

            foreach(IKNode childNode in parentNode.Children)
            {
                childNode.KShapeLayout.Width = 30.0f;
                childNode.KShapeLayout.Height = 30.0f;
                childNode.KShapeLayout.PortConstraint = PortConstraintsEnum.FIXED_POS;

                //int i = 0;

                foreach(KPort port in childNode.PortList)
                {
                    // NEED TO put the port allocation code here.
                    // test code is assigning it in non-standard way.
                    // need to see what is the best way to automate this.
                }
            }
        }