CullSphereGroup
Associated namespace: sm.cullSphereGroup
A userdata object representing a cull sphere group.
Values:-
id
[ int ]Get
: The id of the sphere group.
Operation | Description |
---|---|
CullSphereGroup == CullSphereGroup | 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.
Arguments:cullSphereGroup
[ CullSphereGroup ]: The sphere group.id
[ int ]: The sphere id.position
[ Vec3 ]: The sphere position.radius
[ number ]: The sphere radius.
getDelta
cullSphereGroup:getDelta( position, innerRadius, outerRadius )
Queries the change in overlapping spheres since the last call to getDelta.
Arguments:cullSphereGroup
[ CullSphereGroup ]: The sphere group.position
[ Vec3 ]: Position to query sphere.innerRadius
[ number ]: Radius for the inner sphere.outerRadius
[ number ]: Radius for the outer sphere.
- [ table ]: A table of removed ids.
- [ table ]: A table of added ids.
getOverlaps
cullSphereGroup:getOverlaps( position, radius )
Query for overlapping spheres.
Arguments:cullSphereGroup
[ CullSphereGroup ]: The sphere group.position
[ Vec3 ]: Position to query sphere.radius
[ number ]: Radius for the query sphere.
leave
cullSphereGroup:leave()
Query all currently active spheres and leave them.
Arguments:cullSphereGroup
[ CullSphereGroup ]: The sphere group.
- [ table ]: A table of previously active ids.
removeSphere
cullSphereGroup:removeSphere( id )
Removes a sphere from the sphere group.
Arguments:cullSphereGroup
[ CullSphereGroup ]: The sphere group.id
[ int ]: The sphere id.