Spot#
Spot represents a laser or infra-red pointer spot, such as those used for laser
target marking or NVG-visible IR pointers. Spot is a final class – it does not
extend or get extended by any other class.
- class Spot#
Static functions#
- static createLaser(source, localRef, point, code)#
Creates a laser spot originating from
source, aimed atpoint.- Parameters:
source (
Object) – The object the laser spot originates from.localRef (
table) – Optional local offset from the source’s position.point (
table) – The point the laser is aimed at.code (
number) – Laser code (seeSpot.setCode()).
- Returns:
The newly created laser spot.
- Return type:
- static createInfraRed(source, localRef, point)#
Creates an infra-red pointer spot originating from
source, aimed atpoint.
Member functions#
- destroy()#
Removes the spot from the simulation.
- getCategory()#
Returns the spot’s category (see Spot.Category).
- Returns:
Spot category.
- Return type:
number
- getPoint()#
Returns the point the spot is currently aimed at.
- Returns:
Aim point.
- Return type:
table
- setPoint(point)#
Updates the point the spot is aimed at.
- Parameters:
point (
table) – New aim point.
- getCode()#
For laser spots, returns the current laser code.
- Returns:
Laser code.
- Return type:
number
- setCode(code)#
For laser spots, sets the laser code (used by laser-guided weapons to match a specific designator).
- Parameters:
code (
number) – New laser code.
Enumerators#
Spot.Category identifies the type of spot:
Value |
Meaning |
|---|---|
|
Infra-red pointer spot. |
|
Laser spot. |