added some debugging for referentials

This commit is contained in:
ZappoMan 2014-08-25 14:48:08 -07:00
parent 1764839223
commit d6873f7b6c
5 changed files with 22 additions and 10 deletions

View file

@ -76,11 +76,13 @@ void ModelReferential::update() {
}
if (item->getRotation() != _refRotation) {
_refRotation = item->getRotation();
qDebug() << "ModelReferential::update() _refRotation=" << _refRotation;
_avatar->setOrientation(_refRotation * _rotation, true);
somethingChanged = true;
}
if (item->getPosition() != _refPosition || somethingChanged) {
_refPosition = item->getPosition();
qDebug() << "ModelReferential::update() _refPosition=" << _refPosition << " QThread::currentThread()=" << QThread::currentThread();
_avatar->setPosition(_refPosition * (float)TREE_SCALE + _refRotation * (_translation * _refScale), true);
}
}

View file

@ -383,6 +383,10 @@ void MyAvatar::render(const glm::vec3& cameraPosition, RenderMode renderMode) {
return; // exit early
}
if (renderMode != SHADOW_RENDER_MODE) {
qDebug() << "MyAvatar::render() position=" << getPosition() / (float)TREE_SCALE << " QThread::currentThread()=" << QThread::currentThread();
}
Avatar::render(cameraPosition, renderMode);
// don't display IK constraints in shadow mode

View file

@ -57,6 +57,7 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
bool drawAsModel = hasModel();
glm::vec3 position = getPosition() * (float)TREE_SCALE;
qDebug() << "RenderableModelEntityItem::render() _position=" << _position << "QThread::currentThread()=" << QThread::currentThread();
float radius = getRadius() * (float)TREE_SCALE;
float size = getSize() * (float)TREE_SCALE;

View file

@ -487,6 +487,7 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
bytesRead += sizeof(positionFromBuffer);
if (overwriteLocalData) {
_position = positionFromBuffer;
qDebug() << "EntityItem::readEntityDataFromBuffer() _position=" << _position << " QThread::currentThread()=" << QThread::currentThread();
}
}
@ -780,6 +781,7 @@ bool EntityItem::setProperties(const EntityItemProperties& properties, bool forc
bool somethingChanged = false;
if (properties._positionChanged || forceCopy) {
setPosition(properties._position / (float) TREE_SCALE);
qDebug() << "EntityItem::setProperties() _position=" << _position << " QThread::currentThread()=" << QThread::currentThread();
somethingChanged = true;
}

View file

@ -33,6 +33,19 @@ Model properties:
//
// REQUIRED TO DO:
7) Referentials -- basics are working... performance/jutter
For sitting points and referentials you can kill two birds with one stone.
Put this model in world: http://highfidelity-public.s3-us-west-1.amazonaws.com/ozan/theater.fst
Launch sit.js
See sitting points
Sit somewhere
Move model with another avatar.
Observe first avatar moving.
1) random crashes on moving (I think things going out of bounds???)
2) some jutter with moving entities
@ -57,16 +70,6 @@ Model properties:
DONE -- 22d) void ModelTree::findModelsInCube(const AACube& cube, QVector<ModelItem*>& foundModels)...
DONE -- 22e) void ModelTreeElement::getModelsInside(const AACube& box, QVector<ModelItem*>& foundModels)...
7) Referentials????
For sitting points and referentials you can kill two birds with one stone.
Put this model in world: http://highfidelity-public.s3-us-west-1.amazonaws.com/ozan/theater.fst
Launch sit.js
See sitting points
Sit somewhere
Move model with another avatar.
Observe first avatar moving.
8) verify shadows work
9) Handle the ID -> UUID swap in old files to new files