User Tools

Site Tools


gamedev:deigde:editors:widgetbeziercurve

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
gamedev:deigde:editors:widgetbeziercurve [2020/03/30 15:51] – created dragonlordgamedev:deigde:editors:widgetbeziercurve [2020/03/30 23:51] (current) dragonlord
Line 23: Line 23:
  
 Bezier interpolation produces smooth curves by interpolation using bezier algorithm between curve points. Bezier interpolation produces smooth curves by interpolation using bezier algorithm between curve points.
 +
 +====== View Interaction ======
 +
 +The bezier curve editor supports these editing interaction using keyboard and mouse:
 +  * <key>MOUSE_LEFT</key>: Select curve point or handle. Required for certain context menu functions to be enabled.
 +  * <key>MOUSE_LEFT</key> **dragging**: Move selected curve point or handle. If clamping is enabled and point is moved (not handle) movement is restricted to clamp range. Independent of clamping points can not be moved outside the curve sgement (hence not before the preceding curve point nor past the following curve point). Handles can not be dragged across the point (hence the left handle has to stay on the left side and the right handle has to stay on the right side).
 +  * <key>SHIFT+MOUSE_LEFT</key>: Add curve point.
 +  * <key>SHIFT+MOUSE_LEFT</key> **dragging**: Add curve point and move it.
 +  * <key>CTRL+SHIFT+MOUSE_LEFT</key>: Delete curve point clicked upon.
 +  * <key>MOUSE_RIGHT</key>: Show context menu
 +====== Context Menu ======
 +
 +{{ :gamedev:deigde:editors:editor_curve_menu.png?nolink|Context menu}}
 +
 +The context menu allows to edit the curve as well as setting some parameters.
 +
 +**Reset View** resets the X-axis and Y-axis to the range **0 -> 1**.
 +
 +**Fit View to Curve** adjusts the X-axis and Y-axis extends to fit the curve into the view. In particular this sets the X-axis range to include the first and last curve point X-coordinate as well as the Y-axis minimum and maximum set to the curve point Y-coordinate minimum respectively maximum value. Handles are not included in the curve fitting only curve points.
 +
 +**Clear Curve** removes all curve points.
 +
 +**Set to Default Linear** sets the interpolation mode to **linear interpolation**, removes all curve points and adds the curve points (0,0) and (1,1). Basically this replaces the curve with a linear mapping from (0,0) to (1,1) which keeps the input value unchanged.
 +
 +**Set to Default Bezier** sets the interpolation mode to **bezier interpolation**, removes all curve points and adds two curve points producing an S-shaped curve starting at (0,0) and ending at (1,1). This is similar to a GLSL smooth step curve running from (0,0) to (1,1).
 +
 +**Edit Clamp Parameters** shows a dialog to edit the clamping parameters. If clamping is enabled curve points (not handles) are clamped to the desired range while dragged using the mouse. Clamping is not applied to existing points if changed nor to manually edited points.
 +
 +**Edit Selected Point** shows a dialog to edit the **point**, **first handle** and **second handle** of the selected curve point.
 +<WRAP clear/>
gamedev/deigde/editors/widgetbeziercurve.1585583508.txt.gz · Last modified: 2020/03/30 15:51 by dragonlord