-
-
Notifications
You must be signed in to change notification settings - Fork 4
Groups
selimanac edited this page Oct 8, 2024
·
11 revisions
New empty group for AABBs. Every group is a seperate Dynamic Tree.
Parameters
-
rebuild_type
(enum)[optional] - Rebuilds the tree after each update for moving gameobject positions. The tree will only be rebuilt if there is at least one gameobject present.
daabbcc.UPDATE_INCREMENTAL: No rebuild. Default.
daabbcc.UPDATE_FULLREBUILD: Full Rebuild.
daabbcc.UPDATE_PARTIALREBUILD: Partial rebuild. Recommended for lots of moving AABBs
Returns
-
group_id
(uint8) - New group ID
Example
local group_id = daabbcc.new_group(daabbcc.UPDATE_INCREMENTAL)
Removes the group and all associated AABBs and Gameobjects.
Parameters
-
group_id
(uint8) - Group ID
Example
local group_id = daabbcc.new_group()
daabbcc.remove_group(group_id)
Paritially or full rebuild a group.
Parameters
-
group_id
(uint8) - Group ID -
full_build
(bool) - Full or paritial build
Example
local group_id = daabbcc.new_group()
daabbcc.rebuild(group_id, true) -- Full rebuild a group
Paritially or full rebuild all groups.
Parameters
-
full_build
(bool) - Full or paritial build
Example
daabbcc.rebuild_all(true) -- Full rebuild all groups
If you find my Defold Extensions useful for your projects, please consider supporting it.
I'd love to hear about your projects! Please share your released projects that use my native extensions. It would be very motivating for me.