Draw XXL documentation


Draw Screenspace.RayUnderTension(...);

The ray that gets drawn with this function can be thought of as if it would be a spiral spring: It has a length where it is relaxed, but if you make it longer or shorter then the line style (which would be "spiral" for a spring) gets squeezed or stretched, but the number of spiral windings stays the same.

The camera which defines the screenspace can be appointed in several ways. One option is: Every function has an overload that is identical except that it takes a Camera as first parameter. Another more convenient option is: If no Camera is supplied then Draw XXL automatically searches for one according to the global DefaultScreenspaceWindowForDrawing setting (which can point to a Gameview camera or a Sceneview camera). Moreover there is the option to apoint a camera once to the global defaultCameraForDrawing field, which also has the effect that no camera has to be supplied as parameter to the actual draw functions.

Green parameters are required. Yellow parameters are optional, but have to be supplied in order.


static void DrawScreenspace.RayUnderTension(...);

Code snippet names: drawScreenRayUnderTension and drawScreenRayUnderTension_func.

Parameters:
Type Parameter Name Description
Vector2 start Viewport space goes from lower-left (= 0,0) to upper-right (= 1,1).
Vector2 direction
float relaxedLength_relToViewportHeight
Color relaxedColor
LineStyle style
float stretchFactor_forStretchedTensionColor
Color color_forStretchedTension
float stretchFactor_forSqueezedTensionColor
Color color_forSqueezedTension
float width_relToViewportHeight
string text
float alphaOfReferenceLengthDisplay
bool interpretDirectionAsUnwarped Unwarped: as if the screens aspect ratio would be one (while "screen height" defines 1 unit)
float stylePatternScaleFactor
float endPlatesSize_relToViewportHeight
float enlargeSmallTextToThisMinRelTextSize
float durationInSec The duration in seconds how long the drawn thing stays visible. The default value of 0 means that it stays only during the current Update frame. Instead of using this parameter you can also overwrite him with a global setting so you don't always have to supply all other preceding function parameters till you reach this late parameter.


static void DrawScreenspace.RayUnderTension(...);

Code snippet names: drawScreenRayUnder_cam and drawScreenRayUnder_cam_func.

Parameters:
Type Parameter Name Description
Camera targetCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
Vector2 start
Vector2 direction
float relaxedLength_relToViewportHeight
Color relaxedColor
LineStyle style
float stretchFactor_forStretchedTensionColor
Color color_forStretchedTension
float stretchFactor_forSqueezedTensionColor
Color color_forSqueezedTension
float width_relToViewportHeight
string text
float alphaOfReferenceLengthDisplay
bool interpretDirectionAsUnwarped
float stylePatternScaleFactor
float endPlatesSize_relToViewportHeight
float enlargeSmallTextToThisMinRelTextSize
float durationInSec