diff --git a/Moose Development/Moose/Shapes/Circle.lua b/Moose Development/Moose/Shapes/Circle.lua index 04c153d86..3c4efc10c 100644 --- a/Moose Development/Moose/Shapes/Circle.lua +++ b/Moose Development/Moose/Shapes/Circle.lua @@ -17,12 +17,12 @@ -- # CIRCLE -- CIRCLEs can be fetched from the drawings in the Mission Editor +--- -- This class has some of the standard CIRCLE functions you'd expect. One function of interest is CIRCLE:PointInSector() that you can use if a point is -- within a certain sector (pizza slice) of a circle. This can be useful for many things, including rudimentary, "radar-like" searches from a unit. - +-- +-- CIRCLE class with properties and methods for handling circles. -- @field #CIRCLE - ---- CIRCLE class with properties and methods for handling circles. CIRCLE = { ClassName = "CIRCLE", Radius = nil, diff --git a/Moose Development/Moose/Shapes/Cube.lua b/Moose Development/Moose/Shapes/Cube.lua index ae3f73090..18448fe85 100644 --- a/Moose Development/Moose/Shapes/Cube.lua +++ b/Moose Development/Moose/Shapes/Cube.lua @@ -1,3 +1,21 @@ +--- +-- +-- ### Author: **nielsvaes/coconutcockpit** +-- +-- === +-- @module Shapes.CUBE + +--- LINE class. +-- @type CUBE +-- @field #string ClassName Name of the class. +-- @field #number Points points of the line +-- @field #number Coords coordinates of the line + +-- +-- === + +--- +-- @field #CUBE CUBE = { ClassName = "CUBE", Points = {}, diff --git a/Moose Development/Moose/Shapes/Line.lua b/Moose Development/Moose/Shapes/Line.lua index 08f7c84a0..9b860000d 100644 --- a/Moose Development/Moose/Shapes/Line.lua +++ b/Moose Development/Moose/Shapes/Line.lua @@ -1,12 +1,12 @@ --- +--- -- -- ### Author: **nielsvaes/coconutcockpit** -- -- === -- @module Shapes.LINE ---- OVAL class. --- @type OVAL +--- LINE class. +-- @type LINE -- @field #string ClassName Name of the class. -- @field #number Points points of the line -- @field #number Coords coordinates of the line @@ -14,6 +14,7 @@ -- -- === +--- -- @field #LINE LINE = { ClassName = "LINE", diff --git a/Moose Development/Moose/Shapes/Oval.lua b/Moose Development/Moose/Shapes/Oval.lua index d2f85a822..d1a65b58d 100644 --- a/Moose Development/Moose/Shapes/Oval.lua +++ b/Moose Development/Moose/Shapes/Oval.lua @@ -1,4 +1,4 @@ --- +--- -- -- ### Author: **nielsvaes/coconutcockpit** -- @@ -18,18 +18,17 @@ -- -- # OVAL -- OVALs can be fetched from the drawings in the Mission Editor - +-- -- The major and minor axes define how elongated the shape of an oval is. This class has some basic functions that the other SHAPE classes have as well. -- Since it's not possible to draw the shape of an oval while the mission is running, right now the draw function draws 2 cicles. One with the major axis and one with -- the minor axis. It then draws a diamond shape on an angle where the corners touch the major and minor axes to give an indication of what the oval actually -- looks like. - +-- -- Using ovals can be handy to find an area on the ground that is actually an intersection of a cone and a plane. So imagine you're faking the view cone of -- a targeting pod and --- @field #OVAL - --- OVAL class with properties and methods for handling ovals. +-- @field #OVAL OVAL = { ClassName = "OVAL", MajorAxis = nil, diff --git a/Moose Development/Moose/Shapes/Polygon.lua b/Moose Development/Moose/Shapes/Polygon.lua index a40256ecf..0d0707570 100644 --- a/Moose Development/Moose/Shapes/Polygon.lua +++ b/Moose Development/Moose/Shapes/Polygon.lua @@ -1,4 +1,4 @@ --- +--- -- -- ### Author: **nielsvaes/coconutcockpit** -- @@ -26,10 +26,10 @@ -- * A rect -- Use the POLYGON:FindOnMap() of POLYGON:Find() functions for this. You can also create a non existing polygon in memory using the POLYGON:New() function. Pass in a -- any number of Vec2s into this function to define the shape of the polygon you want. - +-- -- You can draw very intricate and complex polygons in the Mission Editor to avoid (or include) map objects. You can then generate random points within this complex -- shape for spawning groups or checking positions. - +-- -- When a POLYGON is made, it's automatically triangulated. The resulting triangles are stored in POLYGON.Triangles. This also immeadiately saves the surface area -- of the POLYGON. Because the POLYGON is triangulated, it's possible to generate random points within this POLYGON without having to use a trial and error method to see if -- the point is contained within the shape. @@ -37,9 +37,8 @@ -- which ignores the size of the triangles in the polygon to pick a random points. This will result in more points clumping together in parts of the polygon where the triangles are -- the smallest. - +--- -- @field #POLYGON - POLYGON = { ClassName = "POLYGON", Points = {}, diff --git a/Moose Development/Moose/Shapes/ShapeBase.lua b/Moose Development/Moose/Shapes/ShapeBase.lua index 7042a44ad..fdf8515c2 100644 --- a/Moose Development/Moose/Shapes/ShapeBase.lua +++ b/Moose Development/Moose/Shapes/ShapeBase.lua @@ -30,14 +30,12 @@ -- OVAL -- POLYGON -- TRIANGLE (although this one's a bit special as well) - +-- -- === -- The idea is that anything you draw on the map in the Mission Editor can be turned in a shape to work with in MOOSE. -- This is the base class that all other shape classes are built on. There are some shared functions, most of which are overridden in the derived classes - +-- -- @field #SHAPE_BASE - - SHAPE_BASE = { ClassName = "SHAPE_BASE", Name = "", diff --git a/Moose Development/Moose/Shapes/Triangle.lua b/Moose Development/Moose/Shapes/Triangle.lua index c60b2aeef..e0e752ce8 100644 --- a/Moose Development/Moose/Shapes/Triangle.lua +++ b/Moose Development/Moose/Shapes/Triangle.lua @@ -1,8 +1,22 @@ --- TRIANGLE class with properties and methods for handling triangles. This class is mostly used by the POLYGON class, but you can use it on its own as well +--- TRIANGLE class with properties and methods for handling triangles. This class is mostly used by the POLYGON class, but you can use it on its own as well -- -- ### Author: **nielsvaes/coconutcockpit** -- -- +-- === +-- @module Shapes.TRIANGLE + +--- LINE class. +-- @type CUBE +-- @field #string ClassName Name of the class. +-- @field #number Points points of the line +-- @field #number Coords coordinates of the line + +-- +-- === + +--- +-- @field #TRIANGLE TRIANGLE = { ClassName = "TRIANGLE", Points = {},