CullSphereGroup
A userdata object representing a cull sphere group.
Values:
Functions:
Operations:
id int
Get:
Returns the id of a sphere group.
addSphere(sphereGroup, id, position, radius)
Adds a sphere to the sphere group, duplicate ids are ignored.
Parameters:
Type | Name | Description |
CullSphereGroup | sphereGroup | The sphere group. |
int | id | Sphere id. |
Vec3 | position | Sphere position. |
number | radius | Sphere radius. |
getDelta(sphereGroup, position, innerRadius, outerRadius)
Queries the change in overlapping spheres since the last call to getDelta.
Parameters:
Type | Name | Description |
CullSphereGroup | sphereGroup | The sphere group. |
Vec3 | position | Position to query shpere. |
number | innerRadius | Radius for inner shpere. |
number | outerRadius | Radius for outer sphere. |
Returns:
Type | Description |
table, table | Arrays of removed, added ids {integer, ...}. |
getOverlaps(sphereGroup, position, radius)
Query for overlapping spheres.
Parameters:
Type | Name | Description |
CullSphereGroup | sphereGroup | The sphere group. |
Vec3 | position | Position to query sphere. |
number | radius | Radius for query sphere. |
leave(sphereGroup)
Query all currently active spheres and leave them.
Parameters:
Returns:
Type | Description |
table | An array of previously active ids {integer, ...}. |
removeSphere(sphereGroup, id)
Removes a sphere from the sphere group.
Parameters:
Type | Name | Description |
CullSphereGroup | sphereGroup | The sphere group. |
int | id | Sphere id. |