Added methods to POINT_VEC3 and documented

This commit is contained in:
FlightControl 2017-03-03 08:31:45 +01:00
parent 83447468f8
commit 5d17cde83a
6 changed files with 248 additions and 18 deletions

View File

@ -7,13 +7,42 @@
-- **Important Note:** Most of the functions in this section were taken from MIST, and reworked to OO concepts.
-- In order to keep the credibility of the the author, I want to emphasize that the of the MIST framework was created by Grimes, who you can find on the Eagle Dynamics Forums.
--
-- 1.1) POINT_VEC3 constructor
-- ---------------------------
-- ## 1.1) POINT_VEC3 constructor
--
-- A new POINT_VEC3 instance can be created with:
--
-- * @{Point#POINT_VEC3.New}(): a 3D point.
-- * @{Point#POINT_VEC3.NewFromVec3}(): a 3D point created from a @{DCSTypes#Vec3}.
--
--
-- ## 1.2) Smoke, flare, explode, illuminate
--
-- At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:
--
-- ### 1.2.1) Smoke
--
-- * @{#POINT_VEC3.Smoke}(): To smoke the point in a certain color.
-- * @{#POINT_VEC3.SmokeBlue}(): To smoke the point in blue.
-- * @{#POINT_VEC3.SmokeRed}(): To smoke the point in red.
-- * @{#POINT_VEC3.SmokeOrange}(): To smoke the point in orange.
-- * @{#POINT_VEC3.SmokeWhite}(): To smoke the point in white.
-- * @{#POINT_VEC3.SmokeGreen}(): To smoke the point in green.
--
-- ### 1.2.2) Flare
--
-- * @{#POINT_VEC3.Flare}(): To flare the point in a certain color.
-- * @{#POINT_VEC3.FlareRed}(): To flare the point in red.
-- * @{#POINT_VEC3.FlareYellow}(): To flare the point in yellow.
-- * @{#POINT_VEC3.FlareWhite}(): To flare the point in white.
-- * @{#POINT_VEC3.FlareGreen}(): To flare the point in green.
--
-- ### 1.2.3) Explode
--
-- * @{#POINT_VEC3.Explosion}(): To explode the point with a certain intensity.
--
-- ### 1.2.4) Illuminate
--
-- * @{#POINT_VEC3.IlluminationBomb}(): To illuminate the point.
--
--
-- 2) @{Point#POINT_VEC2} class, extends @{Point#POINT_VEC3}
-- =========================================================
@ -38,9 +67,12 @@
--
-- Hereby the change log:
--
-- 2017-02-18: POINT_VEC3:**NewFromVec2( Vec2, LandHeightAdd )** added.
-- 2017-03-03: POINT\_VEC3:**Explosion( ExplosionIntensity )** added.
-- 2017-03-03: POINT\_VEC3:**IlluminationBomb()** added.
--
-- 2016-08-12: POINT_VEC3:**Translate( Distance, Angle )** added.
-- 2017-02-18: POINT\_VEC3:**NewFromVec2( Vec2, LandHeightAdd )** added.
--
-- 2016-08-12: POINT\_VEC3:**Translate( Distance, Angle )** added.
--
-- 2016-08-06: Made PointVec3 and Vec3, PointVec2 and Vec2 terminology used in the code consistent.
--
@ -501,6 +533,21 @@ function POINT_VEC3:RoutePointGround( Speed, Formation )
return RoutePoint
end
--- Creates an explosion at the point of a certain intensity.
-- @param #POINT_VEC3 self
-- @param #number ExplosionIntensity
function POINT_VEC3:Explosion( ExplosionIntensity )
self:F2( { ExplosionIntensity } )
trigger.action.explosion( self:GetVec3(), ExplosionIntensity )
end
--- Creates an illumination bomb at the point.
-- @param #POINT_VEC3 self
function POINT_VEC3:IlluminationBomb()
self:F2()
trigger.action.illuminationBomb( self:GetVec3() )
end
--- Smokes the point in a color.
-- @param #POINT_VEC3 self

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170303_0807' )
env.info( 'Moose Generation Timestamp: 20170303_0827' )
local base = _G
Include = {}
@ -10177,13 +10177,42 @@ end
-- **Important Note:** Most of the functions in this section were taken from MIST, and reworked to OO concepts.
-- In order to keep the credibility of the the author, I want to emphasize that the of the MIST framework was created by Grimes, who you can find on the Eagle Dynamics Forums.
--
-- 1.1) POINT_VEC3 constructor
-- ---------------------------
-- ## 1.1) POINT_VEC3 constructor
--
-- A new POINT_VEC3 instance can be created with:
--
-- * @{Point#POINT_VEC3.New}(): a 3D point.
-- * @{Point#POINT_VEC3.NewFromVec3}(): a 3D point created from a @{DCSTypes#Vec3}.
--
--
-- ## 1.2) Smoke, flare, explode, illuminate
--
-- At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:
--
-- ### 1.2.1) Smoke
--
-- * @{#POINT_VEC3.Smoke}(): To smoke the point in a certain color.
-- * @{#POINT_VEC3.SmokeBlue}(): To smoke the point in blue.
-- * @{#POINT_VEC3.SmokeRed}(): To smoke the point in red.
-- * @{#POINT_VEC3.SmokeOrange}(): To smoke the point in orange.
-- * @{#POINT_VEC3.SmokeWhite}(): To smoke the point in white.
-- * @{#POINT_VEC3.SmokeGreen}(): To smoke the point in green.
--
-- ### 1.2.2) Flare
--
-- * @{#POINT_VEC3.Flare}(): To flare the point in a certain color.
-- * @{#POINT_VEC3.FlareRed}(): To flare the point in red.
-- * @{#POINT_VEC3.FlareYellow}(): To flare the point in yellow.
-- * @{#POINT_VEC3.FlareWhite}(): To flare the point in white.
-- * @{#POINT_VEC3.FlareGreen}(): To flare the point in green.
--
-- ### 1.2.3) Explode
--
-- * @{#POINT_VEC3.Explosion}(): To explode the point with a certain intensity.
--
-- ### 1.2.4) Illuminate
--
-- * @{#POINT_VEC3.IlluminationBomb}(): To illuminate the point.
--
--
-- 2) @{Point#POINT_VEC2} class, extends @{Point#POINT_VEC3}
-- =========================================================
@ -10208,9 +10237,12 @@ end
--
-- Hereby the change log:
--
-- 2017-02-18: POINT_VEC3:**NewFromVec2( Vec2, LandHeightAdd )** added.
-- 2017-03-03: POINT\_VEC3:**Explosion( ExplosionIntensity )** added.
-- 2017-03-03: POINT\_VEC3:**IlluminationBomb()** added.
--
-- 2016-08-12: POINT_VEC3:**Translate( Distance, Angle )** added.
-- 2017-02-18: POINT\_VEC3:**NewFromVec2( Vec2, LandHeightAdd )** added.
--
-- 2016-08-12: POINT\_VEC3:**Translate( Distance, Angle )** added.
--
-- 2016-08-06: Made PointVec3 and Vec3, PointVec2 and Vec2 terminology used in the code consistent.
--
@ -10671,6 +10703,21 @@ function POINT_VEC3:RoutePointGround( Speed, Formation )
return RoutePoint
end
--- Creates an explosion at the point of a certain intensity.
-- @param #POINT_VEC3 self
-- @param #number ExplosionIntensity
function POINT_VEC3:Explosion( ExplosionIntensity )
self:F2( { ExplosionIntensity } )
trigger.action.explosion( self:GetVec3(), ExplosionIntensity )
end
--- Creates an illumination bomb at the point.
-- @param #POINT_VEC3 self
function POINT_VEC3:IlluminationBomb()
self:F2()
trigger.action.illuminationBomb( self:GetVec3() )
end
--- Smokes the point in a color.
-- @param #POINT_VEC3 self

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170303_0807' )
env.info( 'Moose Generation Timestamp: 20170303_0827' )
local base = _G
Include = {}
@ -10177,13 +10177,42 @@ end
-- **Important Note:** Most of the functions in this section were taken from MIST, and reworked to OO concepts.
-- In order to keep the credibility of the the author, I want to emphasize that the of the MIST framework was created by Grimes, who you can find on the Eagle Dynamics Forums.
--
-- 1.1) POINT_VEC3 constructor
-- ---------------------------
-- ## 1.1) POINT_VEC3 constructor
--
-- A new POINT_VEC3 instance can be created with:
--
-- * @{Point#POINT_VEC3.New}(): a 3D point.
-- * @{Point#POINT_VEC3.NewFromVec3}(): a 3D point created from a @{DCSTypes#Vec3}.
--
--
-- ## 1.2) Smoke, flare, explode, illuminate
--
-- At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:
--
-- ### 1.2.1) Smoke
--
-- * @{#POINT_VEC3.Smoke}(): To smoke the point in a certain color.
-- * @{#POINT_VEC3.SmokeBlue}(): To smoke the point in blue.
-- * @{#POINT_VEC3.SmokeRed}(): To smoke the point in red.
-- * @{#POINT_VEC3.SmokeOrange}(): To smoke the point in orange.
-- * @{#POINT_VEC3.SmokeWhite}(): To smoke the point in white.
-- * @{#POINT_VEC3.SmokeGreen}(): To smoke the point in green.
--
-- ### 1.2.2) Flare
--
-- * @{#POINT_VEC3.Flare}(): To flare the point in a certain color.
-- * @{#POINT_VEC3.FlareRed}(): To flare the point in red.
-- * @{#POINT_VEC3.FlareYellow}(): To flare the point in yellow.
-- * @{#POINT_VEC3.FlareWhite}(): To flare the point in white.
-- * @{#POINT_VEC3.FlareGreen}(): To flare the point in green.
--
-- ### 1.2.3) Explode
--
-- * @{#POINT_VEC3.Explosion}(): To explode the point with a certain intensity.
--
-- ### 1.2.4) Illuminate
--
-- * @{#POINT_VEC3.IlluminationBomb}(): To illuminate the point.
--
--
-- 2) @{Point#POINT_VEC2} class, extends @{Point#POINT_VEC3}
-- =========================================================
@ -10208,9 +10237,12 @@ end
--
-- Hereby the change log:
--
-- 2017-02-18: POINT_VEC3:**NewFromVec2( Vec2, LandHeightAdd )** added.
-- 2017-03-03: POINT\_VEC3:**Explosion( ExplosionIntensity )** added.
-- 2017-03-03: POINT\_VEC3:**IlluminationBomb()** added.
--
-- 2016-08-12: POINT_VEC3:**Translate( Distance, Angle )** added.
-- 2017-02-18: POINT\_VEC3:**NewFromVec2( Vec2, LandHeightAdd )** added.
--
-- 2016-08-12: POINT\_VEC3:**Translate( Distance, Angle )** added.
--
-- 2016-08-06: Made PointVec3 and Vec3, PointVec2 and Vec2 terminology used in the code consistent.
--
@ -10671,6 +10703,21 @@ function POINT_VEC3:RoutePointGround( Speed, Formation )
return RoutePoint
end
--- Creates an explosion at the point of a certain intensity.
-- @param #POINT_VEC3 self
-- @param #number ExplosionIntensity
function POINT_VEC3:Explosion( ExplosionIntensity )
self:F2( { ExplosionIntensity } )
trigger.action.explosion( self:GetVec3(), ExplosionIntensity )
end
--- Creates an illumination bomb at the point.
-- @param #POINT_VEC3 self
function POINT_VEC3:IlluminationBomb()
self:F2()
trigger.action.illuminationBomb( self:GetVec3() )
end
--- Smokes the point in a color.
-- @param #POINT_VEC3 self

View File

@ -8,7 +8,7 @@ MOOSE works with DCS world 1.5. and 2.0.
The goal of MOOSE is to allow mission designers to enhance their scripting with mission orchestration objects, which can be instantiated from defined classes within the framework. This will allow to write mission scripts with minimal code embedded. Of course, the richness of the framework will determine the richness of the misson scenarios.
The MOOSE is a service that is produced while being consumed ... , it will evolve further as more classes are developed for the framework, and as more users are using it.
MOOSE is meant to be a one-man show, it is meant to evolve within a growing community around the framework.
MOOSE is not a one-man show, it is a collaborative effort and meant to evolve within a growing community around the framework.
Within the community, key users will start supporting, documenting, explaining and even creating new classes for the framework.
It is the ambition to grow this framework as a de-facto standard for mission designers to use.

View File

@ -83,6 +83,7 @@
In order to keep the credibility of the the author, I want to emphasize that the of the MIST framework was created by Grimes, who you can find on the Eagle Dynamics Forums.</p>
<h2>1.1) POINT_VEC3 constructor</h2>
<p>A new POINT_VEC3 instance can be created with:</p>
<ul>
@ -90,6 +91,43 @@ In order to keep the credibility of the the author, I want to emphasize that the
<li><a href="Point.html##(POINT_VEC3).NewFromVec3">Point#POINT_VEC3.NewFromVec3</a>(): a 3D point created from a <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a>.</li>
</ul>
<h2>1.2) Smoke, flare, explode, illuminate</h2>
<p>At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:</p>
<h3>1.2.1) Smoke</h3>
<ul>
<li><a href="##(POINT_VEC3).Smoke">POINT_VEC3.Smoke</a>(): To smoke the point in a certain color.</li>
<li><a href="##(POINT_VEC3).SmokeBlue">POINT_VEC3.SmokeBlue</a>(): To smoke the point in blue.</li>
<li><a href="##(POINT_VEC3).SmokeRed">POINT_VEC3.SmokeRed</a>(): To smoke the point in red.</li>
<li><a href="##(POINT_VEC3).SmokeOrange">POINT_VEC3.SmokeOrange</a>(): To smoke the point in orange.</li>
<li><a href="##(POINT_VEC3).SmokeWhite">POINT_VEC3.SmokeWhite</a>(): To smoke the point in white.</li>
<li><a href="##(POINT_VEC3).SmokeGreen">POINT_VEC3.SmokeGreen</a>(): To smoke the point in green.</li>
</ul>
<h3>1.2.2) Flare</h3>
<ul>
<li><a href="##(POINT_VEC3).Flare">POINT_VEC3.Flare</a>(): To flare the point in a certain color.</li>
<li><a href="##(POINT_VEC3).FlareRed">POINT_VEC3.FlareRed</a>(): To flare the point in red.</li>
<li><a href="##(POINT_VEC3).FlareYellow">POINT_VEC3.FlareYellow</a>(): To flare the point in yellow.</li>
<li><a href="##(POINT_VEC3).FlareWhite">POINT_VEC3.FlareWhite</a>(): To flare the point in white.</li>
<li><a href="##(POINT_VEC3).FlareGreen">POINT_VEC3.FlareGreen</a>(): To flare the point in green.</li>
</ul>
<h3>1.2.3) Explode</h3>
<ul>
<li><a href="##(POINT_VEC3).Explosion">POINT_VEC3.Explosion</a>(): To explode the point with a certain intensity.</li>
</ul>
<h3>1.2.4) Illuminate</h3>
<ul>
<li><a href="##(POINT_VEC3).IlluminationBomb">POINT_VEC3.IlluminationBomb</a>(): To illuminate the point.</li>
</ul>
<h1>2) <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a> class, extends <a href="Point.html##(POINT_VEC3)">Point#POINT_VEC3</a></h1>
<p>The <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a> class defines a 2D point in the simulator. The height coordinate (if needed) will be the land height + an optional added height specified.</p>
@ -115,6 +153,9 @@ In order to keep the credibility of the the author, I want to emphasize that the
<p>Hereby the change log:</p>
<p>2017-03-03: POINT_VEC3:<strong>Explosion( ExplosionIntensity )</strong> added. <br/>
2017-03-03: POINT_VEC3:<strong>IlluminationBomb()</strong> added. </p>
<p>2017-02-18: POINT_VEC3:<strong>NewFromVec2( Vec2, LandHeightAdd )</strong> added.</p>
<p>2016-08-12: POINT_VEC3:<strong>Translate( Distance, Angle )</strong> added.</p>
@ -252,6 +293,12 @@ In order to keep the credibility of the the author, I want to emphasize that the
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).ClassName">POINT_VEC3.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).Explosion">POINT_VEC3:Explosion(ExplosionIntensity)</a></td>
<td class="summary">
<p>Creates an explosion at the point of a certain intensity.</p>
</td>
</tr>
<tr>
@ -384,6 +431,12 @@ In order to keep the credibility of the the author, I want to emphasize that the
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).GetZ">POINT_VEC3:GetZ()</a></td>
<td class="summary">
<p>Return the z coordinate of the POINT_VEC3.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).IlluminationBomb">POINT_VEC3:IlluminationBomb()</a></td>
<td class="summary">
<p>Creates an illumination bomb at the point.</p>
</td>
</tr>
<tr>
@ -999,6 +1052,27 @@ The new calculated POINT_VEC2.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(POINT_VEC3).Explosion" >
<strong>POINT_VEC3:Explosion(ExplosionIntensity)</strong>
</a>
</dt>
<dd>
<p>Creates an explosion at the point of a certain intensity.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number ExplosionIntensity </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
@ -1537,6 +1611,19 @@ The z coodinate.</p>
<dl class="function">
<dt>
<a id="#(POINT_VEC3).IlluminationBomb" >
<strong>POINT_VEC3:IlluminationBomb()</strong>
</a>
</dt>
<dd>
<p>Creates an illumination bomb at the point.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(POINT_VEC3).IsMetric" >
<strong>POINT_VEC3:IsMetric()</strong>
</a>

View File

@ -205,6 +205,8 @@ MOOSE Functional Classes provide various functions that are useful in mission de
* [DETECTION](Documentation/Detection.html): Detect other units using the available sensors of the detection unit. The DETECTION_BASE derived classes will provide different methods how the sets of detected objects are built.
* [SCORING](Documentation/Scoring.html): Administer the scoring of player achievements, and create a CSV file logging the scoring events for use at team or squadron websites.
## 7.4) MOOSE AI Controlling Classes
MOOSE AI Controlling Classes provide mechanisms to control AI over long lasting processes.