Rename Rect3 to AABB to sync with Godot
This commit is contained in:
parent
cc6bfa0045
commit
bf5bd54356
13 changed files with 195 additions and 195 deletions
|
|
@ -152,7 +152,7 @@ exported and you don't have to import any of them directly.
|
||||||
* `quats <quats.html>`_ Defines ``Quat`` (quaternion) describing object
|
* `quats <quats.html>`_ Defines ``Quat`` (quaternion) describing object
|
||||||
rotation in 3D space.
|
rotation in 3D space.
|
||||||
* `rect2 <rect2.html>`_ Defines ``Rect2`` - a 2D rectangle.
|
* `rect2 <rect2.html>`_ Defines ``Rect2`` - a 2D rectangle.
|
||||||
* `rect3 <rect3.html>`_ Defines ``Rect3`` - a 3D box.
|
* `aabb <aabb.html>`_ Defines ``AABB`` - a 3D box.
|
||||||
* `rids <rids.html>`_ Defines ``RID`` - a resource identifier.
|
* `rids <rids.html>`_ Defines ``RID`` - a resource identifier.
|
||||||
* `transform2d <transform2d.html>`_ Defines ``Transform2D``.
|
* `transform2d <transform2d.html>`_ Defines ``Transform2D``.
|
||||||
* `transforms <transforms.html>`_ Defines ``Transform``.
|
* `transforms <transforms.html>`_ Defines ``Transform``.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
version = "0.6.4"
|
version = "0.6.5"
|
||||||
author = "Xored Software, Inc."
|
author = "Xored Software, Inc."
|
||||||
description = "Godot Engine bindings"
|
description = "Godot Engine bindings"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
||||||
73
godot/core/aabb.nim
Normal file
73
godot/core/aabb.nim
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
# Copyright (c) 2017 Xored Software, Inc.
|
||||||
|
|
||||||
|
import internal.godotinternaltypes, internal.godotstrings
|
||||||
|
import godotcoretypes, gdnativeapi
|
||||||
|
|
||||||
|
proc initAABB*(pos, size: Vector3): AABB {.inline.} =
|
||||||
|
AABB(position: pos, size: size)
|
||||||
|
|
||||||
|
proc `$`*(self: AABB): string {.inline.} =
|
||||||
|
$getGDNativeAPI().aabbAsString(self)
|
||||||
|
|
||||||
|
proc area*(self: AABB): float32 {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetArea(self)
|
||||||
|
|
||||||
|
proc hasNoArea*(self: AABB): bool {.inline.} =
|
||||||
|
getGDNativeAPI().aabbHasNoArea(self)
|
||||||
|
|
||||||
|
proc hasNoSurface*(self: AABB): bool {.inline.} =
|
||||||
|
getGDNativeAPI().aabbHasNoSurface(self)
|
||||||
|
|
||||||
|
proc intersects*(self, other: AABB): bool {.inline.} =
|
||||||
|
getGDNativeAPI().aabbIntersects(self, other)
|
||||||
|
|
||||||
|
proc encloses*(self, other: AABB): bool {.inline.} =
|
||||||
|
getGDNativeAPI().aabbEncloses(self, other)
|
||||||
|
|
||||||
|
proc merge*(self, other: AABB): AABB {.inline.} =
|
||||||
|
getGDNativeAPI().aabbMerge(self, other)
|
||||||
|
|
||||||
|
proc intersection*(self, other: AABB): AABB {.inline.} =
|
||||||
|
getGDNativeAPI().aabbIntersection(self, other)
|
||||||
|
|
||||||
|
proc intersectsPlane*(self: AABB; plane: Plane): bool {.inline.} =
|
||||||
|
getGDNativeAPI().aabbIntersectsPlane(self, plane)
|
||||||
|
|
||||||
|
proc intersectsSegment*(self: AABB; start, to: Vector3): bool {.inline.} =
|
||||||
|
getGDNativeAPI().aabbIntersectsSegment(self, start, to)
|
||||||
|
|
||||||
|
proc contains*(self: AABB; point: Vector3): bool {.inline.} =
|
||||||
|
getGDNativeAPI().aabbHasPoint(self, point)
|
||||||
|
|
||||||
|
proc getSupport*(self: AABB; dir: Vector3): Vector3 {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetSupport(self, dir)
|
||||||
|
|
||||||
|
proc getLongestAxis*(self: AABB): Vector3 {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetLongestAxis(self)
|
||||||
|
|
||||||
|
proc getLongestAxisIndex*(self: AABB): cint {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetLongestAxisIndex(self)
|
||||||
|
|
||||||
|
proc getLongestAxisSize*(self: AABB): float32 {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetLongestAxisSize(self)
|
||||||
|
|
||||||
|
proc getShortestAxis*(self: AABB): Vector3 {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetShortestAxis(self)
|
||||||
|
|
||||||
|
proc getShortestAxisIndex*(self: AABB): cint {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetShortestAxisIndex(self)
|
||||||
|
|
||||||
|
proc getShortestAxisSize*(self: AABB): float32 {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetShortestAxisSize(self)
|
||||||
|
|
||||||
|
proc expand*(self: AABB; toPoint: Vector3): AABB {.inline.} =
|
||||||
|
getGDNativeAPI().aabbExpand(self, toPoint)
|
||||||
|
|
||||||
|
proc grow*(self: AABB; by: float32): AABB {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGrow(self, by)
|
||||||
|
|
||||||
|
proc getEndpoint*(self: AABB; idx: cint): Vector3 {.inline.} =
|
||||||
|
getGDNativeAPI().aabbGetEndpoint(self, idx)
|
||||||
|
|
||||||
|
proc `==`*(a, b: AABB): bool {.inline.} =
|
||||||
|
getGDNativeAPI().aabbOperatorEqual(a, b)
|
||||||
|
|
@ -29,7 +29,7 @@ type
|
||||||
z*: float32
|
z*: float32
|
||||||
w*: float32
|
w*: float32
|
||||||
|
|
||||||
Rect3* {.byref.} = object
|
AABB* {.byref.} = object
|
||||||
position*: Vector3
|
position*: Vector3
|
||||||
size*: Vector3
|
size*: Vector3
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
# Copyright (c) 2017 Xored Software, Inc.
|
|
||||||
|
|
||||||
import internal.godotinternaltypes, internal.godotstrings
|
|
||||||
import godotcoretypes, gdnativeapi
|
|
||||||
|
|
||||||
proc initRect3*(pos, size: Vector3): Rect3 {.inline.} =
|
|
||||||
Rect3(position: pos, size: size)
|
|
||||||
|
|
||||||
proc `$`*(self: Rect3): string {.inline.} =
|
|
||||||
$getGDNativeAPI().rect3AsString(self)
|
|
||||||
|
|
||||||
proc area*(self: Rect3): float32 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetArea(self)
|
|
||||||
|
|
||||||
proc hasNoArea*(self: Rect3): bool {.inline.} =
|
|
||||||
getGDNativeAPI().rect3HasNoArea(self)
|
|
||||||
|
|
||||||
proc hasNoSurface*(self: Rect3): bool {.inline.} =
|
|
||||||
getGDNativeAPI().rect3HasNoSurface(self)
|
|
||||||
|
|
||||||
proc intersects*(self, other: Rect3): bool {.inline.} =
|
|
||||||
getGDNativeAPI().rect3Intersects(self, other)
|
|
||||||
|
|
||||||
proc encloses*(self, other: Rect3): bool {.inline.} =
|
|
||||||
getGDNativeAPI().rect3Encloses(self, other)
|
|
||||||
|
|
||||||
proc merge*(self, other: Rect3): Rect3 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3Merge(self, other)
|
|
||||||
|
|
||||||
proc intersection*(self, other: Rect3): Rect3 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3Intersection(self, other)
|
|
||||||
|
|
||||||
proc intersectsPlane*(self: Rect3; plane: Plane): bool {.inline.} =
|
|
||||||
getGDNativeAPI().rect3IntersectsPlane(self, plane)
|
|
||||||
|
|
||||||
proc intersectsSegment*(self: Rect3; start, to: Vector3): bool {.inline.} =
|
|
||||||
getGDNativeAPI().rect3IntersectsSegment(self, start, to)
|
|
||||||
|
|
||||||
proc contains*(self: Rect3; point: Vector3): bool {.inline.} =
|
|
||||||
getGDNativeAPI().rect3HasPoint(self, point)
|
|
||||||
|
|
||||||
proc getSupport*(self: Rect3; dir: Vector3): Vector3 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetSupport(self, dir)
|
|
||||||
|
|
||||||
proc getLongestAxis*(self: Rect3): Vector3 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetLongestAxis(self)
|
|
||||||
|
|
||||||
proc getLongestAxisIndex*(self: Rect3): cint {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetLongestAxisIndex(self)
|
|
||||||
|
|
||||||
proc getLongestAxisSize*(self: Rect3): float32 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetLongestAxisSize(self)
|
|
||||||
|
|
||||||
proc getShortestAxis*(self: Rect3): Vector3 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetShortestAxis(self)
|
|
||||||
|
|
||||||
proc getShortestAxisIndex*(self: Rect3): cint {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetShortestAxisIndex(self)
|
|
||||||
|
|
||||||
proc getShortestAxisSize*(self: Rect3): float32 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetShortestAxisSize(self)
|
|
||||||
|
|
||||||
proc expand*(self: Rect3; toPoint: Vector3): Rect3 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3Expand(self, toPoint)
|
|
||||||
|
|
||||||
proc grow*(self: Rect3; by: float32): Rect3 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3Grow(self, by)
|
|
||||||
|
|
||||||
proc getEndpoint*(self: Rect3; idx: cint): Vector3 {.inline.} =
|
|
||||||
getGDNativeAPI().rect3GetEndpoint(self, idx)
|
|
||||||
|
|
||||||
proc `==`*(a, b: Rect3): bool {.inline.} =
|
|
||||||
getGDNativeAPI().rect3OperatorEqual(a, b)
|
|
||||||
|
|
@ -55,11 +55,11 @@ proc xformVector3*(self: Transform; v: Vector3): Vector3 {.inline.} =
|
||||||
proc xformInvVector3*(self: Transform; v: Vector3): Vector3 {.inline.} =
|
proc xformInvVector3*(self: Transform; v: Vector3): Vector3 {.inline.} =
|
||||||
getGDNativeAPI().transformXformInvVector3(self, v)
|
getGDNativeAPI().transformXformInvVector3(self, v)
|
||||||
|
|
||||||
proc xformRect3*(self: Transform; rect: Rect3): Rect3 {.inline.} =
|
proc xformAABB*(self: Transform; rect: AABB): AABB {.inline.} =
|
||||||
getGDNativeAPI().transformXformRect3(self, rect)
|
getGDNativeAPI().transformXformAABB(self, rect)
|
||||||
|
|
||||||
proc xformInvRect3*(self: Transform; rect: Rect3): Rect3 {.inline.} =
|
proc xformInvAABB*(self: Transform; rect: AABB): AABB {.inline.} =
|
||||||
getGDNativeAPI().transformXformInvRect3(self, rect)
|
getGDNativeAPI().transformXformInvAABB(self, rect)
|
||||||
|
|
||||||
proc `==`*(self: Transform; b: Transform): bool {.inline.} =
|
proc `==`*(self: Transform; b: Transform): bool {.inline.} =
|
||||||
getGDNativeAPI().transformOperatorEqual(self, b)
|
getGDNativeAPI().transformOperatorEqual(self, b)
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ proc newVariant*(s: string): Variant {.inline.} =
|
||||||
godotStr.deinit()
|
godotStr.deinit()
|
||||||
|
|
||||||
import basis, nodepaths
|
import basis, nodepaths
|
||||||
import planes, quats, rect2, rect3, rids
|
import planes, quats, rect2, aabb, rids
|
||||||
import transforms, transform2d, vector2
|
import transforms, transform2d, vector2
|
||||||
import vector3, colors
|
import vector3, colors
|
||||||
|
|
||||||
|
|
@ -108,9 +108,9 @@ proc newVariant*(quat: Quat): Variant {.inline.} =
|
||||||
new(result, variantFinalizer)
|
new(result, variantFinalizer)
|
||||||
initGodotVariant(result.godotVariant, quat)
|
initGodotVariant(result.godotVariant, quat)
|
||||||
|
|
||||||
proc newVariant*(rect3: Rect3): Variant {.inline.} =
|
proc newVariant*(aabb: AABB): Variant {.inline.} =
|
||||||
new(result, variantFinalizer)
|
new(result, variantFinalizer)
|
||||||
initGodotVariant(result.godotVariant, rect3)
|
initGodotVariant(result.godotVariant, aabb)
|
||||||
|
|
||||||
proc newVariant*(basis: Basis): Variant {.inline.} =
|
proc newVariant*(basis: Basis): Variant {.inline.} =
|
||||||
new(result, variantFinalizer)
|
new(result, variantFinalizer)
|
||||||
|
|
@ -207,8 +207,8 @@ proc asPlane*(self: Variant): Plane =
|
||||||
proc asQuat*(self: Variant): Quat =
|
proc asQuat*(self: Variant): Quat =
|
||||||
self.godotVariant.asQuat()
|
self.godotVariant.asQuat()
|
||||||
|
|
||||||
proc asRect3*(self: Variant): Rect3 =
|
proc asAABB*(self: Variant): AABB =
|
||||||
self.godotVariant.asRect3()
|
self.godotVariant.asAABB()
|
||||||
|
|
||||||
proc asBasis*(self: Variant): Basis =
|
proc asBasis*(self: Variant): Basis =
|
||||||
self.godotVariant.asBasis()
|
self.godotVariant.asBasis()
|
||||||
|
|
|
||||||
|
|
@ -910,65 +910,65 @@ type
|
||||||
rect2SetSize: proc (self: var Rect2, size: Vector2)
|
rect2SetSize: proc (self: var Rect2, size: Vector2)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
|
|
||||||
# Rect3 API
|
# AABB API
|
||||||
rect3New: proc (dest: var Rect3, pos, size: Vector3)
|
aabbNew: proc (dest: var AABB, pos, size: Vector3)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetPosition: proc (self: Rect3): Vector3
|
aabbGetPosition: proc (self: AABB): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3SetPosition: proc (self: var Rect3, pos: Vector3)
|
aabbSetPosition: proc (self: var AABB, pos: Vector3)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetSize: proc (self: Rect3): Vector3
|
aabbGetSize: proc (self: AABB): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3SetSize: proc (self: var Rect3, pos: Vector3)
|
aabbSetSize: proc (self: var AABB, pos: Vector3)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3AsString: proc (self: Rect3): GodotString
|
aabbAsString: proc (self: AABB): GodotString
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetArea: proc (self: Rect3): float32
|
aabbGetArea: proc (self: AABB): float32
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3HasNoArea: proc (self: Rect3): bool
|
aabbHasNoArea: proc (self: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3HasNoSurface: proc (self: Rect3): bool
|
aabbHasNoSurface: proc (self: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Intersects: proc (self, other: Rect3): bool
|
aabbIntersects: proc (self, other: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Encloses: proc (self, other: Rect3): bool
|
aabbEncloses: proc (self, other: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Merge: proc (self, other: Rect3): Rect3
|
aabbMerge: proc (self, other: AABB): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Intersection: proc (self, other: Rect3): Rect3
|
aabbIntersection: proc (self, other: AABB): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3IntersectsPlane: proc (self: Rect3, plane: Plane): bool
|
aabbIntersectsPlane: proc (self: AABB, plane: Plane): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3IntersectsSegment: proc (self: Rect3, vFrom, vTo: Vector3): bool
|
aabbIntersectsSegment: proc (self: AABB, vFrom, vTo: Vector3): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3HasPoint: proc (self: Rect3, point: Vector3): bool
|
aabbHasPoint: proc (self: AABB, point: Vector3): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetSupport: proc (self: Rect3, dir: Vector3): Vector3
|
aabbGetSupport: proc (self: AABB, dir: Vector3): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetLongestAxis: proc (self: Rect3): Vector3
|
aabbGetLongestAxis: proc (self: AABB): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetLongestAxisIndex: proc (self: Rect3): cint
|
aabbGetLongestAxisIndex: proc (self: AABB): cint
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3GetLongestAxisSize: proc (self: Rect3): float32
|
aabbGetLongestAxisSize: proc (self: AABB): float32
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3GetShortestAxis: proc (self: Rect3): Vector3
|
aabbGetShortestAxis: proc (self: AABB): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetShortestAxisIndex: proc (self: Rect3): cint
|
aabbGetShortestAxisIndex: proc (self: AABB): cint
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3GetShortestAxisSize: proc (self: Rect3): float32
|
aabbGetShortestAxisSize: proc (self: AABB): float32
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3Expand: proc (self: Rect3, toPoint: Vector3): Rect3
|
aabbExpand: proc (self: AABB, toPoint: Vector3): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Grow: proc (self: Rect3, by: float32): Rect3
|
aabbGrow: proc (self: AABB, by: float32): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetEndpoint: proc (self: Rect3, idx: cint): Vector3
|
aabbGetEndpoint: proc (self: AABB, idx: cint): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3OperatorEqual: proc (self, other: Rect3): bool
|
aabbOperatorEqual: proc (self, other: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
|
|
||||||
# RID API
|
# RID API
|
||||||
|
|
@ -1036,9 +1036,9 @@ type
|
||||||
transformXformInvVector3: proc (self: Transform, v: Vector3): Vector3
|
transformXformInvVector3: proc (self: Transform, v: Vector3): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
transformXformRect3: proc (self: Transform, v: Rect3): Rect3
|
transformXformAABB: proc (self: Transform, v: AABB): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
transformXformInvRect3: proc (self: Transform, v: Rect3): Rect3
|
transformXformInvAABB: proc (self: Transform, v: AABB): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
|
|
||||||
|
|
@ -1136,7 +1136,7 @@ type
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantNewQuat: proc (dest: var GodotVariant, val: Quat)
|
variantNewQuat: proc (dest: var GodotVariant, val: Quat)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantNewRect3: proc (dest: var GodotVariant, val: Rect3)
|
variantNewAABB: proc (dest: var GodotVariant, val: AABB)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantNewBasis: proc (dest: var GodotVariant, val: Basis)
|
variantNewBasis: proc (dest: var GodotVariant, val: Basis)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
|
|
@ -1203,7 +1203,7 @@ type
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantAsQuat: proc (self: GodotVariant): Quat
|
variantAsQuat: proc (self: GodotVariant): Quat
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantAsRect3: proc (self: GodotVariant): Rect3
|
variantAsAABB: proc (self: GodotVariant): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantAsBasis: proc (self: GodotVariant): Basis
|
variantAsBasis: proc (self: GodotVariant): Basis
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
|
|
@ -2176,65 +2176,65 @@ type
|
||||||
rect2SetSize*: proc (self: var Rect2, size: Vector2)
|
rect2SetSize*: proc (self: var Rect2, size: Vector2)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
|
|
||||||
# Rect3 API
|
# AABB API
|
||||||
rect3New*: proc (dest: var Rect3, pos, size: Vector3)
|
aabbNew*: proc (dest: var AABB, pos, size: Vector3)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetPosition*: proc (self: Rect3): Vector3
|
aabbGetPosition*: proc (self: AABB): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3SetPosition*: proc (self: var Rect3, pos: Vector3)
|
aabbSetPosition*: proc (self: var AABB, pos: Vector3)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetSize*: proc (self: Rect3): Vector3
|
aabbGetSize*: proc (self: AABB): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3SetSize*: proc (self: var Rect3, pos: Vector3)
|
aabbSetSize*: proc (self: var AABB, pos: Vector3)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3AsString*: proc (self: Rect3): GodotString
|
aabbAsString*: proc (self: AABB): GodotString
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetArea*: proc (self: Rect3): float32
|
aabbGetArea*: proc (self: AABB): float32
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3HasNoArea*: proc (self: Rect3): bool
|
aabbHasNoArea*: proc (self: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3HasNoSurface*: proc (self: Rect3): bool
|
aabbHasNoSurface*: proc (self: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Intersects*: proc (self, other: Rect3): bool
|
aabbIntersects*: proc (self, other: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Encloses*: proc (self, other: Rect3): bool
|
aabbEncloses*: proc (self, other: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Merge*: proc (self, other: Rect3): Rect3
|
aabbMerge*: proc (self, other: AABB): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Intersection*: proc (self, other: Rect3): Rect3
|
aabbIntersection*: proc (self, other: AABB): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3IntersectsPlane*: proc (self: Rect3, plane: Plane): bool
|
aabbIntersectsPlane*: proc (self: AABB, plane: Plane): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3IntersectsSegment*: proc (self: Rect3, vFrom, vTo: Vector3): bool
|
aabbIntersectsSegment*: proc (self: AABB, vFrom, vTo: Vector3): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3HasPoint*: proc (self: Rect3, point: Vector3): bool
|
aabbHasPoint*: proc (self: AABB, point: Vector3): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetSupport*: proc (self: Rect3, dir: Vector3): Vector3
|
aabbGetSupport*: proc (self: AABB, dir: Vector3): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetLongestAxis*: proc (self: Rect3): Vector3
|
aabbGetLongestAxis*: proc (self: AABB): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetLongestAxisIndex*: proc (self: Rect3): cint
|
aabbGetLongestAxisIndex*: proc (self: AABB): cint
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3GetLongestAxisSize*: proc (self: Rect3): float32
|
aabbGetLongestAxisSize*: proc (self: AABB): float32
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3GetShortestAxis*: proc (self: Rect3): Vector3
|
aabbGetShortestAxis*: proc (self: AABB): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetShortestAxisIndex*: proc (self: Rect3): cint
|
aabbGetShortestAxisIndex*: proc (self: AABB): cint
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3GetShortestAxisSize*: proc (self: Rect3): float32
|
aabbGetShortestAxisSize*: proc (self: AABB): float32
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
rect3Expand*: proc (self: Rect3, toPoint: Vector3): Rect3
|
aabbExpand*: proc (self: AABB, toPoint: Vector3): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3Grow*: proc (self: Rect3, by: float32): Rect3
|
aabbGrow*: proc (self: AABB, by: float32): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3GetEndpoint*: proc (self: Rect3, idx: cint): Vector3
|
aabbGetEndpoint*: proc (self: AABB, idx: cint): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
rect3OperatorEqual*: proc (self, other: Rect3): bool
|
aabbOperatorEqual*: proc (self, other: AABB): bool
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
|
|
||||||
# RID API
|
# RID API
|
||||||
|
|
@ -2302,9 +2302,9 @@ type
|
||||||
transformXformInvVector3*: proc (self: Transform, v: Vector3): Vector3
|
transformXformInvVector3*: proc (self: Transform, v: Vector3): Vector3
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
transformXformRect3*: proc (self: Transform, v: Rect3): Rect3
|
transformXformAABB*: proc (self: Transform, v: AABB): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
transformXformInvRect3*: proc (self: Transform, v: Rect3): Rect3
|
transformXformInvAABB*: proc (self: Transform, v: AABB): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [],
|
{.noconv, raises: [], gcsafe, tags: [],
|
||||||
locks: 0.}
|
locks: 0.}
|
||||||
|
|
||||||
|
|
@ -2402,7 +2402,7 @@ type
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantNewQuat*: proc (dest: var GodotVariant, val: Quat)
|
variantNewQuat*: proc (dest: var GodotVariant, val: Quat)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantNewRect3*: proc (dest: var GodotVariant, val: Rect3)
|
variantNewAABB*: proc (dest: var GodotVariant, val: AABB)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantNewBasis*: proc (dest: var GodotVariant, val: Basis)
|
variantNewBasis*: proc (dest: var GodotVariant, val: Basis)
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
|
|
@ -2469,7 +2469,7 @@ type
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantAsQuat*: proc (self: GodotVariant): Quat
|
variantAsQuat*: proc (self: GodotVariant): Quat
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantAsRect3*: proc (self: GodotVariant): Rect3
|
variantAsAABB*: proc (self: GodotVariant): AABB
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
variantAsBasis*: proc (self: GodotVariant): Basis
|
variantAsBasis*: proc (self: GodotVariant): Basis
|
||||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||||
|
|
@ -2953,34 +2953,34 @@ proc setGDNativeAPI*(apiStruct: pointer) {.inline.} =
|
||||||
rect2SetPosition
|
rect2SetPosition
|
||||||
rect2SetSize
|
rect2SetSize
|
||||||
|
|
||||||
# Rect3 API
|
# AABB API
|
||||||
rect3New
|
aabbNew
|
||||||
rect3GetPosition
|
aabbGetPosition
|
||||||
rect3SetPosition
|
aabbSetPosition
|
||||||
rect3GetSize
|
aabbGetSize
|
||||||
rect3SetSize
|
aabbSetSize
|
||||||
rect3AsString
|
aabbAsString
|
||||||
rect3GetArea
|
aabbGetArea
|
||||||
rect3HasNoArea
|
aabbHasNoArea
|
||||||
rect3HasNoSurface
|
aabbHasNoSurface
|
||||||
rect3Intersects
|
aabbIntersects
|
||||||
rect3Encloses
|
aabbEncloses
|
||||||
rect3Merge
|
aabbMerge
|
||||||
rect3Intersection
|
aabbIntersection
|
||||||
rect3IntersectsPlane
|
aabbIntersectsPlane
|
||||||
rect3IntersectsSegment
|
aabbIntersectsSegment
|
||||||
rect3HasPoint
|
aabbHasPoint
|
||||||
rect3GetSupport
|
aabbGetSupport
|
||||||
rect3GetLongestAxis
|
aabbGetLongestAxis
|
||||||
rect3GetLongestAxisIndex
|
aabbGetLongestAxisIndex
|
||||||
rect3GetLongestAxisSize
|
aabbGetLongestAxisSize
|
||||||
rect3GetShortestAxis
|
aabbGetShortestAxis
|
||||||
rect3GetShortestAxisIndex
|
aabbGetShortestAxisIndex
|
||||||
rect3GetShortestAxisSize
|
aabbGetShortestAxisSize
|
||||||
rect3Expand
|
aabbExpand
|
||||||
rect3Grow
|
aabbGrow
|
||||||
rect3GetEndpoint
|
aabbGetEndpoint
|
||||||
rect3OperatorEqual
|
aabbOperatorEqual
|
||||||
|
|
||||||
# RID API
|
# RID API
|
||||||
ridNew
|
ridNew
|
||||||
|
|
@ -3011,8 +3011,8 @@ proc setGDNativeAPI*(apiStruct: pointer) {.inline.} =
|
||||||
transformOperatorMultiply
|
transformOperatorMultiply
|
||||||
transformXformVector3
|
transformXformVector3
|
||||||
transformXformInvVector3
|
transformXformInvVector3
|
||||||
transformXformRect3
|
transformXformAABB
|
||||||
transformXformInvRect3
|
transformXformInvAABB
|
||||||
|
|
||||||
# Transform2D API
|
# Transform2D API
|
||||||
transform2DNew
|
transform2DNew
|
||||||
|
|
@ -3054,7 +3054,7 @@ proc setGDNativeAPI*(apiStruct: pointer) {.inline.} =
|
||||||
|
|
||||||
variantNewPlane
|
variantNewPlane
|
||||||
variantNewQuat
|
variantNewQuat
|
||||||
variantNewRect3
|
variantNewAABB
|
||||||
variantNewBasis
|
variantNewBasis
|
||||||
variantNewTransform
|
variantNewTransform
|
||||||
variantNewColor
|
variantNewColor
|
||||||
|
|
@ -3081,7 +3081,7 @@ proc setGDNativeAPI*(apiStruct: pointer) {.inline.} =
|
||||||
variantAsTransform2D
|
variantAsTransform2D
|
||||||
variantAsPlane
|
variantAsPlane
|
||||||
variantAsQuat
|
variantAsQuat
|
||||||
variantAsRect3
|
variantAsAABB
|
||||||
variantAsBasis
|
variantAsBasis
|
||||||
variantAsTransform
|
variantAsTransform
|
||||||
variantAsColor
|
variantAsColor
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,14 @@ import core.godotbase, godotinternal
|
||||||
import core.godotcoretypes
|
import core.godotcoretypes
|
||||||
import core.vector2, core.rect2, core.vector3, core.transform2d, core.planes,
|
import core.vector2, core.rect2, core.vector3, core.transform2d, core.planes,
|
||||||
core.quats
|
core.quats
|
||||||
import core.rect3, core.basis, core.transforms, core.colors, core.nodepaths,
|
import core.aabb, core.basis, core.transforms, core.colors, core.nodepaths,
|
||||||
core.rids
|
core.rids
|
||||||
import core.dictionaries, core.arrays, core.poolarrays, core.variants
|
import core.dictionaries, core.arrays, core.poolarrays, core.variants
|
||||||
|
|
||||||
import nim.godotmacros, nim.godotnim
|
import nim.godotmacros, nim.godotnim
|
||||||
|
|
||||||
export godotbase, godotcoretypes, vector2, rect2, vector3, transform2d, planes,
|
export godotbase, godotcoretypes, vector2, rect2, vector3, transform2d, planes,
|
||||||
quats, rect3, basis, transforms, colors, nodepaths, rids, dictionaries,
|
quats, aabb, basis, transforms, colors, nodepaths, rids, dictionaries,
|
||||||
arrays, poolarrays, variants
|
arrays, poolarrays, variants
|
||||||
export godotmacros, godotnim
|
export godotmacros, godotnim
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ const standardTypes = toSet(
|
||||||
["bool", "cint", "int", "uint8", "int8", "uint16", "int16", "uint32", "int32",
|
["bool", "cint", "int", "uint8", "int8", "uint16", "int16", "uint32", "int32",
|
||||||
"uint64",
|
"uint64",
|
||||||
"int64", "float32", "cfloat", "float64", "GodotString", "Vector2", "Rect2",
|
"int64", "float32", "cfloat", "float64", "GodotString", "Vector2", "Rect2",
|
||||||
"Vector3", "Transform2D", "Plane", "Quat", "Rect3", "Basis", "Transform",
|
"Vector3", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform",
|
||||||
"Color", "RID", "NodePath", "Dictionary", "Variant", "Array",
|
"Color", "RID", "NodePath", "Dictionary", "Variant", "Array",
|
||||||
"PoolByteArray", "PoolIntArray", "PoolRealArray", "PoolStringArray",
|
"PoolByteArray", "PoolIntArray", "PoolRealArray", "PoolStringArray",
|
||||||
"PoolVector2Array", "PoolVector3Array", "PoolColorArray"])
|
"PoolVector2Array", "PoolVector3Array", "PoolColorArray"])
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ type
|
||||||
Transform2D,
|
Transform2D,
|
||||||
Plane,
|
Plane,
|
||||||
Quat, ## 10
|
Quat, ## 10
|
||||||
Rect3,
|
AABB,
|
||||||
Basis,
|
Basis,
|
||||||
Transform, ## misc types
|
Transform, ## misc types
|
||||||
Color,
|
Color,
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ proc initGodotVariant*(dest: var GodotVariant; plane: Plane) {.inline.} =
|
||||||
proc initGodotVariant*(dest: var GodotVariant; quat: Quat) {.inline.} =
|
proc initGodotVariant*(dest: var GodotVariant; quat: Quat) {.inline.} =
|
||||||
getGDNativeAPI().variantNewQuat(dest, quat)
|
getGDNativeAPI().variantNewQuat(dest, quat)
|
||||||
|
|
||||||
proc initGodotVariant*(dest: var GodotVariant; rect3: Rect3) {.inline.} =
|
proc initGodotVariant*(dest: var GodotVariant; aabb: AABB) {.inline.} =
|
||||||
getGDNativeAPI().variantNewRect3(dest, rect3)
|
getGDNativeAPI().variantNewAABB(dest, aabb)
|
||||||
|
|
||||||
proc initGodotVariant*(dest: var GodotVariant; basis: Basis) {.inline.} =
|
proc initGodotVariant*(dest: var GodotVariant; basis: Basis) {.inline.} =
|
||||||
getGDNativeAPI().variantNewBasis(dest, basis)
|
getGDNativeAPI().variantNewBasis(dest, basis)
|
||||||
|
|
@ -138,8 +138,8 @@ proc asPlane*(self: GodotVariant): Plane {.inline.} =
|
||||||
proc asQuat*(self: GodotVariant): Quat {.inline.} =
|
proc asQuat*(self: GodotVariant): Quat {.inline.} =
|
||||||
getGDNativeAPI().variantAsQuat(self)
|
getGDNativeAPI().variantAsQuat(self)
|
||||||
|
|
||||||
proc asRect3*(self: GodotVariant): Rect3 {.inline.} =
|
proc asAABB*(self: GodotVariant): AABB {.inline.} =
|
||||||
getGDNativeAPI().variantAsRect3(self)
|
getGDNativeAPI().variantAsAABB(self)
|
||||||
|
|
||||||
proc asBasis*(self: GodotVariant): Basis {.inline.} =
|
proc asBasis*(self: GodotVariant): Basis {.inline.} =
|
||||||
getGDNativeAPI().variantAsBasis(self)
|
getGDNativeAPI().variantAsBasis(self)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import gdnativeapi
|
||||||
import core.godotcoretypes
|
import core.godotcoretypes
|
||||||
import core.vector2, core.rect2,
|
import core.vector2, core.rect2,
|
||||||
core.vector3, core.transform2d,
|
core.vector3, core.transform2d,
|
||||||
core.planes, core.quats, core.rect3,
|
core.planes, core.quats, core.aabb,
|
||||||
core.basis, core.transforms, core.colors,
|
core.basis, core.transforms, core.colors,
|
||||||
core.nodepaths, core.rids, core.dictionaries,
|
core.nodepaths, core.rids, core.dictionaries,
|
||||||
core.arrays, core.poolarrays, core.variants
|
core.arrays, core.poolarrays, core.variants
|
||||||
|
|
@ -57,7 +57,7 @@ type
|
||||||
SomeFloat = float32 or float64 or cfloat
|
SomeFloat = float32 or float64 or cfloat
|
||||||
|
|
||||||
SomeGodot = bool or Vector2 or Rect2 or Vector3 or
|
SomeGodot = bool or Vector2 or Rect2 or Vector3 or
|
||||||
Transform2D or Plane or Quat or Rect3 or
|
Transform2D or Plane or Quat or AABB or
|
||||||
Basis or Transform or Color or NodePath or
|
Basis or Transform or Color or NodePath or
|
||||||
RID or GodotObject or Dictionary or Array or
|
RID or GodotObject or Dictionary or Array or
|
||||||
PoolByteArray or PoolIntArray or PoolRealArray or
|
PoolByteArray or PoolIntArray or PoolRealArray or
|
||||||
|
|
@ -497,8 +497,8 @@ proc godotTypeInfo*(T: typedesc[SomeGodotOrNum]): GodotTypeInfo {.inline.} =
|
||||||
VariantType.Plane
|
VariantType.Plane
|
||||||
elif T is Quat:
|
elif T is Quat:
|
||||||
VariantType.Quat
|
VariantType.Quat
|
||||||
elif T is Rect3:
|
elif T is AABB:
|
||||||
VariantType.Rect3
|
VariantType.AABB
|
||||||
elif T is Basis:
|
elif T is Basis:
|
||||||
VariantType.Basis
|
VariantType.Basis
|
||||||
elif T is Transform:
|
elif T is Transform:
|
||||||
|
|
@ -614,8 +614,8 @@ proc fromVariant*[T: SomeGodot](self: var T, val: Variant): ConversionResult =
|
||||||
self = val.asPlane()
|
self = val.asPlane()
|
||||||
elif self is Quat:
|
elif self is Quat:
|
||||||
self = val.asQuat()
|
self = val.asQuat()
|
||||||
elif self is Rect3:
|
elif self is AABB:
|
||||||
self = val.asRect3()
|
self = val.asAABB()
|
||||||
elif self is Basis:
|
elif self is Basis:
|
||||||
self = val.asBasis()
|
self = val.asBasis()
|
||||||
elif self is Transform:
|
elif self is Transform:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue