コード例 #1
0
ファイル: TreeForm.cs プロジェクト: P4ll/system-software
        private void paint(Plugin.Node n, Point parPoint, Point paintPoint)
        {
            drawRectangle(paintPoint);
            drawString(new Point(paintPoint.X + 5, paintPoint.Y + 5), n.tn.ToString());
            if (n.val != null)
            {
                drawString(new Point(paintPoint.X + 5, paintPoint.Y + 30), "Value: " + n.val);
            }
            if (parPoint != paintPoint)
            {
                drawLine(new Point(parPoint.X + _sizeOfRect.Width / 2, parPoint.Y + _sizeOfRect.Height), new Point(paintPoint.X + _sizeOfRect.Width / 2, paintPoint.Y));
            }

            for (int i = 0, j = 0; j < n.childs.Count; ++i)
            {
                int   distX  = (_sizeOfRect.Width + _distX) * i;
                int   distY  = _sizeOfRect.Height + _distY;
                Point nPoint = new Point(paintPoint.X + distX, paintPoint.Y + distY);
                if (_usedRect.ContainsKey(nPoint))
                {
                    continue;
                }
                else
                {
                    _usedRect.Add(nPoint, true);
                }
                paint(n.childs[j], paintPoint, nPoint);
                ++j;
            }
        }
コード例 #2
0
ファイル: TreeForm.cs プロジェクト: P4ll/system-software
 public TreeForm(Plugin.Node node, Form pForm)
 {
     InitializeComponent();
     _stNode            = node;
     this.pForm         = pForm;
     pForm.FormClosing += clForm;
 }
コード例 #3
0
 public static bool GetNodeStatePropertyQuaternion(NodeStatePropertyType propertyType, Plugin.Node ovrpNodeType, Plugin.ProcessingStep stepType, out Quaternion retQuat)
 {
     retQuat = Quaternion.Identity;
     switch (propertyType)
     {
     case NodeStatePropertyType.Orientation:
         if (Manager.loadedXRDevice == Manager.XRDevice.Oculus)
         {
             retQuat = Plugin.GetNodePose(ovrpNodeType, stepType).ToOVRPose().Orientation;
             return(true);
         }
         break;
     }
     return(false);
 }
コード例 #4
0
        public static bool GetNodeStatePropertyVector3(NodeStatePropertyType propertyType, Plugin.Node ovrpNodeType, Plugin.ProcessingStep stepType, out Vector3 retVec)
        {
            retVec = Vector3.Zero;
            switch (propertyType)
            {
            case NodeStatePropertyType.Acceleration:
                if (Manager.loadedXRDevice == Manager.XRDevice.Oculus)
                {
                    retVec = Plugin.GetNodeAcceleration(ovrpNodeType, stepType).FromFlippedZVector3f();
                    return(true);
                }
                break;

            case NodeStatePropertyType.AngularAcceleration:
                if (Manager.loadedXRDevice == Manager.XRDevice.Oculus)
                {
                    retVec = Plugin.GetNodeAngularAcceleration(ovrpNodeType, stepType).FromFlippedZVector3f();
                    return(true);
                }
                break;

            case NodeStatePropertyType.Velocity:
                if (Manager.loadedXRDevice == Manager.XRDevice.Oculus)
                {
                    retVec = Plugin.GetNodeVelocity(ovrpNodeType, stepType).FromFlippedZVector3f();
                    return(true);
                }
                break;

            case NodeStatePropertyType.AngularVelocity:
                if (Manager.loadedXRDevice == Manager.XRDevice.Oculus)
                {
                    retVec = Plugin.GetNodeAngularVelocity(ovrpNodeType, stepType).FromFlippedZVector3f();
                    return(true);
                }
                break;

            case NodeStatePropertyType.Position:
                if (Manager.loadedXRDevice == Manager.XRDevice.Oculus)
                {
                    retVec = Plugin.GetNodePose(ovrpNodeType, stepType).ToOVRPose().Position;
                    return(true);
                }
                break;
            }

            return(false);
        }