Sets entity AABB bounding box (for frustum culling and collision detection).
Takes entity (entity handle), minX/minY/minZ (box minimum corner in local space), maxX/maxY/maxZ (box maximum corner in local space).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
entityInt
minXDouble
minYDouble
minZDouble
maxXDouble
maxYDouble
maxZDouble
Returns
Void
Quick Summary
Sets entity AABB bounding box (for frustum culling and collision detection).
Takes entity (entity handle), minX/minY/minZ (box minimum corner in local space), maxX/maxY/maxZ (box maximum corner in local space).
Returns nothing.
Technical Exegesis...
Sets entity AABB bounding box (for frustum culling and collision detection). Takes entity (entity handle), minX/minY/minZ (box minimum corner in local space), maxX/maxY/maxZ (box maximum corner in local space). Returns nothing. Validates entity exists, sets entity->collisionBoxMin=(minX,minY,minZ) and entity->collisionBoxMax=(maxX,maxY,maxZ). Defines axis-aligned bounding box for culling and collision.
This function sets AABB bounds.
Sets entity AABB bounding box (for frustum culling and collision detection). Takes entity (entity handle), minX/minY/minZ (box minimum corner in local space), maxX/maxY/maxZ (box maximum corner in local space). Returns nothing. Validates entity exists, sets entity->collisionBoxMin=(minX,minY,minZ) and entity->collisionBoxMax=(maxX,maxY,maxZ). Defines axis-aligned bounding box for culling and collision.
This function sets AABB bounds. AABB definition: axis-aligned bounding box = rectangular volume aligned to world axes (not rotated with entity), min corner = (minX,minY,minZ) smallest coordinates, max corner = (maxX,maxY,maxZ) largest coordinates, local space coordinates (relative to entity position). World space transformation: AABB transformed to world space for testing (worldMin = entityPos + boxMin * entityScale, worldMax = entityPos + boxMax * entityScale), scale applied to box dimensions, rotation NOT applied (remains axis-aligned in world space). Use cases: (1) Frustum culling (b3dEntityInView tests AABB against camera frustum, entities with box outside frustum are culled), (2) Collision detection (AABB-AABB intersection for box-shaped objects), (3) Bounds computation (automatic bounds from mesh geometry, manual override with b3dEntityBox), (4) Occlusion culling (test if AABB occluded by other geometry), (5) Editor tools (show bounding box for selection, resize handles). Common patterns: centered box b3dEntityBox(entity, -1,-1,-1, 1,1,1) for 2x2x2 cube, asymmetric box b3dEntityBox(entity, -0.5,0,-0.5, 0.5,2,0.5) for character (0-2 height), tight-fit box computed from mesh vertices. Typical usage: set AABB to tightly fit mesh geometry (compute from vertex positions), set conservative AABB for rough culling (slightly oversized), override automatic bounds for special cases (invisible trigger volumes). Local space coordinates: min/max specified in entity's local coordinate system (before position/rotation/scale), allows reusing same box definition for multiple instances (scale adjusts box size automatically). Mesh bounds: meshes automatically compute AABB from vertices (b3dMeshWidth/Height/Depth query computed bounds), b3dEntityBox overrides automatic bounds (manual control for special cases). AABB vs sphere: AABB (b3dEntityBox) good for box-shaped objects and frustum culling, sphere (b3dEntityRadius) good for roughly spherical objects and simple collision, many entities use both (AABB for frustum test, sphere for proximity). Performance: O(1) assignment (simple field set, no computation). Default bounds: entities likely default to unit box (-1,-1,-1 to 1,1,1) or computed from mesh (verify during testing). Related: b3dEntityInView tests AABB against camera frustum, b3dMeshWidth/Height/Depth query mesh bounds, b3dEntityRadius sets collision sphere (alternative bounds).