Showing the changes to libraries/physics/src/ObjectMotionState.cpp (1 of 4 files). Show all
Unified · Split
| @@ -31,6 +31,7 @@ const float DEFAULT_RESTITUTION = 0.0f; · 30 unmodified lines | ||
| 31 | 31 | |
| 32 | 32 | // origin of physics simulation in world frame |
| 33 | 33 | glm::vec3 _worldOffset(0.0f); |
| 34 | +QSet<ObjectMotionState*>* _outgoingPacketQueue; | |
| 34 | 35 | |
| 35 | 36 | // static |
| 36 | 37 | void ObjectMotionState::setWorldOffset(const glm::vec3& offset) { |
| @@ -42,6 +43,18 @@ const glm::vec3& ObjectMotionState::getWorldOffset() { · 5 unmodified lines | ||
| 42 | 43 | return _worldOffset; |
| 43 | 44 | } |
| 44 | 45 | |
| 46 | +// static | |
| 47 | +void ObjectMotionState::setOutgoingPacketQueue(QSet<ObjectMotionState*>* outgoing) { | |
| 48 | + assert(outgoing); | |
| 49 | + _outgoingPacketQueue = outgoing; | |
| 50 | +} | |
| 51 | + | |
| 52 | +// static | |
| 53 | +void ObjectMotionState::enqueueOutgoingPacket(ObjectMotionState* state) { | |
| 54 | + assert(_outgoingPacketQueue); | |
| 55 | + _outgoingPacketQueue->insert(state); | |
| 56 | +} | |
| 57 | + | |
| 45 | 58 | ObjectMotionState::ObjectMotionState() : |
| 46 | 59 | _density(DEFAULT_DENSITY), |
| 47 | 60 | _volume(DEFAULT_VOLUME), |