Module Shapes.OVAL
Author: nielsvaes/coconutcockpit
Global(s)
Global OVAL |
OVAL class with properties and methods for handling ovals.
|
#OVAL
OVAL
OVAL class with properties and methods for handling ovals.
Type(s)
Fields and Methods inherited from OVAL |
Description |
OVAL.Angle |
The angle the oval is rotated on
|
OVAL.ClassName |
Name of the class.
|
OVAL.ContainsPoint(point, self) |
Checks if a point is contained within the oval.
|
OVAL.Draw(angle, self) |
Draws the oval on the map, for debugging
|
OVAL.Find(shape_name, self) |
Finds an oval by its name in the database.
|
OVAL.FindOnMap(shape_name, self) |
Finds an oval on the map by its name.
|
OVAL:GetAngle() |
Gets the angle of the oval.
|
OVAL:GetBoundingBox() |
Calculates the bounding box of the oval.
|
OVAL:GetMajorAxis() |
Gets the major axis of the oval.
|
OVAL:GetMinorAxis() |
Gets the minor axis of the oval.
|
OVAL:GetRandomVec2() |
Returns a random Vec2 within the oval.
|
OVAL.MajorAxis |
The major axis (radius) of the oval
|
OVAL.MinorAxis |
The minor axis (radius) of the oval
|
OVAL.New(vec2, major_axis, minor_axis, angle, self) |
Creates a new oval from a center point, major axis, minor axis, and angle.
|
OVAL:PointsOnEdge(num_points) |
|
OVAL:RemoveDraw() |
Removes the drawing of the oval from the map
|
OVAL.SetAngle(value, self) |
Sets the angle of the oval.
|
OVAL.SetMajorAxis(value, self) |
Sets the major axis of the oval.
|
OVAL.SetMinorAxis(value, self) |
Sets the minor axis of the oval.
|
OVAL class.
Field(s)
#number
OVAL.Angle
The angle the oval is rotated on
Function(s)
Checks if a point is contained within the oval.
Defined in:
Parameters:
Return value:
True if the point is contained, false otherwise
Draws the oval on the map, for debugging
Defined in:
Parameters:
(Optional) The angle of the oval. If nil will use self.Angle
Finds an oval by its name in the database.
Defined in:
Parameters:
Return value:
The found oval, or nil if not found
Finds an oval on the map by its name.
The oval must be drawn on the map.
Defined in:
Parameters:
Return value:
The found oval, or nil if not found
Gets the angle of the oval.
Defined in:
Return value:
Calculates the bounding box of the oval.
The bounding box is the smallest rectangle that contains the oval.
Defined in:
Return value:
The bounding box of the oval
Gets the major axis of the oval.
Defined in:
Return value:
The major axis of the oval
Gets the minor axis of the oval.
Defined in:
Return value:
The minor axis of the oval
Returns a random Vec2 within the oval.
Defined in:
Return value:
Creates a new oval from a center point, major axis, minor axis, and angle.
Defined in:
Parameters:
The center point of the oval
The major axis of the oval
The minor axis of the oval
Return value:
Removes the drawing of the oval from the map
Sets the angle of the oval.
Sets the major axis of the oval.
Sets the minor axis of the oval.