Esempio n. 1
0
	private void DrawCurveUsingPoints(HEU_Curve curve, Color lineColor)
	{
	    List<Vector3> points = curve.GetAllPoints();

	    Color defaultColor = Handles.color;
	    Handles.color = lineColor;
	    Matrix4x4 defaultMatrix = Handles.matrix;
	    Handles.matrix = curve._targetGameObject.transform.localToWorldMatrix;
	    Handles.DrawAAPolyLine(_lineTexture, 10f, points.ToArray());
	    Handles.matrix = defaultMatrix;
	    Handles.color = defaultColor;
	}
Esempio n. 2
0
	private void DrawPointCaps(HEU_Curve curve, Color capColor)
	{
	    List<Vector3> points = curve.GetAllPoints();

	    Color defaultColor = Handles.color;
	    Handles.color = capColor;
	    for (int i = 0; i < points.Count; ++i)
	    {
		Vector3 pointPos = curve.GetTransformedPosition(points[i]);
		HEU_EditorUI.DrawSphereCap(GUIUtility.GetControlID(FocusType.Passive), pointPos, Quaternion.identity, HEU_EditorUI.GetHandleSize(pointPos));
	    }
	    Handles.color = defaultColor;
	}