DarkBASIC Professional Help File

DX11 SET WORLD SECTORS

Sets the number and volume of world sectors maintained by the engine.
Sectors are used to group adjacent objects / limbs together so that they may be culled early if their entire sector is out of view. The sectors do
overlap so that objects that happen to be on the edge between two sectors doesn't get clipped as soon as its "source sector" is out of view.
The best amount and sector size depends on your scene and it should generally be set to fit around the volume used by the current scene.
Any objects outside of any sector will be placed in the catch-all sector; it is ill advised to keep relying on that one for too
many objects since all of them will be individually culled for each render pass however.
Take note that recreating the sector partitioning is a rather involved process if all objects have to be relocated to new sectors; for this
reason it is recommended to call this function when you have few, if any, objects currently loaded. Since the only times you should need to
change the sector setup is when changing scenes this shouldn't need to be that much of a problem.

Syntax

    DX11 SET WORLD SECTORS across, down, through, width, height, depth

Parameters

    across

> Dword
> The number of world sectors to create along the X axis.

    down

> Dword
> The number of world sectors to create along the Y axis. Generally you don't need as many Y-axis aligned sectors as for the X and Z axis, but it depends on the application.

    through

> Dword
> The number of world sectors to create along the Z axis.

    width

> Float
> The width of a single sector. The width of the entire sectorized volume is acrosswidth.

    height

> Float
> The height of a single sector. The height of the entire sectorized volume is downheight.

    depth

> Float
> The depth of a single sector. The depth of the entire sectorized volume is throughdepth.

Returns

This function does not return a value.

See also

CORE Functions Menu
DX11 Function Categories