mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 01:36:56 +02:00
add Space::clear() method
This commit is contained in:
parent
67c78a2df1
commit
18a6ac057a
2 changed files with 6 additions and 1 deletions
|
@ -20,6 +20,11 @@
|
||||||
|
|
||||||
using namespace workload;
|
using namespace workload;
|
||||||
|
|
||||||
|
void Space::clear() {
|
||||||
|
_proxies.clear();
|
||||||
|
_freeIndices.clear();
|
||||||
|
}
|
||||||
|
|
||||||
int32_t Space::createProxy(const Space::Sphere& newSphere) {
|
int32_t Space::createProxy(const Space::Sphere& newSphere) {
|
||||||
if (_freeIndices.empty()) {
|
if (_freeIndices.empty()) {
|
||||||
_proxies.emplace_back(Space::Proxy(newSphere));
|
_proxies.emplace_back(Space::Proxy(newSphere));
|
||||||
|
|
|
@ -70,6 +70,7 @@ public:
|
||||||
|
|
||||||
Space() {}
|
Space() {}
|
||||||
|
|
||||||
|
void clear();
|
||||||
int32_t createProxy(const Sphere& sphere);
|
int32_t createProxy(const Sphere& sphere);
|
||||||
void deleteProxies(const std::vector<int32_t>& deadIndices);
|
void deleteProxies(const std::vector<int32_t>& deadIndices);
|
||||||
void updateProxies(const std::vector<ProxyUpdate>& changedProxies);
|
void updateProxies(const std::vector<ProxyUpdate>& changedProxies);
|
||||||
|
@ -79,7 +80,6 @@ public:
|
||||||
uint32_t getNumAllocatedProxies() const { return (uint32_t)(_proxies.size()); }
|
uint32_t getNumAllocatedProxies() const { return (uint32_t)(_proxies.size()); }
|
||||||
|
|
||||||
void categorizeAndGetChanges(std::vector<Change>& changes);
|
void categorizeAndGetChanges(std::vector<Change>& changes);
|
||||||
|
|
||||||
uint32_t copyProxyValues(Proxy* proxies, uint32_t numDestProxies);
|
uint32_t copyProxyValues(Proxy* proxies, uint32_t numDestProxies);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue