Draw XXL documentation


Draw Measurements 2D.AngleLineToLine(...);

This measures and draws the angle between two 2D lines.
The function returns the measured angle, depending on the "displayAndReturn_radInsteadOfDeg" parameter in degrees or radians.

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


static float DrawMeasurements2D.AngleLineToLine(...);

Code snippet names: drawAngleLineToLine2D_ray and drawAngleLineToLine2D_ray_func.

Parameters:
Type Parameter Name Description
Ray2D line1
Ray2D line2
Color color The color of the angle display. The lines itself are colored by the static global settings DrawMeasurements.defaultColor1 and DrawMeasurements.defaultColor2.
float linesWidth
string text
string line1Name
string line2Name
float custom_zPos The z position of the XY-plane inside which the thing is drawn. The default value is "infinity", which falls back to DrawBasic2D.Default_zPos_forDrawing.
bool returnObtuseAngleOver90deg The lines always span two vectors: One acute angle below 90° and one obtuse angle between 90° and 180°. Use this bool to specify which one you are interested in.
bool displayAndReturn_radInsteadOfDeg Default is "false", which means: using degrees.
float coneLength The parameter can be interpreted in different ways: It can be meant as absolute length or relative to the radius. The used interpretation is decided by the global setting coneLength_interpretation_forCircledVectors. The default interpretation is "relative to radius".
bool addTextForAlternativeAngleUnit "deg" and "rad" are two different angle units. They can be displayed both or only one of them. See also the "displayAndReturn_radInsteadOfDeg" parameter.
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.
bool hiddenByNearerObjects This specifies if the drawn thing will get hidden if other geometry is in front of it or if it shines through. It is the same as the depthTest parameter of Unitys Debug.DrawLine(). Not all drawing methods support toggling this in the same way. For some methods the lines are fully hidden, for others the hidden lines shimmer through. 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 float DrawMeasurements2D.AngleLineToLine(...);

Code snippet names: drawAngleLineToLine2D_vec and drawAngleLineToLine2D_vec_func.

Parameters:
Type Parameter Name Description
Vector2 line1Origin The line definition here is the only difference to the first overload.
Vector2 line1Direction The line definition here is the only difference to the first overload.
Vector2 line2Origin The line definition here is the only difference to the first overload.
Vector2 line2Direction The line definition here is the only difference to the first overload.
Color color
float linesWidth
string text
string line1Name
string line2Name
float custom_zPos
bool returnObtuseAngleOver90deg
bool displayAndReturn_radInsteadOfDeg
float coneLength
bool addTextForAlternativeAngleUnit
float durationInSec
bool hiddenByNearerObjects