DCS volume pyramid

From DCS World Wiki - Hoggitworld.com

Scripting Root

Enumerator: pyramid Added with: 1.2.0
Description: The pyramid volume is used to define a search area for the functions that us a search volume. It can be used to mimic the point of view of a camera.

pos : position3 table formatted with p being the coordinates it is located at and x, y, z being velocity unit vectors.

 {   p = Vec3,
     x = Vec3,
     y = Vec3,
     z = Vec3 }

length : distance in meters

halfAngleHor: radians (probably) angle limits assumed to be greater than 0 but less than pi/2

halfAngleVer: radians (probably) angle limits assumed to be greater than 0 but less than pi/2

For example these values would result in a 4:1 aspect ratio where the width is 4x as wide as the height.

  halfAngleHor = math.rad(40)
  halfAngleVer = math.rad(10)

This image may help illustrate what it could look like.

Uses: world.searchObjects and world.removeJunk
Format: The following is the format of the pyramid table.
  {
  id = world.VolumeType.PYRAMID,
  params = {
    pos = Position3,
    length = Distance,
    halfAngleHor = Angle,
    halfAngleVer = Angle,
  }
 }
constants: N/A
notes: Volumes: segment, box, sphere, pyramid

I'm gonna be honest with you, I've never used this. -Grimes