mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 01:36:26 +02:00
* remove EntityItem::_simulationState (only useful to EntitySimulation) * move code from SimpleEntitySimuation to EntitySimulation * EntitySimulation now maintans many QSets of entities * cleanup and clarify use of EnityTree::updateEntity() * reduced cost of polling for entity expiries * changed "UpdateFlags" to "DirtyFlags" and clarified what they're for
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
//
|
|
// SimpleEntitySimulation.h
|
|
// libraries/entities/src
|
|
//
|
|
// Created by Andrew Meadows on 2014.11.24
|
|
// Copyright 2014 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_SimpleEntitySimulation_h
|
|
#define hifi_SimpleEntitySimulation_h
|
|
|
|
#include "EntitySimulation.h"
|
|
|
|
/// provides simple velocity + gravity extrapolation of EntityItem's
|
|
|
|
class SimpleEntitySimulation : public EntitySimulation {
|
|
public:
|
|
SimpleEntitySimulation() : EntitySimulation() { }
|
|
virtual ~SimpleEntitySimulation() { clearEntitiesInternal(); }
|
|
|
|
protected:
|
|
virtual void updateEntitiesInternal(const quint64& now);
|
|
virtual void addEntityInternal(EntityItem* entity);
|
|
virtual void removeEntityInternal(EntityItem* entity);
|
|
virtual void entityChangedInternal(EntityItem* entity);
|
|
virtual void clearEntitiesInternal();
|
|
|
|
QSet<EntityItem*> _movingEntities;
|
|
QSet<EntityItem*> _movableButStoppedEntities;
|
|
};
|
|
|
|
#endif // hifi_SimpleEntitySimulation_h
|