DarkBASIC Professional Help File

DX11 GET WORLD SECTOR Y

Retrieves the Y coordinate of the sector that the given 3D position resides in.
If the coordinate is out of range of the sectors (as can be set through the DX11 SET WORLD SECTORS function), the special catch-all sector is considered
to contain said coordinate. In this case this function will return -1 to indicate this.
Sectors are used as a means to group multiple objects together and cull them early if the sector volume (which is a box) is not visible by the camera.
Sectors consist of 3x3 sub-sectors, and the outermost of these are shared between sectors to account for objects that would technically be present in more than
one adjacent sector (such as spanning over the edges of one).
This function is mainly intended for debugging purposes as a means of gathering some extra statistics, since the sector engine and sector updates are self-contained
within the Ziggurat engine itself.

Syntax

    Return Integer = DX11 GET WORLD SECTOR Y(x, y, z)

Parameters

    x

> Float
> The 3D x-coordinate to check which world sector it would belong to.

    y

> Float
> The 3D x-coordinate to check which world sector it would belong to.

    z

> Float
> The 3D x-coordinate to check which world sector it would belong to.

Returns

The Y coordinate of the world sector that the specified 3D coordinate resides in. A value of -1 will be returned if this is the catch-all sector due to being out-of-range.

See also

CORE Functions Menu
DX11 Function Categories