Browse Source

Update CoordinateSpace docs;

bjorn 3 years ago
parent
commit
e9a438e61f

+ 38 - 38
api/init.lua

@@ -11801,10 +11801,10 @@ return {
                       description = "The index of the node."
                     },
                     {
-                      name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the orientation in.",
-                      default = "'global'"
+                      name = "origin",
+                      type = "OriginType",
+                      description = "Whether the orientation should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -11838,10 +11838,10 @@ return {
                       description = "The name of the node."
                     },
                     {
-                      name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the orientation in.",
-                      default = "'global'"
+                      name = "origin",
+                      type = "OriginType",
+                      description = "Whether the orientation should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -11940,10 +11940,10 @@ return {
                       description = "The index of a node."
                     },
                     {
-                      name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the pose in.",
-                      default = "'global'"
+                      name = "origin",
+                      type = "OriginType",
+                      description = "Whether the pose should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -11992,10 +11992,10 @@ return {
                       description = "The name of a node."
                     },
                     {
-                      name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the pose in.",
-                      default = "'global'"
+                      name = "origin",
+                      type = "OriginType",
+                      description = "Whether the pose should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -12065,9 +12065,9 @@ return {
                     },
                     {
                       name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the position in.",
-                      default = "'global'"
+                      type = "OriginType",
+                      description = "Whether the position should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -12097,9 +12097,9 @@ return {
                     },
                     {
                       name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the position in.",
-                      default = "'global'"
+                      type = "OriginType",
+                      description = "Whether the position should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -12148,10 +12148,10 @@ return {
                       description = "The index of the node."
                     },
                     {
-                      name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the scale in.",
-                      default = "'global'"
+                      name = "origin",
+                      type = "OriginType",
+                      description = "Whether the scale should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -12180,10 +12180,10 @@ return {
                       description = "The name of the node."
                     },
                     {
-                      name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the scale in.",
-                      default = "'global'"
+                      name = "origin",
+                      type = "OriginType",
+                      description = "Whether the scale should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -12232,10 +12232,10 @@ return {
                       description = "The index of a node."
                     },
                     {
-                      name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the transform in.",
-                      default = "'global'"
+                      name = "origin",
+                      type = "OriginType",
+                      description = "Whether the transform should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {
@@ -12299,10 +12299,10 @@ return {
                       description = "The name of a node."
                     },
                     {
-                      name = "space",
-                      type = "CoordinateSpace",
-                      description = "The coordinate space to return the transform in.",
-                      default = "'global'"
+                      name = "origin",
+                      type = "OriginType",
+                      description = "Whether the transform should be returned relative to the root node or the node's parent.",
+                      default = "'root'"
                     }
                   },
                   returns = {

+ 8 - 6
api/lovr/graphics/Model/getNodeOrientation.lua

@@ -10,10 +10,12 @@ return {
       type = 'string',
       description = 'The name of the node.'
     },
-    space = {
-      type = 'CoordinateSpace',
-      default = [['global']],
-      description = 'The coordinate space to return the orientation in.'
+    origin = {
+      type = 'OriginType',
+      default = [['root']],
+      description = [[
+        Whether the orientation should be returned relative to the root node or the node's parent.
+      ]]
     }
   },
   returns = {
@@ -36,11 +38,11 @@ return {
   },
   variants = {
     {
-      arguments = { 'index', 'space' },
+      arguments = { 'index', 'origin' },
       returns = { 'angle', 'ax', 'ay', 'az' }
     },
     {
-      arguments = { 'name', 'space' },
+      arguments = { 'name', 'origin' },
       returns = { 'angle', 'ax', 'ay', 'az' }
     }
   },

+ 8 - 6
api/lovr/graphics/Model/getNodePose.lua

@@ -10,10 +10,12 @@ return {
       type = 'string',
       description = 'The name of a node.'
     },
-    space = {
-      type = 'CoordinateSpace',
-      default = [['global']],
-      description = 'The coordinate space to return the pose in.'
+    origin = {
+      type = 'OriginType',
+      default = [['root']],
+      description = [[
+        Whether the pose should be returned relative to the root node or the node's parent.
+      ]]
     }
   },
   returns = {
@@ -48,11 +50,11 @@ return {
   },
   variants = {
     {
-      arguments = { 'index', 'space' },
+      arguments = { 'index', 'origin' },
       returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
     },
     {
-      arguments = { 'name', 'space' },
+      arguments = { 'name', 'origin' },
       returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
     }
   },

+ 5 - 3
api/lovr/graphics/Model/getNodePosition.lua

@@ -11,9 +11,11 @@ return {
       description = 'The name of the node.'
     },
     space = {
-      type = 'CoordinateSpace',
-      default = [['global']],
-      description = 'The coordinate space to return the position in.'
+      type = 'OriginType',
+      default = [['root']],
+      description = [[
+        Whether the position should be returned relative to the root node or the node's parent.
+      ]]
     }
   },
   returns = {

+ 8 - 6
api/lovr/graphics/Model/getNodeScale.lua

@@ -10,10 +10,12 @@ return {
       type = 'string',
       description = 'The name of the node.'
     },
-    space = {
-      type = 'CoordinateSpace',
-      default = [['global']],
-      description = 'The coordinate space to return the scale in.'
+    origin = {
+      type = 'OriginType',
+      default = [['root']],
+      description = [[
+        Whether the scale should be returned relative to the root node or the node's parent.
+      ]]
     }
   },
   returns = {
@@ -32,11 +34,11 @@ return {
   },
   variants = {
     {
-      arguments = { 'index', 'space' },
+      arguments = { 'index', 'origin' },
       returns = { 'x', 'y', 'z' }
     },
     {
-      arguments = { 'name', 'space' },
+      arguments = { 'name', 'origin' },
       returns = { 'x', 'y', 'z' }
     }
   },

+ 8 - 6
api/lovr/graphics/Model/getNodeTransform.lua

@@ -10,10 +10,12 @@ return {
       type = 'string',
       description = 'The name of a node.'
     },
-    space = {
-      type = 'CoordinateSpace',
-      default = [['global']],
-      description = 'The coordinate space to return the transform in.'
+    origin = {
+      type = 'OriginType',
+      default = [['root']],
+      description = [[
+        Whether the transform should be returned relative to the root node or the node's parent.
+      ]]
     }
   },
   returns = {
@@ -60,11 +62,11 @@ return {
   },
   variants = {
     {
-      arguments = { 'index', 'space' },
+      arguments = { 'index', 'origin' },
       returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
     },
     {
-      arguments = { 'name', 'space' },
+      arguments = { 'name', 'origin' },
       returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
     }
   },