DrawLine3D: Difference between revisions

From Onset Developer Wiki
28days (talk | contribs)
No edit summary
No edit summary
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Draws a line in 3d space.}}


{{FuncSyntax|DrawLine3D(sX, sY, sZ, eX, eY, eZ [, thickness])}}
{{FuncSyntax|DrawLine3D(sX, sY, sZ, eX, eY, eZ [, thickness, bForeground])}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|sX|__EDIT_ME__}}
{{FuncParam|sX|Start X location.}}
{{FuncParam|sY|__EDIT_ME__}}
{{FuncParam|sY|Start Y location.}}
{{FuncParam|sZ|__EDIT_ME__}}
{{FuncParam|sZ|Start Z location.}}
{{FuncParam|eX|__EDIT_ME__}}
{{FuncParam|eX|End X location.}}
{{FuncParam|eY|__EDIT_ME__}}
{{FuncParam|eY|End Y location.}}
{{FuncParam|eZ |__EDIT_ME__}}
{{FuncParam|eZ|End Z location.}}
{{FuncParamOptional|thickness|__EDIT_ME__}}
{{FuncParamOptional|thickness|Line thickness, default: 1.0}}
{{FuncParamOptional|bForeground|'''true''' to draw in front of geometry, default: false}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns nothing.}}


== Example ==
== Example ==
__EDIT_ME__
Example usage can be found in the editor script package.
https://github.com/BlueMountainsIO/OnsetLuaScripts/blob/6f45ad9607e30c97f4f1d58443d808da632d4d91/mapeditor/client/editor.lua#L168


{{RelatedFunctions}}
{{RelatedFunctions}}

Revision as of 13:06, 30 August 2020

DrawLine3D

Type: Function
Context: Client
Introduced: v1.0

Description

Draws a line in 3d space.

Syntax

DrawLine3D(sX, sY, sZ, eX, eY, eZ [, thickness, bForeground])

Parameters

  • sX
    Start X location.
  • sY
    Start Y location.
  • sZ
    Start Z location.
  • eX
    End X location.
  • eY
    End Y location.
  • eZ
    End Z location.
  • thickness (optional)
    Line thickness, default: 1.0
  • bForeground (optional)
    true to draw in front of geometry, default: false

Return Value

  • Returns nothing.

Example

Example usage can be found in the editor script package. https://github.com/BlueMountainsIO/OnsetLuaScripts/blob/6f45ad9607e30c97f4f1d58443d808da632d4d91/mapeditor/client/editor.lua#L168

See also