mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 07:43:35 +02:00
getting animation working again
This commit is contained in:
parent
d1589e0d8e
commit
f1d2017a9e
13 changed files with 221 additions and 150 deletions
|
@ -1608,6 +1608,7 @@ function handeMenuEvent(menuItem){
|
||||||
array.push({ label: "Model URL:", value: properties.modelURL });
|
array.push({ label: "Model URL:", value: properties.modelURL });
|
||||||
array.push({ label: "Animation URL:", value: properties.animationURL });
|
array.push({ label: "Animation URL:", value: properties.animationURL });
|
||||||
array.push({ label: "Animation is playing:", value: properties.animationIsPlaying });
|
array.push({ label: "Animation is playing:", value: properties.animationIsPlaying });
|
||||||
|
array.push({ label: "Animation FPS:", value: properties.animationFPS });
|
||||||
}
|
}
|
||||||
array.push({ label: "X:", value: properties.position.x.toFixed(decimals) });
|
array.push({ label: "X:", value: properties.position.x.toFixed(decimals) });
|
||||||
array.push({ label: "Y:", value: properties.position.y.toFixed(decimals) });
|
array.push({ label: "Y:", value: properties.position.y.toFixed(decimals) });
|
||||||
|
@ -1632,6 +1633,7 @@ function handeMenuEvent(menuItem){
|
||||||
properties.modelURL = array[index++].value;
|
properties.modelURL = array[index++].value;
|
||||||
properties.animationURL = array[index++].value;
|
properties.animationURL = array[index++].value;
|
||||||
properties.animationIsPlaying = array[index++].value;
|
properties.animationIsPlaying = array[index++].value;
|
||||||
|
properties.animationFPS = array[index++].value;
|
||||||
}
|
}
|
||||||
properties.position.x = array[index++].value;
|
properties.position.x = array[index++].value;
|
||||||
properties.position.y = array[index++].value;
|
properties.position.y = array[index++].value;
|
||||||
|
|
|
@ -128,7 +128,7 @@ qDebug() << "BoxEntityItem::readEntityDataFromBuffer()... <<<<<<<<<<<<<<<< <<<<
|
||||||
dataAt += encodedType.size();
|
dataAt += encodedType.size();
|
||||||
bytesRead += encodedType.size();
|
bytesRead += encodedType.size();
|
||||||
quint32 type = typeCoder;
|
quint32 type = typeCoder;
|
||||||
_type = (EntityTypes::EntityType_t)type;
|
_type = (EntityTypes::EntityType)type;
|
||||||
|
|
||||||
// XXXBHG: is this a good place to handle the last edited time client vs server??
|
// XXXBHG: is this a good place to handle the last edited time client vs server??
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ qDebug() << "BoxEntityItem::appendEntityData()... ******************************
|
||||||
|
|
||||||
// encode our type as a byte count coded byte stream
|
// encode our type as a byte count coded byte stream
|
||||||
|
|
||||||
EntityTypes::EntityType_t type = getType();
|
EntityTypes::EntityType type = getType();
|
||||||
qDebug() << "BoxEntityItem::appendEntityData()... type=" << type;
|
qDebug() << "BoxEntityItem::appendEntityData()... type=" << type;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -460,7 +460,7 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
|
||||||
dataAt += encodedType.size();
|
dataAt += encodedType.size();
|
||||||
bytesRead += encodedType.size();
|
bytesRead += encodedType.size();
|
||||||
quint32 type = typeCoder;
|
quint32 type = typeCoder;
|
||||||
_type = (EntityTypes::EntityType_t)type;
|
_type = (EntityTypes::EntityType)type;
|
||||||
|
|
||||||
// XXXBHG: is this a good place to handle the last edited time client vs server??
|
// XXXBHG: is this a good place to handle the last edited time client vs server??
|
||||||
|
|
||||||
|
@ -1086,35 +1086,11 @@ void EntityItem::adjustEditPacketForClockSkew(unsigned char* editPacketBuffer, s
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityItem::update(const quint64& updateTime) {
|
void EntityItem::update(const quint64& updateTime) {
|
||||||
_lastUpdated = updateTime;
|
// nothing to do here... but will add gravity, etc...
|
||||||
setShouldBeDeleted(getShouldBeDeleted());
|
}
|
||||||
|
|
||||||
quint64 now = usecTimestampNow();
|
EntityItem::SimuationState EntityItem::getSimulationState() const {
|
||||||
|
return EntityItem::Static; // change this once we support gravity, etc...
|
||||||
// only advance the frame index if we're playing
|
|
||||||
#if 0 //def HIDE_SUBCLASS_METHODS
|
|
||||||
if (getAnimationIsPlaying()) {
|
|
||||||
|
|
||||||
float deltaTime = (float)(now - _lastAnimated) / (float)USECS_PER_SECOND;
|
|
||||||
|
|
||||||
const bool wantDebugging = false;
|
|
||||||
if (wantDebugging) {
|
|
||||||
qDebug() << "EntityItem::update() now=" << now;
|
|
||||||
qDebug() << " updateTime=" << updateTime;
|
|
||||||
qDebug() << " _lastAnimated=" << _lastAnimated;
|
|
||||||
qDebug() << " deltaTime=" << deltaTime;
|
|
||||||
}
|
|
||||||
_lastAnimated = now;
|
|
||||||
_animationFrameIndex += deltaTime * _animationFPS;
|
|
||||||
|
|
||||||
if (wantDebugging) {
|
|
||||||
qDebug() << " _animationFrameIndex=" << _animationFrameIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
_lastAnimated = now;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityItem::copyChangedProperties(const EntityItem& other) {
|
void EntityItem::copyChangedProperties(const EntityItem& other) {
|
||||||
|
|
|
@ -70,7 +70,15 @@ public:
|
||||||
unsigned char* bufferOut, int sizeIn, int& sizeOut);
|
unsigned char* bufferOut, int sizeIn, int& sizeOut);
|
||||||
|
|
||||||
static void adjustEditPacketForClockSkew(unsigned char* codeColorBuffer, ssize_t length, int clockSkew);
|
static void adjustEditPacketForClockSkew(unsigned char* codeColorBuffer, ssize_t length, int clockSkew);
|
||||||
void update(const quint64& now);
|
virtual void update(const quint64& now);
|
||||||
|
|
||||||
|
typedef enum SimuationState_t {
|
||||||
|
Static,
|
||||||
|
Changing,
|
||||||
|
Moving
|
||||||
|
} SimuationState;
|
||||||
|
|
||||||
|
virtual SimuationState getSimulationState() const ;
|
||||||
void debugDump() const;
|
void debugDump() const;
|
||||||
|
|
||||||
// similar to assignment/copy, but it handles keeping lifetime accurate
|
// similar to assignment/copy, but it handles keeping lifetime accurate
|
||||||
|
@ -78,7 +86,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// attributes applicable to all entity types
|
// attributes applicable to all entity types
|
||||||
EntityTypes::EntityType_t getType() const { return _type; }
|
EntityTypes::EntityType getType() const { return _type; }
|
||||||
const glm::vec3& getPosition() const { return _position; } /// get position in domain scale units (0.0 - 1.0)
|
const glm::vec3& getPosition() const { return _position; } /// get position in domain scale units (0.0 - 1.0)
|
||||||
void setPosition(const glm::vec3& value) { _position = value; } /// set position in domain scale units (0.0 - 1.0)
|
void setPosition(const glm::vec3& value) { _position = value; } /// set position in domain scale units (0.0 - 1.0)
|
||||||
|
|
||||||
|
@ -100,11 +108,14 @@ public:
|
||||||
glm::vec3 getMaximumPoint() const { return _position + glm::vec3(_radius, _radius, _radius); }
|
glm::vec3 getMaximumPoint() const { return _position + glm::vec3(_radius, _radius, _radius); }
|
||||||
AACube getAACube() const { return AACube(getMinimumPoint(), getSize()); } /// AACube in domain scale units (0.0 - 1.0)
|
AACube getAACube() const { return AACube(getMinimumPoint(), getSize()); } /// AACube in domain scale units (0.0 - 1.0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void initFromEntityItemID(const EntityItemID& entityItemID); // maybe useful to allow subclasses to init
|
virtual void initFromEntityItemID(const EntityItemID& entityItemID); // maybe useful to allow subclasses to init
|
||||||
|
|
||||||
quint32 _id;
|
quint32 _id;
|
||||||
EntityTypes::EntityType_t _type;
|
EntityTypes::EntityType _type;
|
||||||
uint32_t _creatorTokenID;
|
uint32_t _creatorTokenID;
|
||||||
bool _newlyCreated;
|
bool _newlyCreated;
|
||||||
quint64 _lastUpdated;
|
quint64 _lastUpdated;
|
||||||
|
|
|
@ -119,7 +119,7 @@ public:
|
||||||
void debugDump() const;
|
void debugDump() const;
|
||||||
|
|
||||||
// properties of all entities
|
// properties of all entities
|
||||||
EntityTypes::EntityType_t getType() const { return _type; }
|
EntityTypes::EntityType getType() const { return _type; }
|
||||||
const glm::vec3& getPosition() const { return _position; }
|
const glm::vec3& getPosition() const { return _position; }
|
||||||
float getRadius() const { return _radius; }
|
float getRadius() const { return _radius; }
|
||||||
float getMaxDimension() const { return _radius * 2.0f; }
|
float getMaxDimension() const { return _radius * 2.0f; }
|
||||||
|
@ -127,7 +127,7 @@ public:
|
||||||
const glm::quat& getRotation() const { return _rotation; }
|
const glm::quat& getRotation() const { return _rotation; }
|
||||||
bool getShouldBeDeleted() const { return _shouldBeDeleted; }
|
bool getShouldBeDeleted() const { return _shouldBeDeleted; }
|
||||||
|
|
||||||
void setType(EntityTypes::EntityType_t type) { _type = type; }
|
void setType(EntityTypes::EntityType type) { _type = type; }
|
||||||
/// set position in meter units
|
/// set position in meter units
|
||||||
void setPosition(const glm::vec3& value) { _position = value; _positionChanged = true; }
|
void setPosition(const glm::vec3& value) { _position = value; _positionChanged = true; }
|
||||||
void setRadius(float value) { _radius = value; _radiusChanged = true; }
|
void setRadius(float value) { _radius = value; _radiusChanged = true; }
|
||||||
|
@ -170,7 +170,7 @@ private:
|
||||||
bool _idSet;
|
bool _idSet;
|
||||||
quint64 _lastEdited;
|
quint64 _lastEdited;
|
||||||
|
|
||||||
EntityTypes::EntityType_t _type;
|
EntityTypes::EntityType _type;
|
||||||
glm::vec3 _position;
|
glm::vec3 _position;
|
||||||
float _radius;
|
float _radius;
|
||||||
glm::quat _rotation;
|
glm::quat _rotation;
|
||||||
|
|
|
@ -176,6 +176,9 @@ void EntityTree::addEntityItem(EntityItem* entityItem) {
|
||||||
//qDebug() << "AFTER... about to call recurseTreeWithOperator(AddEntityOperator)...";
|
//qDebug() << "AFTER... about to call recurseTreeWithOperator(AddEntityOperator)...";
|
||||||
//debugDumpMap();
|
//debugDumpMap();
|
||||||
|
|
||||||
|
// check to see if we need to simulate this entity..
|
||||||
|
changeEntityState(entityItem, EntityItem::Static, entityItem->getSimulationState());
|
||||||
|
|
||||||
_isDirty = true;
|
_isDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +366,6 @@ OctreeElement* UpdateEntityOperator::PossiblyCreateChildAt(OctreeElement* elemen
|
||||||
|
|
||||||
|
|
||||||
bool EntityTree::updateEntity(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
bool EntityTree::updateEntity(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||||
bool updated = false;
|
|
||||||
// You should not call this on existing entities that are already part of the tree! Call updateEntity()
|
// You should not call this on existing entities that are already part of the tree! Call updateEntity()
|
||||||
EntityTreeElement* containingElement = getContainingElement(entityID);
|
EntityTreeElement* containingElement = getContainingElement(entityID);
|
||||||
if (!containingElement) {
|
if (!containingElement) {
|
||||||
|
@ -376,10 +378,17 @@ bool EntityTree::updateEntity(const EntityItemID& entityID, const EntityItemProp
|
||||||
assert(existingEntity); // don't call updateEntity() on entity items that don't exist
|
assert(existingEntity); // don't call updateEntity() on entity items that don't exist
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check to see if we need to simulate this entity...
|
||||||
|
EntityItem::SimuationState oldState = existingEntity->getSimulationState();
|
||||||
|
|
||||||
UpdateEntityOperator theOperator(this, containingElement, existingEntity, properties);
|
UpdateEntityOperator theOperator(this, containingElement, existingEntity, properties);
|
||||||
recurseTreeWithOperator(&theOperator);
|
recurseTreeWithOperator(&theOperator);
|
||||||
_isDirty = true;
|
_isDirty = true;
|
||||||
|
|
||||||
|
EntityItem::SimuationState newState = existingEntity->getSimulationState();
|
||||||
|
changeEntityState(existingEntity, oldState, newState);
|
||||||
|
|
||||||
containingElement = getContainingElement(entityID);
|
containingElement = getContainingElement(entityID);
|
||||||
if (!containingElement) {
|
if (!containingElement) {
|
||||||
qDebug() << "after updateEntity() we no longer have a containing element???";
|
qDebug() << "after updateEntity() we no longer have a containing element???";
|
||||||
|
@ -408,7 +417,7 @@ EntityItem* EntityTree::addEntity(const EntityItemID& entityID, const EntityItem
|
||||||
}
|
}
|
||||||
|
|
||||||
// construct the instance of the entity
|
// construct the instance of the entity
|
||||||
EntityTypes::EntityType_t type = properties.getType();
|
EntityTypes::EntityType type = properties.getType();
|
||||||
result = EntityTypes::constructEntityItem(type, entityID, properties);
|
result = EntityTypes::constructEntityItem(type, entityID, properties);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -1068,50 +1077,109 @@ if (childAt) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EntityTree::changeEntityState(EntityItem* const entity, EntityItem::SimuationState oldState, EntityItem::SimuationState newState) {
|
||||||
|
if (oldState != newState) {
|
||||||
|
switch (oldState) {
|
||||||
|
case EntityItem::Changing:
|
||||||
|
_changingEntities.removeAll(entity);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EntityItem::Moving:
|
||||||
|
_movingEntities.removeAll(entity);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch (newState) {
|
||||||
|
case EntityItem::Changing:
|
||||||
|
_changingEntities.push_back(entity);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EntityItem::Moving:
|
||||||
|
_movingEntities.push_back(entity);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EntityTree::update() {
|
void EntityTree::update() {
|
||||||
// XXXBHG: replace storeEntity with new API!!
|
|
||||||
//qDebug() << "EntityTree::update().... NOT YET IMPLEMENTED!!!";
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
#if 0 //////////////////////////////////////////////////////
|
//
|
||||||
|
// NEW CODE!!!!
|
||||||
|
//
|
||||||
|
// our new strategy should be to segregate entities into three classes:
|
||||||
|
// 1) stationary things that are not changing - most models
|
||||||
|
// 2) stationary things that are animating - they can be touched linearly and they don't change the tree
|
||||||
|
// 3) moving things - these need to scan the tree and update accordingly
|
||||||
|
|
||||||
lockForWrite();
|
lockForWrite();
|
||||||
_isDirty = true;
|
quint64 now = usecTimestampNow();
|
||||||
|
|
||||||
// TODO: could we manage this by iterating the known entities map/hash? Would that be faster?
|
//_movingEntities; // entities that are moving as part of update
|
||||||
EntityTreeUpdateArgs args;
|
//_changingEntities; // entities that are changing (like animating), but not moving
|
||||||
recurseTreeWithOperation(updateOperation, &args);
|
|
||||||
|
|
||||||
// now add back any of the particles that moved elements....
|
|
||||||
int movingEntities = args._movingEntities.size();
|
|
||||||
|
|
||||||
for (int i = 0; i < movingEntities; i++) {
|
for (int i = 0; i < _changingEntities.size(); i++) {
|
||||||
|
EntityItem* thisEntity = _changingEntities[i];
|
||||||
bool shouldDie = args._movingEntities[i]->getShouldBeDeleted();
|
thisEntity->update(now);
|
||||||
|
|
||||||
// if the particle is still inside our total bounds, then re-add it
|
|
||||||
AACube treeBounds = getRoot()->getAACube();
|
|
||||||
|
|
||||||
if (!shouldDie && treeBounds.contains(args._movingEntities[i]->getPosition())) {
|
|
||||||
storeEntity(*args._movingEntities[i]);
|
|
||||||
} else {
|
|
||||||
uint32_t entityItemID = args._movingEntities[i]->getID();
|
|
||||||
quint64 deletedAt = usecTimestampNow();
|
|
||||||
_recentlyDeletedEntitiesLock.lockForWrite();
|
|
||||||
_recentlyDeletedEntityItemIDs.insert(deletedAt, entityItemID);
|
|
||||||
_recentlyDeletedEntitiesLock.unlock();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // 0 //////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// prune the tree...
|
|
||||||
/*
|
|
||||||
lockForWrite();
|
|
||||||
qDebug() << "pruning tree";
|
|
||||||
recurseTreeWithOperation(pruneOperation, NULL);
|
|
||||||
unlock();
|
unlock();
|
||||||
*/
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// OLD CODE!!!!
|
||||||
|
//
|
||||||
|
// The old update code scanned the entire tree... this is very expensive, since not all entities are getting simulated
|
||||||
|
//
|
||||||
|
// // XXXBHG: replace storeEntity with new API!!
|
||||||
|
// //qDebug() << "EntityTree::update().... NOT YET IMPLEMENTED!!!";
|
||||||
|
// #if 0 //////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// lockForWrite();
|
||||||
|
// _isDirty = true;
|
||||||
|
//
|
||||||
|
// // TODO: could we manage this by iterating the known entities map/hash? Would that be faster?
|
||||||
|
// EntityTreeUpdateArgs args;
|
||||||
|
// recurseTreeWithOperation(updateOperation, &args);
|
||||||
|
//
|
||||||
|
// // now add back any of the particles that moved elements....
|
||||||
|
// int movingEntities = args._movingEntities.size();
|
||||||
|
//
|
||||||
|
// for (int i = 0; i < movingEntities; i++) {
|
||||||
|
//
|
||||||
|
// bool shouldDie = args._movingEntities[i]->getShouldBeDeleted();
|
||||||
|
//
|
||||||
|
// // if the particle is still inside our total bounds, then re-add it
|
||||||
|
// AACube treeBounds = getRoot()->getAACube();
|
||||||
|
//
|
||||||
|
// if (!shouldDie && treeBounds.contains(args._movingEntities[i]->getPosition())) {
|
||||||
|
// storeEntity(*args._movingEntities[i]);
|
||||||
|
// } else {
|
||||||
|
// uint32_t entityItemID = args._movingEntities[i]->getID();
|
||||||
|
// quint64 deletedAt = usecTimestampNow();
|
||||||
|
// _recentlyDeletedEntitiesLock.lockForWrite();
|
||||||
|
// _recentlyDeletedEntityItemIDs.insert(deletedAt, entityItemID);
|
||||||
|
// _recentlyDeletedEntitiesLock.unlock();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// #endif // 0 //////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// // prune the tree...
|
||||||
|
// /*
|
||||||
|
// lockForWrite();
|
||||||
|
//qDebug() << "pruning tree";
|
||||||
|
// recurseTreeWithOperation(pruneOperation, NULL);
|
||||||
|
// unlock();
|
||||||
|
// */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -112,9 +112,10 @@ public:
|
||||||
|
|
||||||
void rememberDirtyCube(const AACube& cube);
|
void rememberDirtyCube(const AACube& cube);
|
||||||
void rememberEntityToMove(const EntityItem* entity);
|
void rememberEntityToMove(const EntityItem* entity);
|
||||||
|
|
||||||
void sendEntities(EntityEditPacketSender* packetSender, float x, float y, float z);
|
void sendEntities(EntityEditPacketSender* packetSender, float x, float y, float z);
|
||||||
|
|
||||||
|
void changeEntityState(EntityItem* const entity, EntityItem::SimuationState oldState, EntityItem::SimuationState newState);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static bool updateOperation(OctreeElement* element, void* extraData);
|
static bool updateOperation(OctreeElement* element, void* extraData);
|
||||||
|
@ -139,6 +140,10 @@ private:
|
||||||
EntityItemFBXService* _fbxService;
|
EntityItemFBXService* _fbxService;
|
||||||
|
|
||||||
QHash<EntityItemID, EntityTreeElement*> _entityToElementMap;
|
QHash<EntityItemID, EntityTreeElement*> _entityToElementMap;
|
||||||
|
|
||||||
|
|
||||||
|
QList<EntityItem*> _movingEntities; // entities that are moving as part of update
|
||||||
|
QList<EntityItem*> _changingEntities; // entities that are changing (like animating), but not moving
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_EntityTree_h
|
#endif // hifi_EntityTree_h
|
||||||
|
|
|
@ -620,7 +620,10 @@ int EntityTreeElement::readElementDataFromBuffer(const unsigned char* data, int
|
||||||
// qDebug() << "EXISTING ENTITY CASE!!!!!!!!!!!!!! CONTAINING ELEMENT MISMATCH!!";
|
// qDebug() << "EXISTING ENTITY CASE!!!!!!!!!!!!!! CONTAINING ELEMENT MISMATCH!!";
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
EntityItem::SimuationState oldState = entityItem->getSimulationState();
|
||||||
bytesForThisEntity = entityItem->readEntityDataFromBuffer(dataAt, bytesLeftToRead, args);
|
bytesForThisEntity = entityItem->readEntityDataFromBuffer(dataAt, bytesLeftToRead, args);
|
||||||
|
EntityItem::SimuationState newState = entityItem->getSimulationState();
|
||||||
|
_myTree->changeEntityState(entityItem, oldState, newState);
|
||||||
|
|
||||||
bool bestFitAfter = bestFitEntityBounds(entityItem);
|
bool bestFitAfter = bestFitEntityBounds(entityItem);
|
||||||
|
|
||||||
|
@ -651,9 +654,7 @@ int EntityTreeElement::readElementDataFromBuffer(const unsigned char* data, int
|
||||||
|
|
||||||
if (entityItem) {
|
if (entityItem) {
|
||||||
bytesForThisEntity = entityItem->readEntityDataFromBuffer(dataAt, bytesLeftToRead, args);
|
bytesForThisEntity = entityItem->readEntityDataFromBuffer(dataAt, bytesLeftToRead, args);
|
||||||
//qDebug() << "NEW ENTITY CASE!!!!!!!!!!!!!! EntityTreeElement::readElementDataFromBuffer() BEFORE addEntityItem(entity); element=" << this << "entity=" << entityItem << "id=" << entityItem->getEntityItemID() << "bestFit=" << bestFitEntityBounds(entityItem);
|
|
||||||
addEntityItem(entityItem); // add this new entity to this elements entities
|
addEntityItem(entityItem); // add this new entity to this elements entities
|
||||||
//qDebug() << "NEW ENTITY CASE!!!!!!!!!!!!!! EntityTreeElement::readElementDataFromBuffer() AFTER addEntityItem(entity); element=" << this << "entity=" << entityItem << "id=" << entityItem->getEntityItemID() << "bestFit=" << bestFitEntityBounds(entityItem);
|
|
||||||
_myTree->setContainingElement(entityItem->getEntityItemID(), this);
|
_myTree->setContainingElement(entityItem->getEntityItemID(), this);
|
||||||
newEntity = true;
|
newEntity = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include "BoxEntityItem.h"
|
#include "BoxEntityItem.h"
|
||||||
#include "ModelEntityItem.h"
|
#include "ModelEntityItem.h"
|
||||||
|
|
||||||
QMap<EntityTypes::EntityType_t, QString> EntityTypes::_typeToNameMap;
|
QMap<EntityTypes::EntityType, QString> EntityTypes::_typeToNameMap;
|
||||||
QMap<QString, EntityTypes::EntityType_t> EntityTypes::_nameToTypeMap;
|
QMap<QString, EntityTypes::EntityType> EntityTypes::_nameToTypeMap;
|
||||||
EntityTypeFactory EntityTypes::_factories[EntityTypes::LAST];
|
EntityTypeFactory EntityTypes::_factories[EntityTypes::LAST];
|
||||||
bool EntityTypes::_factoriesInitialized = false;
|
bool EntityTypes::_factoriesInitialized = false;
|
||||||
EntityTypeRenderer EntityTypes::_renderers[EntityTypes::LAST];
|
EntityTypeRenderer EntityTypes::_renderers[EntityTypes::LAST];
|
||||||
|
@ -39,23 +39,23 @@ REGISTER_ENTITY_TYPE(Cylinder)
|
||||||
REGISTER_ENTITY_TYPE(Pyramid)
|
REGISTER_ENTITY_TYPE(Pyramid)
|
||||||
|
|
||||||
|
|
||||||
const QString& EntityTypes::getEntityTypeName(EntityType_t entityType) {
|
const QString& EntityTypes::getEntityTypeName(EntityType entityType) {
|
||||||
QMap<EntityType_t, QString>::iterator matchedTypeName = _typeToNameMap.find(entityType);
|
QMap<EntityType, QString>::iterator matchedTypeName = _typeToNameMap.find(entityType);
|
||||||
if (matchedTypeName != _typeToNameMap.end()) {
|
if (matchedTypeName != _typeToNameMap.end()) {
|
||||||
return matchedTypeName.value();
|
return matchedTypeName.value();
|
||||||
}
|
}
|
||||||
return ENTITY_TYPE_NAME_UNKNOWN;
|
return ENTITY_TYPE_NAME_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityTypes::EntityType_t EntityTypes::getEntityTypeFromName(const QString& name) {
|
EntityTypes::EntityType EntityTypes::getEntityTypeFromName(const QString& name) {
|
||||||
QMap<QString, EntityTypes::EntityType_t>::iterator matchedTypeName = _nameToTypeMap.find(name);
|
QMap<QString, EntityTypes::EntityType>::iterator matchedTypeName = _nameToTypeMap.find(name);
|
||||||
if (matchedTypeName != _nameToTypeMap.end()) {
|
if (matchedTypeName != _nameToTypeMap.end()) {
|
||||||
return matchedTypeName.value();
|
return matchedTypeName.value();
|
||||||
}
|
}
|
||||||
return Unknown;
|
return Unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EntityTypes::registerEntityType(EntityType_t entityType, const char* name, EntityTypeFactory factoryMethod) {
|
bool EntityTypes::registerEntityType(EntityType entityType, const char* name, EntityTypeFactory factoryMethod) {
|
||||||
qDebug() << "EntityTypes::registerEntityType()";
|
qDebug() << "EntityTypes::registerEntityType()";
|
||||||
qDebug() << " entityType=" << entityType;
|
qDebug() << " entityType=" << entityType;
|
||||||
qDebug() << " name=" << name;
|
qDebug() << " name=" << name;
|
||||||
|
@ -71,8 +71,8 @@ bool EntityTypes::registerEntityType(EntityType_t entityType, const char* name,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityItem* EntityTypes::constructEntityItem(EntityType_t entityType, const EntityItemID& entityID, const EntityItemProperties& properties) {
|
EntityItem* EntityTypes::constructEntityItem(EntityType entityType, const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||||
qDebug() << "EntityTypes::constructEntityItem(EntityType_t entityType, const EntityItemID& entityID, const EntityItemProperties& properties)";
|
qDebug() << "EntityTypes::constructEntityItem(EntityType entityType, const EntityItemID& entityID, const EntityItemProperties& properties)";
|
||||||
qDebug() << " entityType=" << entityType;
|
qDebug() << " entityType=" << entityType;
|
||||||
qDebug() << " entityID=" << entityID;
|
qDebug() << " entityID=" << entityID;
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ qDebug() << "EntityTypes::constructEntityItem(data, bytesToRead).... NEW BITSTRE
|
||||||
encodedType = typeCoder; // determine true length
|
encodedType = typeCoder; // determine true length
|
||||||
bytesRead += encodedType.size();
|
bytesRead += encodedType.size();
|
||||||
quint32 type = typeCoder;
|
quint32 type = typeCoder;
|
||||||
EntityTypes::EntityType_t entityType = (EntityTypes::EntityType_t)type;
|
EntityTypes::EntityType entityType = (EntityTypes::EntityType)type;
|
||||||
|
|
||||||
EntityItemID tempEntityID(actualID);
|
EntityItemID tempEntityID(actualID);
|
||||||
EntityItemProperties tempProperties;
|
EntityItemProperties tempProperties;
|
||||||
|
@ -224,7 +224,7 @@ qDebug() << "EntityItem::decodeEntityEditPacket() ... lastEdited=" << lastEdited
|
||||||
QByteArray encodedType((const char*)dataAt, (bytesToRead - processedBytes));
|
QByteArray encodedType((const char*)dataAt, (bytesToRead - processedBytes));
|
||||||
ByteCountCoded<quint32> typeCoder = encodedType;
|
ByteCountCoded<quint32> typeCoder = encodedType;
|
||||||
quint32 entityTypeCode = typeCoder;
|
quint32 entityTypeCode = typeCoder;
|
||||||
properties.setType((EntityTypes::EntityType_t)entityTypeCode);
|
properties.setType((EntityTypes::EntityType)entityTypeCode);
|
||||||
encodedType = typeCoder; // determine true bytesToRead
|
encodedType = typeCoder; // determine true bytesToRead
|
||||||
dataAt += encodedType.size();
|
dataAt += encodedType.size();
|
||||||
processedBytes += encodedType.size();
|
processedBytes += encodedType.size();
|
||||||
|
@ -377,7 +377,7 @@ qDebug() << "EntityItem::decodeEntityEditPacket() ... lastEdited=" << lastEdited
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EntityTypes::registerEntityTypeRenderer(EntityType_t entityType, EntityTypeRenderer renderMethod) {
|
bool EntityTypes::registerEntityTypeRenderer(EntityType entityType, EntityTypeRenderer renderMethod) {
|
||||||
qDebug() << "EntityTypes::registerEntityTypeRenderer()";
|
qDebug() << "EntityTypes::registerEntityTypeRenderer()";
|
||||||
qDebug() << " entityType=" << entityType;
|
qDebug() << " entityType=" << entityType;
|
||||||
qDebug() << " renderMethod=" << (void*)renderMethod;
|
qDebug() << " renderMethod=" << (void*)renderMethod;
|
||||||
|
@ -392,7 +392,7 @@ bool EntityTypes::registerEntityTypeRenderer(EntityType_t entityType, EntityType
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityTypes::renderEntityItem(EntityItem* entityItem, RenderArgs* args) {
|
void EntityTypes::renderEntityItem(EntityItem* entityItem, RenderArgs* args) {
|
||||||
EntityType_t entityType = entityItem->getType();
|
EntityType entityType = entityItem->getType();
|
||||||
EntityTypeRenderer renderMethod = _renderers[entityType];
|
EntityTypeRenderer renderMethod = _renderers[entityType];
|
||||||
if (renderMethod) {
|
if (renderMethod) {
|
||||||
renderMethod(entityItem, args);
|
renderMethod(entityItem, args);
|
||||||
|
|
|
@ -29,7 +29,7 @@ typedef void (*EntityTypeRenderer)(EntityItem* entity, RenderArgs* args);
|
||||||
|
|
||||||
class EntityTypes {
|
class EntityTypes {
|
||||||
public:
|
public:
|
||||||
typedef enum EntityType {
|
typedef enum EntityType_t {
|
||||||
Unknown,
|
Unknown,
|
||||||
Model,
|
Model,
|
||||||
Box,
|
Box,
|
||||||
|
@ -38,22 +38,22 @@ public:
|
||||||
Cylinder,
|
Cylinder,
|
||||||
Pyramid,
|
Pyramid,
|
||||||
LAST = Pyramid
|
LAST = Pyramid
|
||||||
} EntityType_t;
|
} EntityType;
|
||||||
|
|
||||||
static const QString& getEntityTypeName(EntityType_t entityType);
|
static const QString& getEntityTypeName(EntityType entityType);
|
||||||
static EntityTypes::EntityType_t getEntityTypeFromName(const QString& name);
|
static EntityTypes::EntityType getEntityTypeFromName(const QString& name);
|
||||||
static bool registerEntityType(EntityType_t entityType, const char* name, EntityTypeFactory factoryMethod);
|
static bool registerEntityType(EntityType entityType, const char* name, EntityTypeFactory factoryMethod);
|
||||||
static EntityItem* constructEntityItem(EntityType_t entityType, const EntityItemID& entityID, const EntityItemProperties& properties);
|
static EntityItem* constructEntityItem(EntityType entityType, const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||||
static EntityItem* constructEntityItem(const unsigned char* data, int bytesToRead, ReadBitstreamToTreeParams& args);
|
static EntityItem* constructEntityItem(const unsigned char* data, int bytesToRead, ReadBitstreamToTreeParams& args);
|
||||||
static bool decodeEntityEditPacket(const unsigned char* data, int bytesToRead, int& processedBytes,
|
static bool decodeEntityEditPacket(const unsigned char* data, int bytesToRead, int& processedBytes,
|
||||||
EntityItemID& entityID, EntityItemProperties& properties);
|
EntityItemID& entityID, EntityItemProperties& properties);
|
||||||
|
|
||||||
static bool registerEntityTypeRenderer(EntityType_t entityType, EntityTypeRenderer renderMethod);
|
static bool registerEntityTypeRenderer(EntityType entityType, EntityTypeRenderer renderMethod);
|
||||||
static void renderEntityItem(EntityItem* entityItem, RenderArgs* args);
|
static void renderEntityItem(EntityItem* entityItem, RenderArgs* args);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static QMap<EntityType_t, QString> _typeToNameMap;
|
static QMap<EntityType, QString> _typeToNameMap;
|
||||||
static QMap<QString, EntityTypes::EntityType_t> _nameToTypeMap;
|
static QMap<QString, EntityTypes::EntityType> _nameToTypeMap;
|
||||||
static EntityTypeFactory _factories[LAST];
|
static EntityTypeFactory _factories[LAST];
|
||||||
static bool _factoriesInitialized;
|
static bool _factoriesInitialized;
|
||||||
static EntityTypeRenderer _renderers[LAST];
|
static EntityTypeRenderer _renderers[LAST];
|
||||||
|
|
|
@ -33,7 +33,6 @@ ModelEntityItem::ModelEntityItem(const EntityItemID& entityItemID, const EntityI
|
||||||
qDebug() << "ModelEntityItem::ModelEntityItem() calling setProperties()";
|
qDebug() << "ModelEntityItem::ModelEntityItem() calling setProperties()";
|
||||||
setProperties(properties);
|
setProperties(properties);
|
||||||
qDebug() << "ModelEntityItem::ModelEntityItem() getModelURL()=" << getModelURL();
|
qDebug() << "ModelEntityItem::ModelEntityItem() getModelURL()=" << getModelURL();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityItemProperties ModelEntityItem::getProperties() const {
|
EntityItemProperties ModelEntityItem::getProperties() const {
|
||||||
|
@ -165,7 +164,7 @@ qDebug() << "ModelEntityItem::readEntityDataFromBuffer()... <<<<<<<<<<<<<<<< <<
|
||||||
dataAt += encodedType.size();
|
dataAt += encodedType.size();
|
||||||
bytesRead += encodedType.size();
|
bytesRead += encodedType.size();
|
||||||
quint32 type = typeCoder;
|
quint32 type = typeCoder;
|
||||||
_type = (EntityTypes::EntityType_t)type;
|
_type = (EntityTypes::EntityType)type;
|
||||||
|
|
||||||
// XXXBHG: is this a good place to handle the last edited time client vs server??
|
// XXXBHG: is this a good place to handle the last edited time client vs server??
|
||||||
|
|
||||||
|
@ -853,3 +852,47 @@ QVector<glm::quat> ModelEntityItem::getAnimationFrame() {
|
||||||
}
|
}
|
||||||
return frameData;
|
return frameData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ModelEntityItem::isAnimatingSomething() const {
|
||||||
|
return getAnimationIsPlaying() &&
|
||||||
|
getAnimationFPS() != 0.0f &&
|
||||||
|
!getAnimationURL().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
EntityItem::SimuationState ModelEntityItem::getSimulationState() const {
|
||||||
|
if (isAnimatingSomething()) {
|
||||||
|
return EntityItem::Changing;
|
||||||
|
}
|
||||||
|
return EntityItem::Static;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModelEntityItem::update(const quint64& updateTime) {
|
||||||
|
_lastUpdated = updateTime;
|
||||||
|
//setShouldBeDeleted(getShouldBeDeleted());
|
||||||
|
|
||||||
|
quint64 now = updateTime; //usecTimestampNow();
|
||||||
|
|
||||||
|
// only advance the frame index if we're playing
|
||||||
|
if (getAnimationIsPlaying()) {
|
||||||
|
|
||||||
|
float deltaTime = (float)(now - _lastAnimated) / (float)USECS_PER_SECOND;
|
||||||
|
|
||||||
|
const bool wantDebugging = false;
|
||||||
|
if (wantDebugging) {
|
||||||
|
qDebug() << "EntityItem::update() now=" << now;
|
||||||
|
qDebug() << " updateTime=" << updateTime;
|
||||||
|
qDebug() << " _lastAnimated=" << _lastAnimated;
|
||||||
|
qDebug() << " deltaTime=" << deltaTime;
|
||||||
|
}
|
||||||
|
_lastAnimated = now;
|
||||||
|
_animationFrameIndex += deltaTime * _animationFPS;
|
||||||
|
|
||||||
|
if (wantDebugging) {
|
||||||
|
qDebug() << " _animationFrameIndex=" << _animationFrameIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
_lastAnimated = now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,9 @@ public:
|
||||||
|
|
||||||
virtual int readEntityDataFromBuffer(const unsigned char* data, int bytesLeftToRead, ReadBitstreamToTreeParams& args);
|
virtual int readEntityDataFromBuffer(const unsigned char* data, int bytesLeftToRead, ReadBitstreamToTreeParams& args);
|
||||||
|
|
||||||
/// For reading models from pre V3 bitstreams
|
virtual void update(const quint64& now);
|
||||||
int oldVersionReadEntityDataFromBuffer(const unsigned char* data, int bytesLeftToRead, ReadBitstreamToTreeParams& args);
|
virtual SimuationState getSimulationState() const;
|
||||||
|
|
||||||
|
|
||||||
// TODO: Move these to subclasses, or other appropriate abstraction
|
// TODO: Move these to subclasses, or other appropriate abstraction
|
||||||
// getters/setters applicable to models and particles
|
// getters/setters applicable to models and particles
|
||||||
|
@ -73,6 +74,10 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
/// For reading models from pre V3 bitstreams
|
||||||
|
int oldVersionReadEntityDataFromBuffer(const unsigned char* data, int bytesLeftToRead, ReadBitstreamToTreeParams& args);
|
||||||
|
bool isAnimatingSomething() const;
|
||||||
|
|
||||||
rgbColor _color;
|
rgbColor _color;
|
||||||
QString _modelURL;
|
QString _modelURL;
|
||||||
QVector<SittingPoint> _sittingPoints;
|
QVector<SittingPoint> _sittingPoints;
|
||||||
|
|
|
@ -4,15 +4,14 @@ Base properties...
|
||||||
* size/radius/bounds?? maybe correct is x,y,z scales
|
* size/radius/bounds?? maybe correct is x,y,z scales
|
||||||
* rotation
|
* rotation
|
||||||
* script
|
* script
|
||||||
|
|
||||||
should these be included for all entities? Light, Models, planes, etc?
|
|
||||||
* velocity
|
* velocity
|
||||||
* gravity
|
* gravity
|
||||||
* damping
|
* damping
|
||||||
|
* glow level
|
||||||
|
|
||||||
|
should these be included for all entities? Light, Models, planes, etc?
|
||||||
* rotational velocity? - wouldn't that be cool to be automatic with no edits
|
* rotational velocity? - wouldn't that be cool to be automatic with no edits
|
||||||
* rotational damping?? - can you slow a quat rotation by simply multiplying it by a fraction?
|
* rotational damping?? - can you slow a quat rotation by simply multiplying it by a fraction?
|
||||||
* glow level???
|
|
||||||
|
|
||||||
* color??
|
* color??
|
||||||
|
|
||||||
Primitive Object Properties:
|
Primitive Object Properties:
|
||||||
|
@ -26,7 +25,6 @@ Model properties:
|
||||||
void setAnimationFrameIndex(float value)
|
void setAnimationFrameIndex(float value)
|
||||||
void setAnimationIsPlaying(bool value)
|
void setAnimationIsPlaying(bool value)
|
||||||
void setAnimationFPS(float value)
|
void setAnimationFPS(float value)
|
||||||
void setGlowLevel(float glowLevel)
|
|
||||||
void setSittingPoints(QVector<SittingPoint> sittingPoints) ??? - should this just be a string property???
|
void setSittingPoints(QVector<SittingPoint> sittingPoints) ??? - should this just be a string property???
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,9 +33,6 @@ Model properties:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Things to do with entities...
|
// Things to do with entities...
|
||||||
//
|
//
|
||||||
// REQUIRED TO DO:
|
// REQUIRED TO DO:
|
||||||
|
@ -56,6 +51,9 @@ Model properties:
|
||||||
|
|
||||||
F) TODO: do we need to handle "killing" viewed entities as well???
|
F) TODO: do we need to handle "killing" viewed entities as well???
|
||||||
void EntityTreeElement::updateEntityItemID(const EntityItemID& creatorTokenEntityID, const EntityItemID& knownIDEntityID)...
|
void EntityTreeElement::updateEntityItemID(const EntityItemID& creatorTokenEntityID, const EntityItemID& knownIDEntityID)...
|
||||||
|
13) support sitpoints
|
||||||
|
|
||||||
|
K) verify shadows work
|
||||||
|
|
||||||
|
|
||||||
// NICE TO DO:
|
// NICE TO DO:
|
||||||
|
@ -132,7 +130,7 @@ Model properties:
|
||||||
// 12a) make sure server is deleting items??
|
// 12a) make sure server is deleting items??
|
||||||
// 12b) Use the delete message instead of shouldDelete property
|
// 12b) Use the delete message instead of shouldDelete property
|
||||||
|
|
||||||
// 13) add user properties (support sitpoints)
|
// 13b) add user properties
|
||||||
// 14) implement "Light" entity, "Fire" entity?
|
// 14) implement "Light" entity, "Fire" entity?
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,44 +175,6 @@ Model properties:
|
||||||
// SOLVED - 9) problem here... looks like the client got confused and sent us an unknown edit packet with a creator token id we already had...
|
// SOLVED - 9) problem here... looks like the client got confused and sent us an unknown edit packet with a creator token id we already had...
|
||||||
// we probably can't keep the creator tokens in our server tree or else we'll collide between multiple editors!!
|
// we probably can't keep the creator tokens in our server tree or else we'll collide between multiple editors!!
|
||||||
// -- fixed this by only storing assigned IDs in the server's ID base
|
// -- fixed this by only storing assigned IDs in the server's ID base
|
||||||
//
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] setContainingElement() entityItemID= [ id: 0 , creatorTokenID: 0 , isKnownID: true ] element= 0x7ff7b8702c50
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] EntityTree::debugDumpMap() --------------------------
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] [ id: 0 , creatorTokenID: 0 , isKnownID: true ] : 0x7ff7b8702c50
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] -----------------------------------------------------
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] AddEntityOperator calling setContainingElement... new entityID= [ id: 0 , creatorTokenID: 0 , isKnownID: true ]
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] EntityTree::debugDumpMap() --------------------------
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] [ id: 0 , creatorTokenID: 0 , isKnownID: true ] : 0x7ff7b8702c50
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] -----------------------------------------------------
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] AFTER... about to call recurseTreeWithOperator(AddEntityOperator)...
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] EntityTree::debugDumpMap() --------------------------
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] [ id: 0 , creatorTokenID: 0 , isKnownID: true ] : 0x7ff7b8702c50
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] -----------------------------------------------------
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] EntityServer::entityCreated() newEntity.getEntityItemID()= [ id: 0 , creatorTokenID: 0 , isKnownID: true ]
|
|
||||||
// [DEBUG] [2014-07-28 21:22:07 -0700] [41087:24258] [entity-server] EntityServer::entityCreated() writeDatagram()
|
|
||||||
// [DEBUG] [2014-07-28 21:22:10 -0700] [41087:24258] [entity-server] Killed "Agent" (I) {79efcb8c-614c-42f4-abb9-72d096603c85} 50.132.90.94:51973 / 192.168.1.152:51973
|
|
||||||
// [DEBUG] [2014-07-28 21:22:10 -0700] [41087:24258] [entity-server] Entity server killed node: "Agent" (I) {79efcb8c-614c-42f4-abb9-72d096603c85} 50.132.90.94:51973 / 192.168.1.152:51973
|
|
||||||
// [DEBUG] [2014-07-28 21:22:10 -0700] [41087:24258] [entity-server] Added "Agent" (I) {79efcb8c-614c-42f4-abb9-72d096603c85} 50.132.90.94:51973 / 192.168.1.152:51973
|
|
||||||
// [DEBUG] [2014-07-28 21:22:10 -0700] [41087:24258] [entity-server] Entity server added node: "Agent" (I) {79efcb8c-614c-42f4-abb9-72d096603c85} 50.132.90.94:51973 / 192.168.1.152:51973
|
|
||||||
// [DEBUG] [2014-07-28 21:22:10 -0700] [41087:24258] [entity-server] Entity server [ EntityServer(0x7ff7bc000000) ]: client disconnected - ending sending thread [ OctreeSendThread(0x7ff7b9006e00) ]
|
|
||||||
// [DEBUG] [2014-07-28 21:22:14 -0700] [41087:24258] [entity-server] Killed "Agent" (I) {79efcb8c-614c-42f4-abb9-72d096603c85} 50.132.90.94:51973 / 192.168.1.152:51973
|
|
||||||
// [DEBUG] [2014-07-28 21:22:14 -0700] [41087:24258] [entity-server] Entity server killed node: "Agent" (I) {79efcb8c-614c-42f4-abb9-72d096603c85} 50.132.90.94:51973 / 192.168.1.152:51973
|
|
||||||
// [DEBUG] [2014-07-28 21:22:14 -0700] [41087:24258] [entity-server] Entity server node missing linked data node: "Agent" (I) {79efcb8c-614c-42f4-abb9-72d096603c85} 50.132.90.94:51973 / 192.168.1.152:51973
|
|
||||||
// [DEBUG] [2014-07-28 21:22:32 -0700] [41087:24258] [entity-server] saving Octrees to file "resources/models.svo" ...
|
|
||||||
// [DEBUG] [2014-07-28 21:22:32 -0700] [41087:24258] [entity-server] DONE saving Octrees to file...
|
|
||||||
// [DEBUG] [2014-07-28 21:23:59 -0700] [41087:24258] [entity-server] Packet of type 3 received from unknown node with UUID QUuid("{12a522ec-7476-4d68-8e31-da39eb4a18b2}")
|
|
||||||
// [DEBUG] [2014-07-28 21:24:00 -0700] [41087:24258] [entity-server] Added "Agent" (I) {12a522ec-7476-4d68-8e31-da39eb4a18b2} 50.132.90.94:65198 / 192.168.1.152:65198
|
|
||||||
// [DEBUG] [2014-07-28 21:24:00 -0700] [41087:24258] [entity-server] Entity server added node: "Agent" (I) {12a522ec-7476-4d68-8e31-da39eb4a18b2} 50.132.90.94:65198 / 192.168.1.152:65198
|
|
||||||
// [DEBUG] [2014-07-28 21:24:00 -0700] [41087:24258] [entity-server] Activating local socket for node "Agent" (I) {12a522ec-7476-4d68-8e31-da39eb4a18b2} 50.132.90.94:65198 / 192.168.1.152:65198
|
|
||||||
// [DEBUG] [2014-07-28 21:24:02 -0700] [41087:24258] [entity-server] Entity server [ EntityServer(0x7ff7bc000000) ]: client connected - starting sending thread [ OctreeSendThread(0x7ff7bb000c00) ]
|
|
||||||
// [DEBUG] [2014-07-28 21:24:07 -0700] [41087:24258] [entity-server] EntityTree::processEditPacketData()....
|
|
||||||
// [DEBUG] [2014-07-28 21:24:07 -0700] [41087:24258] [entity-server] EntityTree::getContainingElement() entityItemID= [ id: 4294967295 , creatorTokenID: 0 , isKnownID: false ]
|
|
||||||
// [DEBUG] [2014-07-28 21:24:07 -0700] [41087:24258] [entity-server] EntityTree::debugDumpMap() --------------------------
|
|
||||||
// [DEBUG] [2014-07-28 21:24:07 -0700] [41087:24258] [entity-server] [ id: 0 , creatorTokenID: 0 , isKnownID: true ] : 0x7ff7b8702c50
|
|
||||||
// [DEBUG] [2014-07-28 21:24:07 -0700] [41087:24258] [entity-server] -----------------------------------------------------
|
|
||||||
// Assertion failed: (!getContainingElement(entityItemID)), function assignEntityID, file /Users/zappoman/Development/HiFi/hifi/libraries/entities/src/EntityTree.cpp, line 958.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// SOLVED - 15) fix all places where "Voxels" turns off some features of models/entities
|
// SOLVED - 15) fix all places where "Voxels" turns off some features of models/entities
|
||||||
// SOLVED - 16) duplicate copies of entity references in the elements... this appears to be caused when "viewing" while editing...
|
// SOLVED - 16) duplicate copies of entity references in the elements... this appears to be caused when "viewing" while editing...
|
||||||
// SOLVED - 17) Handle the newer on client vs changed on server problem properly for entities
|
// SOLVED - 17) Handle the newer on client vs changed on server problem properly for entities
|
||||||
|
|
Loading…
Reference in a new issue