Browse Source

rm HeadsetEye variants of pose accessors;

bjorn 6 years ago
parent
commit
e8a6bb8aad
4 changed files with 33 additions and 173 deletions
  1. 2 108
      api/init.lua
  2. 9 21
      api/lovr/headset/getOrientation.lua
  3. 15 24
      api/lovr/headset/getPose.lua
  4. 7 20
      api/lovr/headset/getPosition.lua

+ 2 - 108
api/init.lua

@@ -13278,38 +13278,6 @@ return {
                   description = "The z component of the axis of rotation."
                   description = "The z component of the axis of rotation."
                 }
                 }
               }
               }
-            },
-            {
-              description = "Get the orientation of a single eye.",
-              arguments = {
-                {
-                  name = "eye",
-                  type = "HeadsetEye",
-                  description = "The eye to get the orientation of."
-                }
-              },
-              returns = {
-                {
-                  name = "angle",
-                  type = "number",
-                  description = "The amount of rotation around the axis of rotation."
-                },
-                {
-                  name = "ax",
-                  type = "number",
-                  description = "The x component of the axis of rotation."
-                },
-                {
-                  name = "ay",
-                  type = "number",
-                  description = "The y component of the axis of rotation."
-                },
-                {
-                  name = "az",
-                  type = "number",
-                  description = "The z component of the axis of rotation."
-                }
-              }
             }
             }
           }
           }
         },
         },
@@ -13343,7 +13311,6 @@ return {
           description = "Returns the current position and orientation of the headset.",
           description = "Returns the current position and orientation of the headset.",
           key = "lovr.headset.getPose",
           key = "lovr.headset.getPose",
           module = "lovr.headset",
           module = "lovr.headset",
-          notes = "Units are in meters.",
           variants = {
           variants = {
             {
             {
               arguments = {},
               arguments = {},
@@ -13384,59 +13351,13 @@ return {
                   description = "The z component of the axis of rotation."
                   description = "The z component of the axis of rotation."
                 }
                 }
               }
               }
-            },
-            {
-              description = "Get the pose of an eye.",
-              arguments = {
-                {
-                  name = "eye",
-                  type = "HeadsetEye",
-                  description = "The eye to get the pose of."
-                }
-              },
-              returns = {
-                {
-                  name = "x",
-                  type = "number",
-                  description = "The x position."
-                },
-                {
-                  name = "y",
-                  type = "number",
-                  description = "The y position."
-                },
-                {
-                  name = "z",
-                  type = "number",
-                  description = "The z position."
-                },
-                {
-                  name = "angle",
-                  type = "number",
-                  description = "The amount of rotation around the axis of rotation, in radians."
-                },
-                {
-                  name = "ax",
-                  type = "number",
-                  description = "The x component of the axis of rotation."
-                },
-                {
-                  name = "ay",
-                  type = "number",
-                  description = "The y component of the axis of rotation."
-                },
-                {
-                  name = "az",
-                  type = "number",
-                  description = "The z component of the axis of rotation."
-                }
-              }
             }
             }
           },
           },
           related = {
           related = {
             "lovr.headset.getPosition",
             "lovr.headset.getPosition",
             "lovr.headset.getOrientation"
             "lovr.headset.getOrientation"
-          }
+          },
+          notes = "Units are in meters."
         },
         },
         {
         {
           name = "getPosition",
           name = "getPosition",
@@ -13470,33 +13391,6 @@ return {
                   description = "The z position of the headset."
                   description = "The z position of the headset."
                 }
                 }
               }
               }
-            },
-            {
-              description = "Get the position of an eye.",
-              arguments = {
-                {
-                  name = "eye",
-                  type = "HeadsetEye",
-                  description = "The eye to get the position of."
-                }
-              },
-              returns = {
-                {
-                  name = "x",
-                  type = "number",
-                  description = "The x position of the headset."
-                },
-                {
-                  name = "y",
-                  type = "number",
-                  description = "The y position of the headset."
-                },
-                {
-                  name = "z",
-                  type = "number",
-                  description = "The z position of the headset."
-                }
-              }
             }
             }
           }
           }
         },
         },

+ 9 - 21
api/lovr/headset/getOrientation.lua

@@ -2,41 +2,29 @@ return {
   tag = 'headset',
   tag = 'headset',
   summary = 'Get the orientation of the headset.',
   summary = 'Get the orientation of the headset.',
   description = 'Returns the current orientation of the headset.',
   description = 'Returns the current orientation of the headset.',
-  arguments = {
-    eye = {
-      type = 'HeadsetEye',
-      description = 'The eye to get the orientation of.'
-    }
-  },
+  arguments = {},
   returns = {
   returns = {
-    angle = {
+    {
+      name = 'angle',
       type = 'number',
       type = 'number',
       description = 'The amount of rotation around the axis of rotation.'
       description = 'The amount of rotation around the axis of rotation.'
     },
     },
-    ax = {
+    {
+      name = 'ax',
       type = 'number',
       type = 'number',
       description = 'The x component of the axis of rotation.'
       description = 'The x component of the axis of rotation.'
     },
     },
-    ay = {
+    {
+      name = 'ay',
       type = 'number',
       type = 'number',
       description = 'The y component of the axis of rotation.'
       description = 'The y component of the axis of rotation.'
     },
     },
-    az = {
+    {
+      name = 'az',
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
     }
     }
   },
   },
-  variants = {
-    {
-      arguments = {},
-      returns = { 'angle', 'ax', 'ay', 'az' }
-    },
-    {
-      description = 'Get the orientation of a single eye.',
-      arguments = { 'eye' },
-      returns = { 'angle', 'ax', 'ay', 'az' }
-    }
-  },
   related = {
   related = {
     'lovr.headset.getPosition',
     'lovr.headset.getPosition',
     'lovr.headset.getVelocity',
     'lovr.headset.getVelocity',

+ 15 - 24
api/lovr/headset/getPose.lua

@@ -2,53 +2,44 @@ return {
   tag = 'headset',
   tag = 'headset',
   summary = 'Get the pose of the headset.',
   summary = 'Get the pose of the headset.',
   description = 'Returns the current position and orientation of the headset.',
   description = 'Returns the current position and orientation of the headset.',
-  arguments = {
-    eye = {
-      type = 'HeadsetEye',
-      description = 'The eye to get the pose of.'
-    }
-  },
+  arguments = {},
   returns = {
   returns = {
-    x = {
+    {
+      name = 'x',
       type = 'number',
       type = 'number',
       description = 'The x position.'
       description = 'The x position.'
     },
     },
-    y = {
+    {
+      name = 'y',
       type = 'number',
       type = 'number',
       description = 'The y position.'
       description = 'The y position.'
     },
     },
-    z = {
+    {
+      name = 'z',
       type = 'number',
       type = 'number',
       description = 'The z position.'
       description = 'The z position.'
     },
     },
-    angle = {
+    {
+      name = 'angle',
       type = 'number',
       type = 'number',
       description = 'The amount of rotation around the axis of rotation, in radians.'
       description = 'The amount of rotation around the axis of rotation, in radians.'
     },
     },
-    ax = {
+    {
+      name = 'ax',
       type = 'number',
       type = 'number',
       description = 'The x component of the axis of rotation.'
       description = 'The x component of the axis of rotation.'
     },
     },
-    ay = {
+    {
+      name = 'ay',
       type = 'number',
       type = 'number',
       description = 'The y component of the axis of rotation.'
       description = 'The y component of the axis of rotation.'
     },
     },
-    az = {
+    {
+      name = 'az',
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
     }
     }
   },
   },
-  variants = {
-    {
-      arguments = {},
-      returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
-    },
-    {
-      description = 'Get the pose of an eye.',
-      arguments = { 'eye' },
-      returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
-    }
-  },
   notes = 'Units are in meters.',
   notes = 'Units are in meters.',
   related = {
   related = {
     'lovr.headset.getPosition',
     'lovr.headset.getPosition',

+ 7 - 20
api/lovr/headset/getPosition.lua

@@ -2,37 +2,24 @@ return {
   tag = 'headset',
   tag = 'headset',
   summary = 'Get the position of the headset.',
   summary = 'Get the position of the headset.',
   description = 'Returns the current position of the headset.',
   description = 'Returns the current position of the headset.',
-  arguments = {
-    eye = {
-      type = 'HeadsetEye',
-      description = 'The eye to get the position of.'
-    }
-  },
+  arguments = {},
   returns = {
   returns = {
-    x = {
+    {
+      name = 'x',
       type = 'number',
       type = 'number',
       description = 'The x position of the headset.'
       description = 'The x position of the headset.'
     },
     },
-    y = {
+    {
+      name = 'y',
       type = 'number',
       type = 'number',
       description = 'The y position of the headset.'
       description = 'The y position of the headset.'
     },
     },
-    z = {
+    {
+      name = 'z',
       type = 'number',
       type = 'number',
       description = 'The z position of the headset.'
       description = 'The z position of the headset.'
     }
     }
   },
   },
-  variants = {
-    {
-      arguments = {},
-      returns = { 'x', 'y', 'z' }
-    },
-    {
-      description = 'Get the position of an eye.',
-      arguments = { 'eye' },
-      returns = { 'x', 'y', 'z' }
-    }
-  },
   related = {
   related = {
     'lovr.headset.getOrientation',
     'lovr.headset.getOrientation',
     'lovr.headset.getVelocity',
     'lovr.headset.getVelocity',