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
|
||||
rotation in 3D space.
|
||||
* `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.
|
||||
* `transform2d <transform2d.html>`_ Defines ``Transform2D``.
|
||||
* `transforms <transforms.html>`_ Defines ``Transform``.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
author = "Xored Software, Inc."
|
||||
description = "Godot Engine bindings"
|
||||
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
|
||||
w*: float32
|
||||
|
||||
Rect3* {.byref.} = object
|
||||
AABB* {.byref.} = object
|
||||
position*: 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.} =
|
||||
getGDNativeAPI().transformXformInvVector3(self, v)
|
||||
|
||||
proc xformRect3*(self: Transform; rect: Rect3): Rect3 {.inline.} =
|
||||
getGDNativeAPI().transformXformRect3(self, rect)
|
||||
proc xformAABB*(self: Transform; rect: AABB): AABB {.inline.} =
|
||||
getGDNativeAPI().transformXformAABB(self, rect)
|
||||
|
||||
proc xformInvRect3*(self: Transform; rect: Rect3): Rect3 {.inline.} =
|
||||
getGDNativeAPI().transformXformInvRect3(self, rect)
|
||||
proc xformInvAABB*(self: Transform; rect: AABB): AABB {.inline.} =
|
||||
getGDNativeAPI().transformXformInvAABB(self, rect)
|
||||
|
||||
proc `==`*(self: Transform; b: Transform): bool {.inline.} =
|
||||
getGDNativeAPI().transformOperatorEqual(self, b)
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ proc newVariant*(s: string): Variant {.inline.} =
|
|||
godotStr.deinit()
|
||||
|
||||
import basis, nodepaths
|
||||
import planes, quats, rect2, rect3, rids
|
||||
import planes, quats, rect2, aabb, rids
|
||||
import transforms, transform2d, vector2
|
||||
import vector3, colors
|
||||
|
||||
|
|
@ -108,9 +108,9 @@ proc newVariant*(quat: Quat): Variant {.inline.} =
|
|||
new(result, variantFinalizer)
|
||||
initGodotVariant(result.godotVariant, quat)
|
||||
|
||||
proc newVariant*(rect3: Rect3): Variant {.inline.} =
|
||||
proc newVariant*(aabb: AABB): Variant {.inline.} =
|
||||
new(result, variantFinalizer)
|
||||
initGodotVariant(result.godotVariant, rect3)
|
||||
initGodotVariant(result.godotVariant, aabb)
|
||||
|
||||
proc newVariant*(basis: Basis): Variant {.inline.} =
|
||||
new(result, variantFinalizer)
|
||||
|
|
@ -207,8 +207,8 @@ proc asPlane*(self: Variant): Plane =
|
|||
proc asQuat*(self: Variant): Quat =
|
||||
self.godotVariant.asQuat()
|
||||
|
||||
proc asRect3*(self: Variant): Rect3 =
|
||||
self.godotVariant.asRect3()
|
||||
proc asAABB*(self: Variant): AABB =
|
||||
self.godotVariant.asAABB()
|
||||
|
||||
proc asBasis*(self: Variant): Basis =
|
||||
self.godotVariant.asBasis()
|
||||
|
|
|
|||
|
|
@ -910,65 +910,65 @@ type
|
|||
rect2SetSize: proc (self: var Rect2, size: Vector2)
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
|
||||
# Rect3 API
|
||||
rect3New: proc (dest: var Rect3, pos, size: Vector3)
|
||||
# AABB API
|
||||
aabbNew: proc (dest: var AABB, pos, size: Vector3)
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3GetPosition: proc (self: Rect3): Vector3
|
||||
aabbGetPosition: proc (self: AABB): Vector3
|
||||
{.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.}
|
||||
rect3GetSize: proc (self: Rect3): Vector3
|
||||
aabbGetSize: proc (self: AABB): Vector3
|
||||
{.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.}
|
||||
rect3AsString: proc (self: Rect3): GodotString
|
||||
aabbAsString: proc (self: AABB): GodotString
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3GetArea: proc (self: Rect3): float32
|
||||
aabbGetArea: proc (self: AABB): float32
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3HasNoArea: proc (self: Rect3): bool
|
||||
aabbHasNoArea: proc (self: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3HasNoSurface: proc (self: Rect3): bool
|
||||
aabbHasNoSurface: proc (self: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3Intersects: proc (self, other: Rect3): bool
|
||||
aabbIntersects: proc (self, other: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3Encloses: proc (self, other: Rect3): bool
|
||||
aabbEncloses: proc (self, other: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3Merge: proc (self, other: Rect3): Rect3
|
||||
aabbMerge: proc (self, other: AABB): AABB
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3Intersection: proc (self, other: Rect3): Rect3
|
||||
aabbIntersection: proc (self, other: AABB): AABB
|
||||
{.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.}
|
||||
rect3IntersectsSegment: proc (self: Rect3, vFrom, vTo: Vector3): bool
|
||||
aabbIntersectsSegment: proc (self: AABB, vFrom, vTo: Vector3): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3HasPoint: proc (self: Rect3, point: Vector3): bool
|
||||
aabbHasPoint: proc (self: AABB, point: Vector3): bool
|
||||
{.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.}
|
||||
rect3GetLongestAxis: proc (self: Rect3): Vector3
|
||||
aabbGetLongestAxis: proc (self: AABB): Vector3
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3GetLongestAxisIndex: proc (self: Rect3): cint
|
||||
aabbGetLongestAxisIndex: proc (self: AABB): cint
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3GetLongestAxisSize: proc (self: Rect3): float32
|
||||
aabbGetLongestAxisSize: proc (self: AABB): float32
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3GetShortestAxis: proc (self: Rect3): Vector3
|
||||
aabbGetShortestAxis: proc (self: AABB): Vector3
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3GetShortestAxisIndex: proc (self: Rect3): cint
|
||||
aabbGetShortestAxisIndex: proc (self: AABB): cint
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3GetShortestAxisSize: proc (self: Rect3): float32
|
||||
aabbGetShortestAxisSize: proc (self: AABB): float32
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3Expand: proc (self: Rect3, toPoint: Vector3): Rect3
|
||||
aabbExpand: proc (self: AABB, toPoint: Vector3): AABB
|
||||
{.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.}
|
||||
rect3GetEndpoint: proc (self: Rect3, idx: cint): Vector3
|
||||
aabbGetEndpoint: proc (self: AABB, idx: cint): Vector3
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3OperatorEqual: proc (self, other: Rect3): bool
|
||||
aabbOperatorEqual: proc (self, other: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
|
||||
# RID API
|
||||
|
|
@ -1036,9 +1036,9 @@ type
|
|||
transformXformInvVector3: proc (self: Transform, v: Vector3): Vector3
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
transformXformRect3: proc (self: Transform, v: Rect3): Rect3
|
||||
transformXformAABB: proc (self: Transform, v: AABB): AABB
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
transformXformInvRect3: proc (self: Transform, v: Rect3): Rect3
|
||||
transformXformInvAABB: proc (self: Transform, v: AABB): AABB
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
|
||||
|
|
@ -1136,7 +1136,7 @@ type
|
|||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
variantNewQuat: proc (dest: var GodotVariant, val: Quat)
|
||||
{.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.}
|
||||
variantNewBasis: proc (dest: var GodotVariant, val: Basis)
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
|
|
@ -1203,7 +1203,7 @@ type
|
|||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
variantAsQuat: proc (self: GodotVariant): Quat
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
variantAsRect3: proc (self: GodotVariant): Rect3
|
||||
variantAsAABB: proc (self: GodotVariant): AABB
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
variantAsBasis: proc (self: GodotVariant): Basis
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
|
|
@ -2176,65 +2176,65 @@ type
|
|||
rect2SetSize*: proc (self: var Rect2, size: Vector2)
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
|
||||
# Rect3 API
|
||||
rect3New*: proc (dest: var Rect3, pos, size: Vector3)
|
||||
# AABB API
|
||||
aabbNew*: proc (dest: var AABB, pos, size: Vector3)
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3GetPosition*: proc (self: Rect3): Vector3
|
||||
aabbGetPosition*: proc (self: AABB): Vector3
|
||||
{.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.}
|
||||
rect3GetSize*: proc (self: Rect3): Vector3
|
||||
aabbGetSize*: proc (self: AABB): Vector3
|
||||
{.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.}
|
||||
rect3AsString*: proc (self: Rect3): GodotString
|
||||
aabbAsString*: proc (self: AABB): GodotString
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3GetArea*: proc (self: Rect3): float32
|
||||
aabbGetArea*: proc (self: AABB): float32
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3HasNoArea*: proc (self: Rect3): bool
|
||||
aabbHasNoArea*: proc (self: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3HasNoSurface*: proc (self: Rect3): bool
|
||||
aabbHasNoSurface*: proc (self: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3Intersects*: proc (self, other: Rect3): bool
|
||||
aabbIntersects*: proc (self, other: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3Encloses*: proc (self, other: Rect3): bool
|
||||
aabbEncloses*: proc (self, other: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3Merge*: proc (self, other: Rect3): Rect3
|
||||
aabbMerge*: proc (self, other: AABB): AABB
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3Intersection*: proc (self, other: Rect3): Rect3
|
||||
aabbIntersection*: proc (self, other: AABB): AABB
|
||||
{.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.}
|
||||
rect3IntersectsSegment*: proc (self: Rect3, vFrom, vTo: Vector3): bool
|
||||
aabbIntersectsSegment*: proc (self: AABB, vFrom, vTo: Vector3): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3HasPoint*: proc (self: Rect3, point: Vector3): bool
|
||||
aabbHasPoint*: proc (self: AABB, point: Vector3): bool
|
||||
{.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.}
|
||||
rect3GetLongestAxis*: proc (self: Rect3): Vector3
|
||||
aabbGetLongestAxis*: proc (self: AABB): Vector3
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3GetLongestAxisIndex*: proc (self: Rect3): cint
|
||||
aabbGetLongestAxisIndex*: proc (self: AABB): cint
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3GetLongestAxisSize*: proc (self: Rect3): float32
|
||||
aabbGetLongestAxisSize*: proc (self: AABB): float32
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3GetShortestAxis*: proc (self: Rect3): Vector3
|
||||
aabbGetShortestAxis*: proc (self: AABB): Vector3
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3GetShortestAxisIndex*: proc (self: Rect3): cint
|
||||
aabbGetShortestAxisIndex*: proc (self: AABB): cint
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3GetShortestAxisSize*: proc (self: Rect3): float32
|
||||
aabbGetShortestAxisSize*: proc (self: AABB): float32
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
rect3Expand*: proc (self: Rect3, toPoint: Vector3): Rect3
|
||||
aabbExpand*: proc (self: AABB, toPoint: Vector3): AABB
|
||||
{.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.}
|
||||
rect3GetEndpoint*: proc (self: Rect3, idx: cint): Vector3
|
||||
aabbGetEndpoint*: proc (self: AABB, idx: cint): Vector3
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
rect3OperatorEqual*: proc (self, other: Rect3): bool
|
||||
aabbOperatorEqual*: proc (self, other: AABB): bool
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
|
||||
# RID API
|
||||
|
|
@ -2302,9 +2302,9 @@ type
|
|||
transformXformInvVector3*: proc (self: Transform, v: Vector3): Vector3
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
transformXformRect3*: proc (self: Transform, v: Rect3): Rect3
|
||||
transformXformAABB*: proc (self: Transform, v: AABB): AABB
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
transformXformInvRect3*: proc (self: Transform, v: Rect3): Rect3
|
||||
transformXformInvAABB*: proc (self: Transform, v: AABB): AABB
|
||||
{.noconv, raises: [], gcsafe, tags: [],
|
||||
locks: 0.}
|
||||
|
||||
|
|
@ -2402,7 +2402,7 @@ type
|
|||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
variantNewQuat*: proc (dest: var GodotVariant, val: Quat)
|
||||
{.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.}
|
||||
variantNewBasis*: proc (dest: var GodotVariant, val: Basis)
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
|
|
@ -2469,7 +2469,7 @@ type
|
|||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
variantAsQuat*: proc (self: GodotVariant): Quat
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
variantAsRect3*: proc (self: GodotVariant): Rect3
|
||||
variantAsAABB*: proc (self: GodotVariant): AABB
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
variantAsBasis*: proc (self: GodotVariant): Basis
|
||||
{.noconv, raises: [], gcsafe, tags: [], locks: 0.}
|
||||
|
|
@ -2953,34 +2953,34 @@ proc setGDNativeAPI*(apiStruct: pointer) {.inline.} =
|
|||
rect2SetPosition
|
||||
rect2SetSize
|
||||
|
||||
# Rect3 API
|
||||
rect3New
|
||||
rect3GetPosition
|
||||
rect3SetPosition
|
||||
rect3GetSize
|
||||
rect3SetSize
|
||||
rect3AsString
|
||||
rect3GetArea
|
||||
rect3HasNoArea
|
||||
rect3HasNoSurface
|
||||
rect3Intersects
|
||||
rect3Encloses
|
||||
rect3Merge
|
||||
rect3Intersection
|
||||
rect3IntersectsPlane
|
||||
rect3IntersectsSegment
|
||||
rect3HasPoint
|
||||
rect3GetSupport
|
||||
rect3GetLongestAxis
|
||||
rect3GetLongestAxisIndex
|
||||
rect3GetLongestAxisSize
|
||||
rect3GetShortestAxis
|
||||
rect3GetShortestAxisIndex
|
||||
rect3GetShortestAxisSize
|
||||
rect3Expand
|
||||
rect3Grow
|
||||
rect3GetEndpoint
|
||||
rect3OperatorEqual
|
||||
# AABB API
|
||||
aabbNew
|
||||
aabbGetPosition
|
||||
aabbSetPosition
|
||||
aabbGetSize
|
||||
aabbSetSize
|
||||
aabbAsString
|
||||
aabbGetArea
|
||||
aabbHasNoArea
|
||||
aabbHasNoSurface
|
||||
aabbIntersects
|
||||
aabbEncloses
|
||||
aabbMerge
|
||||
aabbIntersection
|
||||
aabbIntersectsPlane
|
||||
aabbIntersectsSegment
|
||||
aabbHasPoint
|
||||
aabbGetSupport
|
||||
aabbGetLongestAxis
|
||||
aabbGetLongestAxisIndex
|
||||
aabbGetLongestAxisSize
|
||||
aabbGetShortestAxis
|
||||
aabbGetShortestAxisIndex
|
||||
aabbGetShortestAxisSize
|
||||
aabbExpand
|
||||
aabbGrow
|
||||
aabbGetEndpoint
|
||||
aabbOperatorEqual
|
||||
|
||||
# RID API
|
||||
ridNew
|
||||
|
|
@ -3011,8 +3011,8 @@ proc setGDNativeAPI*(apiStruct: pointer) {.inline.} =
|
|||
transformOperatorMultiply
|
||||
transformXformVector3
|
||||
transformXformInvVector3
|
||||
transformXformRect3
|
||||
transformXformInvRect3
|
||||
transformXformAABB
|
||||
transformXformInvAABB
|
||||
|
||||
# Transform2D API
|
||||
transform2DNew
|
||||
|
|
@ -3054,7 +3054,7 @@ proc setGDNativeAPI*(apiStruct: pointer) {.inline.} =
|
|||
|
||||
variantNewPlane
|
||||
variantNewQuat
|
||||
variantNewRect3
|
||||
variantNewAABB
|
||||
variantNewBasis
|
||||
variantNewTransform
|
||||
variantNewColor
|
||||
|
|
@ -3081,7 +3081,7 @@ proc setGDNativeAPI*(apiStruct: pointer) {.inline.} =
|
|||
variantAsTransform2D
|
||||
variantAsPlane
|
||||
variantAsQuat
|
||||
variantAsRect3
|
||||
variantAsAABB
|
||||
variantAsBasis
|
||||
variantAsTransform
|
||||
variantAsColor
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ import core.godotbase, godotinternal
|
|||
import core.godotcoretypes
|
||||
import core.vector2, core.rect2, core.vector3, core.transform2d, core.planes,
|
||||
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
|
||||
import core.dictionaries, core.arrays, core.poolarrays, core.variants
|
||||
|
||||
import nim.godotmacros, nim.godotnim
|
||||
|
||||
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
|
||||
export godotmacros, godotnim
|
||||
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ const standardTypes = toSet(
|
|||
["bool", "cint", "int", "uint8", "int8", "uint16", "int16", "uint32", "int32",
|
||||
"uint64",
|
||||
"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",
|
||||
"PoolByteArray", "PoolIntArray", "PoolRealArray", "PoolStringArray",
|
||||
"PoolVector2Array", "PoolVector3Array", "PoolColorArray"])
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ type
|
|||
Transform2D,
|
||||
Plane,
|
||||
Quat, ## 10
|
||||
Rect3,
|
||||
AABB,
|
||||
Basis,
|
||||
Transform, ## misc types
|
||||
Color,
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ proc initGodotVariant*(dest: var GodotVariant; plane: Plane) {.inline.} =
|
|||
proc initGodotVariant*(dest: var GodotVariant; quat: Quat) {.inline.} =
|
||||
getGDNativeAPI().variantNewQuat(dest, quat)
|
||||
|
||||
proc initGodotVariant*(dest: var GodotVariant; rect3: Rect3) {.inline.} =
|
||||
getGDNativeAPI().variantNewRect3(dest, rect3)
|
||||
proc initGodotVariant*(dest: var GodotVariant; aabb: AABB) {.inline.} =
|
||||
getGDNativeAPI().variantNewAABB(dest, aabb)
|
||||
|
||||
proc initGodotVariant*(dest: var GodotVariant; basis: Basis) {.inline.} =
|
||||
getGDNativeAPI().variantNewBasis(dest, basis)
|
||||
|
|
@ -138,8 +138,8 @@ proc asPlane*(self: GodotVariant): Plane {.inline.} =
|
|||
proc asQuat*(self: GodotVariant): Quat {.inline.} =
|
||||
getGDNativeAPI().variantAsQuat(self)
|
||||
|
||||
proc asRect3*(self: GodotVariant): Rect3 {.inline.} =
|
||||
getGDNativeAPI().variantAsRect3(self)
|
||||
proc asAABB*(self: GodotVariant): AABB {.inline.} =
|
||||
getGDNativeAPI().variantAsAABB(self)
|
||||
|
||||
proc asBasis*(self: GodotVariant): Basis {.inline.} =
|
||||
getGDNativeAPI().variantAsBasis(self)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import gdnativeapi
|
|||
import core.godotcoretypes
|
||||
import core.vector2, core.rect2,
|
||||
core.vector3, core.transform2d,
|
||||
core.planes, core.quats, core.rect3,
|
||||
core.planes, core.quats, core.aabb,
|
||||
core.basis, core.transforms, core.colors,
|
||||
core.nodepaths, core.rids, core.dictionaries,
|
||||
core.arrays, core.poolarrays, core.variants
|
||||
|
|
@ -57,7 +57,7 @@ type
|
|||
SomeFloat = float32 or float64 or cfloat
|
||||
|
||||
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
|
||||
RID or GodotObject or Dictionary or Array or
|
||||
PoolByteArray or PoolIntArray or PoolRealArray or
|
||||
|
|
@ -497,8 +497,8 @@ proc godotTypeInfo*(T: typedesc[SomeGodotOrNum]): GodotTypeInfo {.inline.} =
|
|||
VariantType.Plane
|
||||
elif T is Quat:
|
||||
VariantType.Quat
|
||||
elif T is Rect3:
|
||||
VariantType.Rect3
|
||||
elif T is AABB:
|
||||
VariantType.AABB
|
||||
elif T is Basis:
|
||||
VariantType.Basis
|
||||
elif T is Transform:
|
||||
|
|
@ -614,8 +614,8 @@ proc fromVariant*[T: SomeGodot](self: var T, val: Variant): ConversionResult =
|
|||
self = val.asPlane()
|
||||
elif self is Quat:
|
||||
self = val.asQuat()
|
||||
elif self is Rect3:
|
||||
self = val.asRect3()
|
||||
elif self is AABB:
|
||||
self = val.asAABB()
|
||||
elif self is Basis:
|
||||
self = val.asBasis()
|
||||
elif self is Transform:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue