add orb code added to otheravatar.cpp

This commit is contained in:
Angus Antley 2018-06-26 06:38:09 +01:00
parent b8dea4b869
commit 232dc21c7b

View file

@ -7,6 +7,7 @@
//
#include "OtherAvatar.h"
#include "../../interface/src/Application.h"
OtherAvatar::OtherAvatar(QThread* thread) : Avatar(thread) {
// give the pointer to our head to inherited _headData variable from AvatarData
@ -16,4 +17,23 @@ OtherAvatar::OtherAvatar(QThread* thread) : Avatar(thread) {
connect(_skeletonModel.get(), &Model::setURLFinished, this, &Avatar::setModelURLFinished);
connect(_skeletonModel.get(), &Model::rigReady, this, &Avatar::rigReady);
connect(_skeletonModel.get(), &Model::rigReset, this, &Avatar::rigReset);
//add the purple orb
if (_purpleOrbMeshPlaceholderID == UNKNOWN_OVERLAY_ID || !qApp->getOverlays().isAddedOverlay(_purpleOrbMeshPlaceholderID)) {
_purpleOrbMeshPlaceholder = std::make_shared<Sphere3DOverlay>();
_purpleOrbMeshPlaceholder->setAlpha(1.0f);
_purpleOrbMeshPlaceholder->setColor({ 0xFF, 0x00, 0xFF });
_purpleOrbMeshPlaceholder->setIsSolid(false);
_purpleOrbMeshPlaceholder->setPulseMin(0.5);
_purpleOrbMeshPlaceholder->setPulseMax(1.0);
_purpleOrbMeshPlaceholder->setColorPulse(1.0);
_purpleOrbMeshPlaceholder->setIgnoreRayIntersection(true);
_purpleOrbMeshPlaceholder->setDrawInFront(false);
_purpleOrbMeshPlaceholderID = qApp->getOverlays().addOverlay(_purpleOrbMeshPlaceholder);
// Position focus
_purpleOrbMeshPlaceholder->setWorldOrientation(glm::quat(0.0f, 0.0f, 0.0f, 1.0));
_purpleOrbMeshPlaceholder->setWorldPosition(glm::vec3(476.0f, 500.0f, 493.0f));
_purpleOrbMeshPlaceholder->setDimensions(glm::vec3(0.5f, 0.5f, 0.5f));
_purpleOrbMeshPlaceholder->setVisible(true);
}
}