Implement hash proc for Godot types
This commit is contained in:
parent
4eb771e9be
commit
76de026b4f
15 changed files with 139 additions and 38 deletions
|
|
@ -1,5 +1,8 @@
|
|||
# Copyright (c) 2018 Xored Software, Inc.
|
||||
|
||||
import hashes
|
||||
|
||||
import vector3
|
||||
import internal.godotinternaltypes, internal.godotstrings
|
||||
import godotcoretypes, gdnativeapi
|
||||
|
||||
|
|
@ -9,6 +12,9 @@ proc initAABB*(pos, size: Vector3): AABB {.inline.} =
|
|||
proc `$`*(self: AABB): string {.inline.} =
|
||||
$getGDNativeAPI().aabbAsString(self)
|
||||
|
||||
proc hash*(self: AABB): Hash {.inline.} =
|
||||
!$(self.position.hash() !& self.size.hash())
|
||||
|
||||
proc area*(self: AABB): float32 {.inline.} =
|
||||
getGDNativeAPI().aabbGetArea(self)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue