Space Engineers
|
Use this class to prevent multiple instances close to each other at the same time. Call add instance to test whether instance can be added. More...
Public Types | |
enum | GroupingMode { GroupingMode.ContainsCenter, GroupingMode.Overlaps } |
Public Member Functions | |
MyLocalityGrouping (GroupingMode mode) | |
bool | AddInstance (TimeSpan lifeTime, Vector3 position, float radius, bool removeOld=true) |
This is currently O(n), when it's not enough, bounding volume tree or KD-tree will be used. More... | |
void | RemoveOld () |
This is O(r) where r is number of removed elements More... | |
void | Clear () |
Public Attributes | |
GroupingMode | Mode |
Use this class to prevent multiple instances close to each other at the same time. Call add instance to test whether instance can be added.
Definition at line 14 of file MyLocalityGrouping.cs.
Enumerator | |
---|---|
ContainsCenter | |
Overlaps |
Definition at line 16 of file MyLocalityGrouping.cs.
|
inline |
Definition at line 46 of file MyLocalityGrouping.cs.
|
inline |
This is currently O(n), when it's not enough, bounding volume tree or KD-tree will be used.
Definition at line 54 of file MyLocalityGrouping.cs.
|
inline |
Definition at line 85 of file MyLocalityGrouping.cs.
|
inline |
This is O(r) where r is number of removed elements
Definition at line 75 of file MyLocalityGrouping.cs.
GroupingMode Sandbox.Engine.Utils.MyLocalityGrouping.Mode |
Definition at line 37 of file MyLocalityGrouping.cs.