Skip to content
selimanac edited this page Jan 24, 2025 · 3 revisions

daabbcc3d.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.

daabbcc3d.UPDATE_INCREMENTAL: No rebuild. Default.
daabbcc3d.UPDATE_FULLREBUILD: Full Rebuild.
daabbcc3d.UPDATE_PARTIALREBUILD: Partial rebuild. Recommended for lots of moving AABBs

Returns

  • group_id (uint8) - New group ID

Example

local group_id = daabbcc3d.new_group(daabbcc3d.UPDATE_INCREMENTAL)

daabbcc3d.remove_group(group_id)

Removes the group and all associated AABBs and Gameobjects.

Parameters

  • group_id (uint8) - Group ID

Example

local group_id = daabbcc3d.new_group()

daabbcc3d.remove_group(group_id) 

daabbcc3d.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 = daabbcc3d.new_group()

daabbcc3d.rebuild(group_id, true) -- Full rebuild a group

daabbcc3d.rebuild_all(full_build)

Paritially or full rebuild all groups.

Parameters

  • full_build (bool) - Full or paritial build

Example

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