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