Module Shapes.LINE
Author: nielsvaes/coconutcockpit
Global(s)
Global LINE |
Type(s)
Fields and Methods inherited from LINE | Description |
---|---|
Name of the class. |
|
Gets the coordinates of the line. |
|
coordinates of the line |
|
Draws the line on the map. |
|
Finds a line by its name in the database. |
|
Finds a line on the map by its name. |
|
Calculates the bounding box of the line. |
|
LINE.GetCoordinatesInBetween(amount, start_point, end_point, self) |
Gets a number of points in between the start and end points of the line. |
Gets the end coordinate of the line. |
|
Gets the end point of the line. |
|
Gets the heading of the line. |
|
Return each part of the line as a new line |
|
Gets the length of the line. |
|
LINE.GetPointsBetweenAsSineWave(amount, start_point, end_point, frequency, phase, amplitude, self) |
Gets a number of points on a sine wave between the start and end points of the line. |
LINE.GetPointsInbetween(amount, start_point, end_point, self) |
Gets a number of points in between the start and end points of the line. |
Returns a random point on the line. |
|
Gets the start coordinate of the line. |
|
Gets the start point of the line. |
|
Creates a new line from two points. |
|
LINE.NewFromCircle(center_point, radius, angle_degrees, self) |
Creates a new line from a circle. |
points of the line |
|
Removes the drawing of the line from the map. |
LINE class.
Field(s)
Name of the class.
coordinates of the line
points of the line
Function(s)
Gets the coordinates of the line.
Defined in:
LINE
Return value:
#table:
The coordinates of the line
Draws the line on the map.
Defined in:
LINE
Parameters:
#table points
The points of the line
self
Finds a line by its name in the database.
Defined in:
LINE
Parameters:
#string shape_name
Name of the line to find
self
Return value:
The found line, or nil if not found
Finds a line on the map by its name.
The line must be drawn in the Mission Editor
Defined in:
LINE
Parameters:
#string line_name
Name of the line to find
self
Return value:
The found line, or nil if not found
Calculates the bounding box of the line.
The bounding box is the smallest rectangle that contains the line.
Defined in:
LINE
Return value:
#table:
The bounding box of the line
Gets a number of points in between the start and end points of the line.
Defined in:
LINE
Parameters:
#number amount
The number of points to get
#table start_point
(Optional) The start point of the line, defaults to the object's start point
#table end_point
(Optional) The end point of the line, defaults to the object's end point
self
Return value:
#table:
The points
Gets the end coordinate of the line.
The end coordinate is the last point of the line.
Gets the end point of the line.
The end point is the last point of the line.
Defined in:
LINE
Return value:
#table:
The end point of the line
Gets the heading of the line.
Defined in:
LINE
Parameters:
#table points
(optional) The points of the line or 2 other points if you're just using the LINE class without an object of it
self
Return value:
#number:
The heading of the line
Return each part of the line as a new line
Defined in:
LINE
Return value:
#table:
The points
Gets the length of the line.
Defined in:
LINE
Return value:
#number:
The length of the line
Gets a number of points on a sine wave between the start and end points of the line.
Defined in:
LINE
Parameters:
#number amount
The number of points to get
#table start_point
(Optional) The start point of the line, defaults to the object's start point
#table end_point
(Optional) The end point of the line, defaults to the object's end point
#number frequency
(Optional) The frequency of the sine wave, default 1
#number phase
(Optional) The phase of the sine wave, default 0
#number amplitude
(Optional) The amplitude of the sine wave, default 100
self
Return value:
#table:
The points
Gets a number of points in between the start and end points of the line.
Defined in:
LINE
Parameters:
#number amount
The number of points to get
#table start_point
(Optional) The start point of the line, defaults to the object's start point
#table end_point
(Optional) The end point of the line, defaults to the object's end point
self
Return value:
#table:
The points
Defined in:
LINE
Parameters:
start_point
end_point
Returns a random point on the line.
Defined in:
LINE
Parameters:
#table points
(optional) The points of the line or 2 other points if you're just using the LINE class without an object of it
self
Return value:
#table:
The random point
Gets the start coordinate of the line.
The start coordinate is the first point of the line.
Gets the start point of the line.
The start point is the first point of the line.
Defined in:
LINE
Return value:
#table:
The start point of the line
Creates a new line from two points.
Defined in:
LINE
Parameters:
#table vec2
The first point of the line
#number radius
The second point of the line
self
...
Return value:
The new line
Creates a new line from a circle.
Defined in:
LINE
Parameters:
#table center_point
center point of the circle
#number radius
radius of the circle, half length of the line
#number angle_degrees
degrees the line will form from center point
self
Return value:
The new line