コード例 #1
0
        static void DrawGizmo(MagicaMeshCloth scr, GizmoType gizmoType)
        {
            bool selected = (gizmoType & GizmoType.Selected) != 0 || (ClothMonitorMenu.Monitor != null && ClothMonitorMenu.Monitor.UI.AlwaysClothShow);

            if (ClothMonitorMenu.Monitor == null)
            {
                return;
            }

            if (selected == false)
            {
                return;
            }


            // デフォーマー状態表示
            //if (scr.Deformer != null && scr.Deformer.VerifyData())
            //{
            //    if (PointSelector.EditEnable == false)
            //    {
            //        // デフォーマーギズモ
            //        DeformerGizmoDrawer.DrawDeformerGizmo(scr.Deformer, scr, 0.01f);
            //    }
            //}

            if (scr.VerifyData() == Define.Error.None)
            {
                // クロスギズモ
                if (PointSelector.EditEnable == false)
                {
                    ClothGizmoDrawer.DrawClothGizmo(scr, scr.ClothData, scr.Params, scr.Setup, scr, scr);
                }
            }
        }
コード例 #2
0
        //[DrawGizmo(GizmoType.Selected | GizmoType.Active)]
        static void DrawGizmo(MagicaBoneSpring scr, GizmoType gizmoType)
        {
            bool selected = (gizmoType & GizmoType.Selected) != 0 || (ClothMonitorMenu.Monitor != null && ClothMonitorMenu.Monitor.UI.AlwaysClothShow);

            if (scr.VerifyData() != Define.Error.None)
            {
                //DrawRootLine(scr);
                return;
            }

            if (PointSelector.EditEnable)
            {
                //DrawRootLine(scr);
                return;
            }

            if (ClothMonitorMenu.Monitor == null)
            {
                return;
            }

            if (selected == false)
            {
                return;
            }


            // デフォーマーギズモ
            DeformerGizmoDrawer.DrawDeformerGizmo(scr, scr, 0.015f);

            if (ClothMonitorMenu.Monitor.UI.DrawCloth)
            {
                // クロスギズモ
                ClothGizmoDrawer.DrawClothGizmo(
                    scr,
                    scr.ClothData,
                    scr.Params,
                    scr.Setup,
                    scr,
                    scr
                    );
            }
            //else
            //{
            //    DrawRootLine(scr);
            //}
        }
コード例 #3
0
        static void DrawGizmo(MagicaMeshSpring scr, GizmoType gizmoType)
        {
            bool selected = (gizmoType & GizmoType.Selected) != 0 || (ClothMonitorMenu.Monitor != null && ClothMonitorMenu.Monitor.UI.AlwaysClothShow);

            if (PointSelector.EditEnable)
            {
                return;
            }

            // スプリング球
            if (selected)
            {
                DrawSpringSphere(scr);
            }

            if (ClothMonitorMenu.Monitor == null)
            {
                return;
            }

            // データ整合性チェック
            if (scr.VerifyData() != Define.Error.None)
            {
                return;
            }

            // デフォーマーギズモ

            /*var dcnt = scr.Contents.DeformerCount;
             * for (int i = 0; i < dcnt; i++)
             * {
             *  var deformer = scr.Contents.GetDeformer(i);
             *  if (deformer == null || deformer.IsValidData() == false)
             *      continue;
             *
             *  var datalist = scr.Contents.SpringData.deformerDataList;
             *  if (i >= datalist.Count)
             *      continue;
             *
             *  var springData = datalist[i];
             *  if (springData.vertexCount == 0)
             *      continue;
             *
             *  //DeformerGizmoDrawer.DrawDeformerGizmo(deformer, springData);
             * }*/

            if (ClothMonitorMenu.Monitor.UI.DrawCloth == false)
            {
                return;
            }

            if (selected == false)
            {
                return;
            }


            // クロスギズモ
            ClothGizmoDrawer.DrawClothGizmo(
                scr,
                scr.ClothData,
                scr.Params,
                scr.Setup,
                scr,
                scr
                );
        }