示例#1
0
    public void AddLine3D()
    {
        var gobj = init_drawing();

        if (gobj == null)
        {
            return;
        }

        readPoints_zup_righthand();

        radius     = gobj.lineAppearance.Peek().radius;
        frontColor = gobj.lineAppearance.Peek().frontColor;
        frontColors.Clear();
        topology = TOPOLOGY.Open;
        readModifiers();

        gobj.SetLineRadius(radius * POINT_SCALE);
        gobj.SetLineFrontColor(frontColor);
        if (topology == TOPOLOGY.Close)
        {
            gobj.SetLineTopology(Pen.Topology.Close);
        }
        else
        {
            gobj.SetLineTopology(Pen.Topology.Open);
        }
        gobj.AddLine(points, frontColors);
    }
示例#2
0
 private void readModifiers()
 {
     while (true)
     {
         var modifiers = (MODIFIERS)(readInt());
         if (modifiers == MODIFIERS.Color)
         {
             readColor();
         }
         else if (modifiers == MODIFIERS.Radius)
         {
             radius = readFloat();
         }
         else if (modifiers == MODIFIERS.Colors)
         {
             readColors();
         }
         else if (modifiers == MODIFIERS.Topology)
         {
             topology = (TOPOLOGY)(readInt());
         }
         else
         {
             break;
         }
     }
 }
 protected override void DerivedInspector(MotionEditor editor)
 {
     Topology      = (TOPOLOGY)EditorGUILayout.EnumPopup("Topology", Topology);
     RightShoulder = EditorGUILayout.Popup("Right Shoulder", RightShoulder, Data.Source.GetBoneNames());
     LeftShoulder  = EditorGUILayout.Popup("Left Shoulder", LeftShoulder, Data.Source.GetBoneNames());
     RightHip      = EditorGUILayout.Popup("Right Hip", RightHip, Data.Source.GetBoneNames());
     LeftHip       = EditorGUILayout.Popup("Left Hip", LeftHip, Data.Source.GetBoneNames());
     Neck          = EditorGUILayout.Popup("Neck", Neck, Data.Source.GetBoneNames());
     Hips          = EditorGUILayout.Popup("Hips", Hips, Data.Source.GetBoneNames());
     ForwardAxis   = (Axis)EditorGUILayout.EnumPopup("Forward Axis", ForwardAxis);
     Ground        = InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(EditorGUILayout.MaskField("Ground Mask", InternalEditorUtility.LayerMaskToConcatenatedLayersMask(Ground), InternalEditorUtility.layers));
 }
示例#4
0
    public void AddLine3D()
    {
        var gobj = init_drawing();

        if (gobj == null)
        {
            return;
        }

        readPoints_zup_righthand();
        if (points.Count == 0)
        {
            Manager.DebugLogError("CindyJS::AddLine3D: points.Count is zero");
            return;
        }

        radius     = gobj.lineAppearance.Peek().radius;
        frontColor = gobj.lineAppearance.Peek().frontColor;
        frontColors.Clear();
        topology = TOPOLOGY.Open;
        readModifiers();

        if (testmode)
        {
            Manager.DebugLog("CindyJS::AddLine3D: points = " + points.Count
                             + " idx =  " + idx_uc3dBuffer
                             + " bufferlength = " + uc3dBuffer.Length);
        }

        gobj.SetLineRadius(radius * POINT_SCALE);
        gobj.SetLineFrontColor(frontColor);
        if (topology == TOPOLOGY.Close)
        {
            gobj.SetLineTopology(Pen.Topology.Close);
        }
        else
        {
            gobj.SetLineTopology(Pen.Topology.Open);
        }
        gobj.AddLine(points, frontColors);
    }