Skip to content
selimanac edited this page Oct 8, 2024 · 11 revisions

daabbcc.new_group([rebuild_type])

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)

daabbcc.remove_group(group_id)

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) 

daabbcc.rebuild(group_id, full_build)

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

daabbcc.rebuild_all(full_build)

Paritially or full rebuild all groups.

Parameters

  • full_build (bool) - Full or paritial build

Example

daabbcc.rebuild_all(true) -- Full rebuild all groups