mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:17:58 +02:00
Merge pull request #6777 from AndrewMeadows/whitespace
nothing but whitespace
This commit is contained in:
commit
722fe46a27
13 changed files with 101 additions and 101 deletions
|
@ -349,7 +349,7 @@ bool setupEssentials(int& argc, char** argv) {
|
||||||
DependencyManager::set<WindowScriptingInterface>();
|
DependencyManager::set<WindowScriptingInterface>();
|
||||||
DependencyManager::set<HMDScriptingInterface>();
|
DependencyManager::set<HMDScriptingInterface>();
|
||||||
DependencyManager::set<ResourceScriptingInterface>();
|
DependencyManager::set<ResourceScriptingInterface>();
|
||||||
|
|
||||||
|
|
||||||
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
|
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
|
||||||
DependencyManager::set<SpeechRecognizer>();
|
DependencyManager::set<SpeechRecognizer>();
|
||||||
|
@ -380,7 +380,7 @@ PluginContainer* _pluginContainer;
|
||||||
|
|
||||||
|
|
||||||
// FIXME hack access to the internal share context for the Chromium helper
|
// FIXME hack access to the internal share context for the Chromium helper
|
||||||
// Normally we'd want to use QWebEngine::initialize(), but we can't because
|
// Normally we'd want to use QWebEngine::initialize(), but we can't because
|
||||||
// our primary context is a QGLWidget, which can't easily be initialized to share
|
// our primary context is a QGLWidget, which can't easily be initialized to share
|
||||||
// from a QOpenGLContext.
|
// from a QOpenGLContext.
|
||||||
//
|
//
|
||||||
|
@ -1037,7 +1037,7 @@ void Application::cleanupBeforeQuit() {
|
||||||
|
|
||||||
// destroy the AudioClient so it and its thread have a chance to go down safely
|
// destroy the AudioClient so it and its thread have a chance to go down safely
|
||||||
DependencyManager::destroy<AudioClient>();
|
DependencyManager::destroy<AudioClient>();
|
||||||
|
|
||||||
// destroy the AudioInjectorManager so it and its thread have a chance to go down safely
|
// destroy the AudioInjectorManager so it and its thread have a chance to go down safely
|
||||||
// this will also stop any ongoing network injectors
|
// this will also stop any ongoing network injectors
|
||||||
DependencyManager::destroy<AudioInjectorManager>();
|
DependencyManager::destroy<AudioInjectorManager>();
|
||||||
|
@ -1266,7 +1266,7 @@ void Application::initializeUi() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::paintGL() {
|
void Application::paintGL() {
|
||||||
// paintGL uses a queued connection, so we can get messages from the queue even after we've quit
|
// paintGL uses a queued connection, so we can get messages from the queue even after we've quit
|
||||||
// and the plugins have shutdown
|
// and the plugins have shutdown
|
||||||
if (_aboutToQuit) {
|
if (_aboutToQuit) {
|
||||||
return;
|
return;
|
||||||
|
@ -5085,7 +5085,7 @@ void Application::updateDisplayMode() {
|
||||||
foreach(auto displayPlugin, displayPlugins) {
|
foreach(auto displayPlugin, displayPlugins) {
|
||||||
addDisplayPluginToMenu(displayPlugin, first);
|
addDisplayPluginToMenu(displayPlugin, first);
|
||||||
// This must be a queued connection to avoid a deadlock
|
// This must be a queued connection to avoid a deadlock
|
||||||
QObject::connect(displayPlugin.get(), &DisplayPlugin::requestRender,
|
QObject::connect(displayPlugin.get(), &DisplayPlugin::requestRender,
|
||||||
this, &Application::paintGL, Qt::QueuedConnection);
|
this, &Application::paintGL, Qt::QueuedConnection);
|
||||||
|
|
||||||
QObject::connect(displayPlugin.get(), &DisplayPlugin::recommendedFramebufferSizeChanged, [this](const QSize & size) {
|
QObject::connect(displayPlugin.get(), &DisplayPlugin::recommendedFramebufferSizeChanged, [this](const QSize & size) {
|
||||||
|
|
|
@ -113,21 +113,21 @@ void AvatarManager::updateMyAvatar(float deltaTime) {
|
||||||
void AvatarManager::updateOtherAvatars(float deltaTime) {
|
void AvatarManager::updateOtherAvatars(float deltaTime) {
|
||||||
// lock the hash for read to check the size
|
// lock the hash for read to check the size
|
||||||
QReadLocker lock(&_hashLock);
|
QReadLocker lock(&_hashLock);
|
||||||
|
|
||||||
if (_avatarHash.size() < 2 && _avatarFades.isEmpty()) {
|
if (_avatarHash.size() < 2 && _avatarFades.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
||||||
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||||
PerformanceWarning warn(showWarnings, "Application::updateAvatars()");
|
PerformanceWarning warn(showWarnings, "Application::updateAvatars()");
|
||||||
|
|
||||||
PerformanceTimer perfTimer("otherAvatars");
|
PerformanceTimer perfTimer("otherAvatars");
|
||||||
|
|
||||||
// simulate avatars
|
// simulate avatars
|
||||||
auto hashCopy = getHashCopy();
|
auto hashCopy = getHashCopy();
|
||||||
|
|
||||||
AvatarHash::iterator avatarIterator = hashCopy.begin();
|
AvatarHash::iterator avatarIterator = hashCopy.begin();
|
||||||
while (avatarIterator != hashCopy.end()) {
|
while (avatarIterator != hashCopy.end()) {
|
||||||
auto avatar = std::static_pointer_cast<Avatar>(avatarIterator.value());
|
auto avatar = std::static_pointer_cast<Avatar>(avatarIterator.value());
|
||||||
|
|
|
@ -41,9 +41,9 @@ public:
|
||||||
|
|
||||||
void updateMyAvatar(float deltaTime);
|
void updateMyAvatar(float deltaTime);
|
||||||
void updateOtherAvatars(float deltaTime);
|
void updateOtherAvatars(float deltaTime);
|
||||||
|
|
||||||
void clearOtherAvatars();
|
void clearOtherAvatars();
|
||||||
|
|
||||||
bool shouldShowReceiveStats() const { return _shouldShowReceiveStats; }
|
bool shouldShowReceiveStats() const { return _shouldShowReceiveStats; }
|
||||||
|
|
||||||
class LocalLight {
|
class LocalLight {
|
||||||
|
|
|
@ -139,22 +139,22 @@ void PreferencesDialog::openFullAvatarModelBrowser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreferencesDialog::resizeEvent(QResizeEvent *resizeEvent) {
|
void PreferencesDialog::resizeEvent(QResizeEvent *resizeEvent) {
|
||||||
|
|
||||||
// keep buttons panel at the bottom
|
// keep buttons panel at the bottom
|
||||||
ui.buttonsPanel->setGeometry(0,
|
ui.buttonsPanel->setGeometry(0,
|
||||||
size().height() - ui.buttonsPanel->height(),
|
size().height() - ui.buttonsPanel->height(),
|
||||||
size().width(),
|
size().width(),
|
||||||
ui.buttonsPanel->height());
|
ui.buttonsPanel->height());
|
||||||
|
|
||||||
// set width and height of srcollarea to match bottom panel and width
|
// set width and height of srcollarea to match bottom panel and width
|
||||||
ui.scrollArea->setGeometry(ui.scrollArea->geometry().x(), ui.scrollArea->geometry().y(),
|
ui.scrollArea->setGeometry(ui.scrollArea->geometry().x(), ui.scrollArea->geometry().y(),
|
||||||
size().width(),
|
size().width(),
|
||||||
size().height() - ui.buttonsPanel->height() - ui.scrollArea->geometry().y());
|
size().height() - ui.buttonsPanel->height() - ui.scrollArea->geometry().y());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreferencesDialog::loadPreferences() {
|
void PreferencesDialog::loadPreferences() {
|
||||||
|
|
||||||
MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
||||||
Menu* menuInstance = Menu::getInstance();
|
Menu* menuInstance = Menu::getInstance();
|
||||||
|
|
||||||
|
@ -175,14 +175,14 @@ void PreferencesDialog::loadPreferences() {
|
||||||
|
|
||||||
ui.pupilDilationSlider->setValue(myAvatar->getHead()->getPupilDilation() *
|
ui.pupilDilationSlider->setValue(myAvatar->getHead()->getPupilDilation() *
|
||||||
ui.pupilDilationSlider->maximum());
|
ui.pupilDilationSlider->maximum());
|
||||||
|
|
||||||
auto dde = DependencyManager::get<DdeFaceTracker>();
|
auto dde = DependencyManager::get<DdeFaceTracker>();
|
||||||
ui.ddeEyeClosingThresholdSlider->setValue(dde->getEyeClosingThreshold() *
|
ui.ddeEyeClosingThresholdSlider->setValue(dde->getEyeClosingThreshold() *
|
||||||
ui.ddeEyeClosingThresholdSlider->maximum());
|
ui.ddeEyeClosingThresholdSlider->maximum());
|
||||||
|
|
||||||
ui.faceTrackerEyeDeflectionSider->setValue(FaceTracker::getEyeDeflection() *
|
ui.faceTrackerEyeDeflectionSider->setValue(FaceTracker::getEyeDeflection() *
|
||||||
ui.faceTrackerEyeDeflectionSider->maximum());
|
ui.faceTrackerEyeDeflectionSider->maximum());
|
||||||
|
|
||||||
auto faceshift = DependencyManager::get<Faceshift>();
|
auto faceshift = DependencyManager::get<Faceshift>();
|
||||||
ui.faceshiftHostnameEdit->setText(faceshift->getHostname());
|
ui.faceshiftHostnameEdit->setText(faceshift->getHostname());
|
||||||
|
|
||||||
|
@ -208,12 +208,12 @@ void PreferencesDialog::loadPreferences() {
|
||||||
ui.realWorldFieldOfViewSpin->setValue(myAvatar->getRealWorldFieldOfView());
|
ui.realWorldFieldOfViewSpin->setValue(myAvatar->getRealWorldFieldOfView());
|
||||||
|
|
||||||
ui.fieldOfViewSpin->setValue(qApp->getFieldOfView());
|
ui.fieldOfViewSpin->setValue(qApp->getFieldOfView());
|
||||||
|
|
||||||
ui.leanScaleSpin->setValue(myAvatar->getLeanScale());
|
ui.leanScaleSpin->setValue(myAvatar->getLeanScale());
|
||||||
|
|
||||||
ui.avatarScaleSpin->setValue(myAvatar->getUniformScale());
|
ui.avatarScaleSpin->setValue(myAvatar->getUniformScale());
|
||||||
ui.avatarAnimationEdit->setText(myAvatar->getAnimGraphUrl().toString());
|
ui.avatarAnimationEdit->setText(myAvatar->getAnimGraphUrl().toString());
|
||||||
|
|
||||||
ui.maxOctreePPSSpin->setValue(qApp->getMaxOctreePacketsPerSecond());
|
ui.maxOctreePPSSpin->setValue(qApp->getMaxOctreePacketsPerSecond());
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -232,11 +232,11 @@ void PreferencesDialog::loadPreferences() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreferencesDialog::savePreferences() {
|
void PreferencesDialog::savePreferences() {
|
||||||
|
|
||||||
MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
||||||
|
|
||||||
bool shouldDispatchIdentityPacket = false;
|
bool shouldDispatchIdentityPacket = false;
|
||||||
|
|
||||||
QString displayNameStr(ui.displayNameEdit->text());
|
QString displayNameStr(ui.displayNameEdit->text());
|
||||||
if (displayNameStr != _displayNameString) {
|
if (displayNameStr != _displayNameString) {
|
||||||
myAvatar->setDisplayName(displayNameStr);
|
myAvatar->setDisplayName(displayNameStr);
|
||||||
|
@ -247,7 +247,7 @@ void PreferencesDialog::savePreferences() {
|
||||||
if (shouldDispatchIdentityPacket) {
|
if (shouldDispatchIdentityPacket) {
|
||||||
myAvatar->sendIdentityPacket();
|
myAvatar->sendIdentityPacket();
|
||||||
}
|
}
|
||||||
|
|
||||||
myAvatar->setCollisionSoundURL(ui.collisionSoundURLEdit->text());
|
myAvatar->setCollisionSoundURL(ui.collisionSoundURLEdit->text());
|
||||||
|
|
||||||
// MyAvatar persists its own data. If it doesn't agree with what the user has explicitly accepted, set it back to old values.
|
// MyAvatar persists its own data. If it doesn't agree with what the user has explicitly accepted, set it back to old values.
|
||||||
|
@ -276,28 +276,28 @@ void PreferencesDialog::savePreferences() {
|
||||||
}
|
}
|
||||||
|
|
||||||
myAvatar->setRealWorldFieldOfView(ui.realWorldFieldOfViewSpin->value());
|
myAvatar->setRealWorldFieldOfView(ui.realWorldFieldOfViewSpin->value());
|
||||||
|
|
||||||
qApp->setFieldOfView(ui.fieldOfViewSpin->value());
|
qApp->setFieldOfView(ui.fieldOfViewSpin->value());
|
||||||
|
|
||||||
auto dde = DependencyManager::get<DdeFaceTracker>();
|
auto dde = DependencyManager::get<DdeFaceTracker>();
|
||||||
dde->setEyeClosingThreshold(ui.ddeEyeClosingThresholdSlider->value() /
|
dde->setEyeClosingThreshold(ui.ddeEyeClosingThresholdSlider->value() /
|
||||||
(float)ui.ddeEyeClosingThresholdSlider->maximum());
|
(float)ui.ddeEyeClosingThresholdSlider->maximum());
|
||||||
|
|
||||||
FaceTracker::setEyeDeflection(ui.faceTrackerEyeDeflectionSider->value() /
|
FaceTracker::setEyeDeflection(ui.faceTrackerEyeDeflectionSider->value() /
|
||||||
(float)ui.faceTrackerEyeDeflectionSider->maximum());
|
(float)ui.faceTrackerEyeDeflectionSider->maximum());
|
||||||
|
|
||||||
auto faceshift = DependencyManager::get<Faceshift>();
|
auto faceshift = DependencyManager::get<Faceshift>();
|
||||||
faceshift->setHostname(ui.faceshiftHostnameEdit->text());
|
faceshift->setHostname(ui.faceshiftHostnameEdit->text());
|
||||||
|
|
||||||
qApp->setMaxOctreePacketsPerSecond(ui.maxOctreePPSSpin->value());
|
qApp->setMaxOctreePacketsPerSecond(ui.maxOctreePPSSpin->value());
|
||||||
|
|
||||||
qApp->getApplicationCompositor().setHmdUIAngularSize(ui.oculusUIAngularSizeSpin->value());
|
qApp->getApplicationCompositor().setHmdUIAngularSize(ui.oculusUIAngularSizeSpin->value());
|
||||||
|
|
||||||
controller::InputDevice::setReticleMoveSpeed(ui.sixenseReticleMoveSpeedSpin->value());
|
controller::InputDevice::setReticleMoveSpeed(ui.sixenseReticleMoveSpeedSpin->value());
|
||||||
|
|
||||||
auto audio = DependencyManager::get<AudioClient>();
|
auto audio = DependencyManager::get<AudioClient>();
|
||||||
MixedProcessedAudioStream& stream = audio->getReceivedAudioStream();
|
MixedProcessedAudioStream& stream = audio->getReceivedAudioStream();
|
||||||
|
|
||||||
stream.setDynamicJitterBuffers(ui.dynamicJitterBuffersCheckBox->isChecked());
|
stream.setDynamicJitterBuffers(ui.dynamicJitterBuffersCheckBox->isChecked());
|
||||||
stream.setStaticDesiredJitterBufferFrames(ui.staticDesiredJitterBufferFramesSpin->value());
|
stream.setStaticDesiredJitterBufferFrames(ui.staticDesiredJitterBufferFramesSpin->value());
|
||||||
stream.setMaxFramesOverDesired(ui.maxFramesOverDesiredSpin->value());
|
stream.setMaxFramesOverDesired(ui.maxFramesOverDesiredSpin->value());
|
||||||
|
|
|
@ -1211,7 +1211,7 @@ void AvatarData::setJointMappingsFromNetworkReply() {
|
||||||
|
|
||||||
void AvatarData::sendAvatarDataPacket() {
|
void AvatarData::sendAvatarDataPacket() {
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
|
||||||
// about 2% of the time, we send a full update (meaning, we transmit all the joint data), even if nothing has changed.
|
// about 2% of the time, we send a full update (meaning, we transmit all the joint data), even if nothing has changed.
|
||||||
// this is to guard against a joint moving once, the packet getting lost, and the joint never moving again.
|
// this is to guard against a joint moving once, the packet getting lost, and the joint never moving again.
|
||||||
bool sendFullUpdate = randFloat() < AVATAR_SEND_FULL_UPDATE_RATIO;
|
bool sendFullUpdate = randFloat() < AVATAR_SEND_FULL_UPDATE_RATIO;
|
||||||
|
@ -1219,7 +1219,7 @@ void AvatarData::sendAvatarDataPacket() {
|
||||||
doneEncoding(true);
|
doneEncoding(true);
|
||||||
|
|
||||||
static AvatarDataSequenceNumber sequenceNumber = 0;
|
static AvatarDataSequenceNumber sequenceNumber = 0;
|
||||||
|
|
||||||
auto avatarPacket = NLPacket::create(PacketType::AvatarData, avatarByteArray.size() + sizeof(sequenceNumber));
|
auto avatarPacket = NLPacket::create(PacketType::AvatarData, avatarByteArray.size() + sizeof(sequenceNumber));
|
||||||
avatarPacket->writePrimitive(sequenceNumber++);
|
avatarPacket->writePrimitive(sequenceNumber++);
|
||||||
avatarPacket->write(avatarByteArray);
|
avatarPacket->write(avatarByteArray);
|
||||||
|
@ -1241,13 +1241,13 @@ void AvatarData::sendIdentityPacket() {
|
||||||
void AvatarData::sendBillboardPacket() {
|
void AvatarData::sendBillboardPacket() {
|
||||||
if (!_billboard.isEmpty()) {
|
if (!_billboard.isEmpty()) {
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
|
||||||
// This makes sure the billboard won't be too large to send.
|
// This makes sure the billboard won't be too large to send.
|
||||||
// Once more protocol changes are done and we can send blocks of data we can support sending > MTU sized billboards.
|
// Once more protocol changes are done and we can send blocks of data we can support sending > MTU sized billboards.
|
||||||
if (_billboard.size() <= NLPacket::maxPayloadSize(PacketType::AvatarBillboard)) {
|
if (_billboard.size() <= NLPacket::maxPayloadSize(PacketType::AvatarBillboard)) {
|
||||||
auto billboardPacket = NLPacket::create(PacketType::AvatarBillboard, _billboard.size());
|
auto billboardPacket = NLPacket::create(PacketType::AvatarBillboard, _billboard.size());
|
||||||
billboardPacket->write(_billboard);
|
billboardPacket->write(_billboard);
|
||||||
|
|
||||||
nodeList->broadcastToNodes(std::move(billboardPacket), NodeSet() << NodeType::AvatarMixer);
|
nodeList->broadcastToNodes(std::move(billboardPacket), NodeSet() << NodeType::AvatarMixer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1495,7 +1495,7 @@ QJsonObject AvatarData::toJson() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarData::fromJson(const QJsonObject& json) {
|
void AvatarData::fromJson(const QJsonObject& json) {
|
||||||
// The head setOrientation likes to overwrite the avatar orientation,
|
// The head setOrientation likes to overwrite the avatar orientation,
|
||||||
// so lets do the head first
|
// so lets do the head first
|
||||||
// Most head data is relative to the avatar, and needs no basis correction,
|
// Most head data is relative to the avatar, and needs no basis correction,
|
||||||
// but the lookat vector does need correction
|
// but the lookat vector does need correction
|
||||||
|
@ -1531,7 +1531,7 @@ void AvatarData::fromJson(const QJsonObject& json) {
|
||||||
if (json.contains(JSON_AVATAR_RELATIVE)) {
|
if (json.contains(JSON_AVATAR_RELATIVE)) {
|
||||||
// During playback you can either have the recording basis set to the avatar current state
|
// During playback you can either have the recording basis set to the avatar current state
|
||||||
// meaning that all playback is relative to this avatars starting position, or
|
// meaning that all playback is relative to this avatars starting position, or
|
||||||
// the basis can be loaded from the recording, meaning the playback is relative to the
|
// the basis can be loaded from the recording, meaning the playback is relative to the
|
||||||
// original avatar location
|
// original avatar location
|
||||||
// The first is more useful for playing back recordings on your own avatar, while
|
// The first is more useful for playing back recordings on your own avatar, while
|
||||||
// the latter is more useful for playing back other avatars within your scene.
|
// the latter is more useful for playing back other avatars within your scene.
|
||||||
|
@ -1580,8 +1580,8 @@ void AvatarData::fromJson(const QJsonObject& json) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Every frame will store both a basis for the recording and a relative transform
|
// Every frame will store both a basis for the recording and a relative transform
|
||||||
// This allows the application to decide whether playback should be relative to an avatar's
|
// This allows the application to decide whether playback should be relative to an avatar's
|
||||||
// transform at the start of playback, or relative to the transform of the recorded
|
// transform at the start of playback, or relative to the transform of the recorded
|
||||||
// avatar
|
// avatar
|
||||||
QByteArray AvatarData::toFrame(const AvatarData& avatar) {
|
QByteArray AvatarData::toFrame(const AvatarData& avatar) {
|
||||||
QJsonObject root = avatar.toJson();
|
QJsonObject root = avatar.toJson();
|
||||||
|
|
|
@ -267,9 +267,9 @@ public:
|
||||||
Q_INVOKABLE virtual QVector<glm::quat> getJointRotations() const;
|
Q_INVOKABLE virtual QVector<glm::quat> getJointRotations() const;
|
||||||
Q_INVOKABLE virtual void setJointRotations(QVector<glm::quat> jointRotations);
|
Q_INVOKABLE virtual void setJointRotations(QVector<glm::quat> jointRotations);
|
||||||
Q_INVOKABLE virtual void setJointTranslations(QVector<glm::vec3> jointTranslations);
|
Q_INVOKABLE virtual void setJointTranslations(QVector<glm::vec3> jointTranslations);
|
||||||
|
|
||||||
Q_INVOKABLE virtual void clearJointsData();
|
Q_INVOKABLE virtual void clearJointsData();
|
||||||
|
|
||||||
/// Returns the index of the joint with the specified name, or -1 if not found/unknown.
|
/// Returns the index of the joint with the specified name, or -1 if not found/unknown.
|
||||||
Q_INVOKABLE virtual int getJointIndex(const QString& name) const { return _jointIndices.value(name) - 1; }
|
Q_INVOKABLE virtual int getJointIndex(const QString& name) const { return _jointIndices.value(name) - 1; }
|
||||||
|
|
||||||
|
@ -288,42 +288,42 @@ public:
|
||||||
|
|
||||||
bool hasIdentityChangedAfterParsing(const QByteArray& data);
|
bool hasIdentityChangedAfterParsing(const QByteArray& data);
|
||||||
QByteArray identityByteArray();
|
QByteArray identityByteArray();
|
||||||
|
|
||||||
bool hasBillboardChangedAfterParsing(const QByteArray& data);
|
bool hasBillboardChangedAfterParsing(const QByteArray& data);
|
||||||
|
|
||||||
const QUrl& getFaceModelURL() const { return _faceModelURL; }
|
const QUrl& getFaceModelURL() const { return _faceModelURL; }
|
||||||
QString getFaceModelURLString() const { return _faceModelURL.toString(); }
|
QString getFaceModelURLString() const { return _faceModelURL.toString(); }
|
||||||
const QUrl& getSkeletonModelURL() const { return _skeletonModelURL; }
|
const QUrl& getSkeletonModelURL() const { return _skeletonModelURL; }
|
||||||
const QString& getDisplayName() const { return _displayName; }
|
const QString& getDisplayName() const { return _displayName; }
|
||||||
virtual void setFaceModelURL(const QUrl& faceModelURL);
|
virtual void setFaceModelURL(const QUrl& faceModelURL);
|
||||||
virtual void setSkeletonModelURL(const QUrl& skeletonModelURL);
|
virtual void setSkeletonModelURL(const QUrl& skeletonModelURL);
|
||||||
|
|
||||||
virtual void setDisplayName(const QString& displayName);
|
virtual void setDisplayName(const QString& displayName);
|
||||||
|
|
||||||
Q_INVOKABLE QVector<AttachmentData> getAttachmentData() const;
|
Q_INVOKABLE QVector<AttachmentData> getAttachmentData() const;
|
||||||
Q_INVOKABLE virtual void setAttachmentData(const QVector<AttachmentData>& attachmentData);
|
Q_INVOKABLE virtual void setAttachmentData(const QVector<AttachmentData>& attachmentData);
|
||||||
|
|
||||||
Q_INVOKABLE virtual void attach(const QString& modelURL, const QString& jointName = QString(),
|
Q_INVOKABLE virtual void attach(const QString& modelURL, const QString& jointName = QString(),
|
||||||
const glm::vec3& translation = glm::vec3(), const glm::quat& rotation = glm::quat(), float scale = 1.0f,
|
const glm::vec3& translation = glm::vec3(), const glm::quat& rotation = glm::quat(), float scale = 1.0f,
|
||||||
bool allowDuplicates = false, bool useSaved = true);
|
bool allowDuplicates = false, bool useSaved = true);
|
||||||
|
|
||||||
Q_INVOKABLE void detachOne(const QString& modelURL, const QString& jointName = QString());
|
Q_INVOKABLE void detachOne(const QString& modelURL, const QString& jointName = QString());
|
||||||
Q_INVOKABLE void detachAll(const QString& modelURL, const QString& jointName = QString());
|
Q_INVOKABLE void detachAll(const QString& modelURL, const QString& jointName = QString());
|
||||||
|
|
||||||
virtual void setBillboard(const QByteArray& billboard);
|
virtual void setBillboard(const QByteArray& billboard);
|
||||||
const QByteArray& getBillboard() const { return _billboard; }
|
const QByteArray& getBillboard() const { return _billboard; }
|
||||||
|
|
||||||
void setBillboardFromURL(const QString& billboardURL);
|
void setBillboardFromURL(const QString& billboardURL);
|
||||||
const QString& getBillboardURL() { return _billboardURL; }
|
const QString& getBillboardURL() { return _billboardURL; }
|
||||||
|
|
||||||
QString getFaceModelURLFromScript() const { return _faceModelURL.toString(); }
|
QString getFaceModelURLFromScript() const { return _faceModelURL.toString(); }
|
||||||
void setFaceModelURLFromScript(const QString& faceModelString) { setFaceModelURL(faceModelString); }
|
void setFaceModelURLFromScript(const QString& faceModelString) { setFaceModelURL(faceModelString); }
|
||||||
|
|
||||||
QString getSkeletonModelURLFromScript() const { return _skeletonModelURL.toString(); }
|
QString getSkeletonModelURLFromScript() const { return _skeletonModelURL.toString(); }
|
||||||
void setSkeletonModelURLFromScript(const QString& skeletonModelString) { setSkeletonModelURL(QUrl(skeletonModelString)); }
|
void setSkeletonModelURLFromScript(const QString& skeletonModelString) { setSkeletonModelURL(QUrl(skeletonModelString)); }
|
||||||
|
|
||||||
void setOwningAvatarMixer(const QWeakPointer<Node>& owningAvatarMixer) { _owningAvatarMixer = owningAvatarMixer; }
|
void setOwningAvatarMixer(const QWeakPointer<Node>& owningAvatarMixer) { _owningAvatarMixer = owningAvatarMixer; }
|
||||||
|
|
||||||
const AABox& getLocalAABox() const { return _localAABox; }
|
const AABox& getLocalAABox() const { return _localAABox; }
|
||||||
|
|
||||||
int getUsecsSinceLastUpdate() const { return _averageBytesReceived.getUsecsSinceLastEvent(); }
|
int getUsecsSinceLastUpdate() const { return _averageBytesReceived.getUsecsSinceLastEvent(); }
|
||||||
|
@ -351,7 +351,7 @@ public slots:
|
||||||
void sendAvatarDataPacket();
|
void sendAvatarDataPacket();
|
||||||
void sendIdentityPacket();
|
void sendIdentityPacket();
|
||||||
void sendBillboardPacket();
|
void sendBillboardPacket();
|
||||||
|
|
||||||
void setBillboardFromNetworkReply();
|
void setBillboardFromNetworkReply();
|
||||||
void setJointMappingsFromNetworkReply();
|
void setJointMappingsFromNetworkReply();
|
||||||
void setSessionUUID(const QUuid& sessionUUID) { setID(sessionUUID); }
|
void setSessionUUID(const QUuid& sessionUUID) { setID(sessionUUID); }
|
||||||
|
@ -392,14 +392,14 @@ protected:
|
||||||
|
|
||||||
QByteArray _billboard;
|
QByteArray _billboard;
|
||||||
QString _billboardURL;
|
QString _billboardURL;
|
||||||
|
|
||||||
QHash<QString, int> _jointIndices; ///< 1-based, since zero is returned for missing keys
|
QHash<QString, int> _jointIndices; ///< 1-based, since zero is returned for missing keys
|
||||||
QStringList _jointNames; ///< in order of depth-first traversal
|
QStringList _jointNames; ///< in order of depth-first traversal
|
||||||
|
|
||||||
quint64 _errorLogExpiry; ///< time in future when to log an error
|
quint64 _errorLogExpiry; ///< time in future when to log an error
|
||||||
|
|
||||||
QWeakPointer<Node> _owningAvatarMixer;
|
QWeakPointer<Node> _owningAvatarMixer;
|
||||||
|
|
||||||
/// Loads the joint indices, names from the FST file (if any)
|
/// Loads the joint indices, names from the FST file (if any)
|
||||||
virtual void updateJointMappings();
|
virtual void updateJointMappings();
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ protected:
|
||||||
SimpleMovingAverage _averageBytesReceived;
|
SimpleMovingAverage _averageBytesReceived;
|
||||||
|
|
||||||
QMutex avatarLock; // Name is redundant, but it aids searches.
|
QMutex avatarLock; // Name is redundant, but it aids searches.
|
||||||
|
|
||||||
// During recording, this holds the starting position, orientation & scale of the recorded avatar
|
// During recording, this holds the starting position, orientation & scale of the recorded avatar
|
||||||
// During playback, it holds the origin from which to play the relative positions in the clip
|
// During playback, it holds the origin from which to play the relative positions in the clip
|
||||||
TransformPointer _recordingBasis;
|
TransformPointer _recordingBasis;
|
||||||
|
@ -468,19 +468,19 @@ class AttachmentDataObject : public QObject, protected QScriptable {
|
||||||
Q_PROPERTY(float scale READ getScale WRITE setScale)
|
Q_PROPERTY(float scale READ getScale WRITE setScale)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Q_INVOKABLE void setModelURL(const QString& modelURL) const;
|
Q_INVOKABLE void setModelURL(const QString& modelURL) const;
|
||||||
Q_INVOKABLE QString getModelURL() const;
|
Q_INVOKABLE QString getModelURL() const;
|
||||||
|
|
||||||
Q_INVOKABLE void setJointName(const QString& jointName) const;
|
Q_INVOKABLE void setJointName(const QString& jointName) const;
|
||||||
Q_INVOKABLE QString getJointName() const;
|
Q_INVOKABLE QString getJointName() const;
|
||||||
|
|
||||||
Q_INVOKABLE void setTranslation(const glm::vec3& translation) const;
|
Q_INVOKABLE void setTranslation(const glm::vec3& translation) const;
|
||||||
Q_INVOKABLE glm::vec3 getTranslation() const;
|
Q_INVOKABLE glm::vec3 getTranslation() const;
|
||||||
|
|
||||||
Q_INVOKABLE void setRotation(const glm::quat& rotation) const;
|
Q_INVOKABLE void setRotation(const glm::quat& rotation) const;
|
||||||
Q_INVOKABLE glm::quat getRotation() const;
|
Q_INVOKABLE glm::quat getRotation() const;
|
||||||
|
|
||||||
Q_INVOKABLE void setScale(float scale) const;
|
Q_INVOKABLE void setScale(float scale) const;
|
||||||
Q_INVOKABLE float getScale() const;
|
Q_INVOKABLE float getScale() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -169,7 +169,7 @@ bool AnimationPropertyGroup::appendToEditPacket(OctreePacketData* packetData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const {
|
OctreeElement::AppendState& appendState) const {
|
||||||
|
|
||||||
bool successPropertyFits = true;
|
bool successPropertyFits = true;
|
||||||
|
@ -248,7 +248,7 @@ void AnimationPropertyGroup::markAllChanged() {
|
||||||
|
|
||||||
EntityPropertyFlags AnimationPropertyGroup::getChangedProperties() const {
|
EntityPropertyFlags AnimationPropertyGroup::getChangedProperties() const {
|
||||||
EntityPropertyFlags changedProperties;
|
EntityPropertyFlags changedProperties;
|
||||||
|
|
||||||
CHECK_PROPERTY_CHANGE(PROP_ANIMATION_URL, url);
|
CHECK_PROPERTY_CHANGE(PROP_ANIMATION_URL, url);
|
||||||
CHECK_PROPERTY_CHANGE(PROP_ANIMATION_FPS, fps);
|
CHECK_PROPERTY_CHANGE(PROP_ANIMATION_FPS, fps);
|
||||||
CHECK_PROPERTY_CHANGE(PROP_ANIMATION_FRAME_INDEX, currentFrame);
|
CHECK_PROPERTY_CHANGE(PROP_ANIMATION_FRAME_INDEX, currentFrame);
|
||||||
|
@ -321,13 +321,13 @@ EntityPropertyFlags AnimationPropertyGroup::getEntityProperties(EncodeBitstreamP
|
||||||
|
|
||||||
return requestedProperties;
|
return requestedProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationPropertyGroup::appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
void AnimationPropertyGroup::appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const {
|
OctreeElement::AppendState& appendState) const {
|
||||||
|
|
||||||
bool successPropertyFits = true;
|
bool successPropertyFits = true;
|
||||||
|
@ -352,7 +352,7 @@ void AnimationPropertyGroup::appendSubclassData(OctreePacketData* packetData, En
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int AnimationPropertyGroup::readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
int AnimationPropertyGroup::readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged) {
|
bool& somethingChanged) {
|
||||||
|
|
|
@ -39,11 +39,11 @@ public:
|
||||||
virtual void debugDump() const;
|
virtual void debugDump() const;
|
||||||
virtual void listChangedProperties(QList<QString>& out);
|
virtual void listChangedProperties(QList<QString>& out);
|
||||||
|
|
||||||
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const;
|
||||||
|
|
||||||
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags, const unsigned char*& dataAt , int& processedBytes);
|
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags, const unsigned char*& dataAt , int& processedBytes);
|
||||||
|
@ -53,25 +53,25 @@ public:
|
||||||
// EntityItem related helpers
|
// EntityItem related helpers
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual void getProperties(EntityItemProperties& propertiesOut) const;
|
virtual void getProperties(EntityItemProperties& propertiesOut) const;
|
||||||
|
|
||||||
/// returns true if something changed
|
/// returns true if something changed
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties);
|
||||||
|
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged);
|
||||||
|
|
||||||
DEFINE_PROPERTY_REF(PROP_ANIMATION_URL, URL, url, QString, "");
|
DEFINE_PROPERTY_REF(PROP_ANIMATION_URL, URL, url, QString, "");
|
||||||
DEFINE_PROPERTY(PROP_ANIMATION_FPS, FPS, fps, float, 30.0f);
|
DEFINE_PROPERTY(PROP_ANIMATION_FPS, FPS, fps, float, 30.0f);
|
||||||
DEFINE_PROPERTY(PROP_ANIMATION_FRAME_INDEX, CurrentFrame, currentFrame, float, 0.0f);
|
DEFINE_PROPERTY(PROP_ANIMATION_FRAME_INDEX, CurrentFrame, currentFrame, float, 0.0f);
|
||||||
|
|
|
@ -82,7 +82,7 @@ void EntityItemProperties::debugDump() const {
|
||||||
getAtmosphere().debugDump();
|
getAtmosphere().debugDump();
|
||||||
getSkybox().debugDump();
|
getSkybox().debugDump();
|
||||||
getKeyLight().debugDump();
|
getKeyLight().debugDump();
|
||||||
|
|
||||||
qCDebug(entities) << " changed properties...";
|
qCDebug(entities) << " changed properties...";
|
||||||
EntityPropertyFlags props = getChangedProperties();
|
EntityPropertyFlags props = getChangedProperties();
|
||||||
props.debugDumpBits();
|
props.debugDumpBits();
|
||||||
|
@ -399,7 +399,7 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
|
||||||
// Zones only
|
// Zones only
|
||||||
if (_type == EntityTypes::Zone) {
|
if (_type == EntityTypes::Zone) {
|
||||||
_keyLight.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
|
_keyLight.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
|
||||||
|
|
||||||
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_BACKGROUND_MODE, backgroundMode, getBackgroundModeAsString());
|
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_BACKGROUND_MODE, backgroundMode, getBackgroundModeAsString());
|
||||||
|
|
||||||
_stage.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
|
_stage.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
|
||||||
|
@ -651,7 +651,7 @@ static QHash<QString, EntityPropertyList> _propertyStringsToEnums;
|
||||||
void EntityItemProperties::entityPropertyFlagsFromScriptValue(const QScriptValue& object, EntityPropertyFlags& flags) {
|
void EntityItemProperties::entityPropertyFlagsFromScriptValue(const QScriptValue& object, EntityPropertyFlags& flags) {
|
||||||
static std::once_flag initMap;
|
static std::once_flag initMap;
|
||||||
|
|
||||||
std::call_once(initMap, [](){
|
std::call_once(initMap, [](){
|
||||||
ADD_PROPERTY_TO_MAP(PROP_VISIBLE, Visible, visible, bool);
|
ADD_PROPERTY_TO_MAP(PROP_VISIBLE, Visible, visible, bool);
|
||||||
ADD_PROPERTY_TO_MAP(PROP_POSITION, Position, position, glm::vec3);
|
ADD_PROPERTY_TO_MAP(PROP_POSITION, Position, position, glm::vec3);
|
||||||
ADD_PROPERTY_TO_MAP(PROP_DIMENSIONS, Dimensions, dimensions, glm::vec3);
|
ADD_PROPERTY_TO_MAP(PROP_DIMENSIONS, Dimensions, dimensions, glm::vec3);
|
||||||
|
@ -992,7 +992,7 @@ bool EntityItemProperties::encodeEntityEditPacket(PacketType command, EntityItem
|
||||||
if (properties.getType() == EntityTypes::Zone) {
|
if (properties.getType() == EntityTypes::Zone) {
|
||||||
_staticKeyLight.setProperties(properties);
|
_staticKeyLight.setProperties(properties);
|
||||||
_staticKeyLight.appendToEditPacket(packetData, requestedProperties, propertyFlags, propertiesDidntFit, propertyCount, appendState);
|
_staticKeyLight.appendToEditPacket(packetData, requestedProperties, propertyFlags, propertiesDidntFit, propertyCount, appendState);
|
||||||
|
|
||||||
_staticStage.setProperties(properties);
|
_staticStage.setProperties(properties);
|
||||||
_staticStage.appendToEditPacket(packetData, requestedProperties, propertyFlags, propertiesDidntFit, propertyCount, appendState);
|
_staticStage.appendToEditPacket(packetData, requestedProperties, propertyFlags, propertiesDidntFit, propertyCount, appendState);
|
||||||
|
|
||||||
|
@ -1027,7 +1027,7 @@ bool EntityItemProperties::encodeEntityEditPacket(PacketType command, EntityItem
|
||||||
APPEND_ENTITY_PROPERTY(PROP_LINE_WIDTH, properties.getLineWidth());
|
APPEND_ENTITY_PROPERTY(PROP_LINE_WIDTH, properties.getLineWidth());
|
||||||
APPEND_ENTITY_PROPERTY(PROP_LINE_POINTS, properties.getLinePoints());
|
APPEND_ENTITY_PROPERTY(PROP_LINE_POINTS, properties.getLinePoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties.getType() == EntityTypes::PolyLine) {
|
if (properties.getType() == EntityTypes::PolyLine) {
|
||||||
APPEND_ENTITY_PROPERTY(PROP_LINE_WIDTH, properties.getLineWidth());
|
APPEND_ENTITY_PROPERTY(PROP_LINE_WIDTH, properties.getLineWidth());
|
||||||
APPEND_ENTITY_PROPERTY(PROP_LINE_POINTS, properties.getLinePoints());
|
APPEND_ENTITY_PROPERTY(PROP_LINE_POINTS, properties.getLinePoints());
|
||||||
|
@ -1035,7 +1035,7 @@ bool EntityItemProperties::encodeEntityEditPacket(PacketType command, EntityItem
|
||||||
APPEND_ENTITY_PROPERTY(PROP_STROKE_WIDTHS, properties.getStrokeWidths());
|
APPEND_ENTITY_PROPERTY(PROP_STROKE_WIDTHS, properties.getStrokeWidths());
|
||||||
APPEND_ENTITY_PROPERTY(PROP_TEXTURES, properties.getTextures());
|
APPEND_ENTITY_PROPERTY(PROP_TEXTURES, properties.getTextures());
|
||||||
}
|
}
|
||||||
|
|
||||||
APPEND_ENTITY_PROPERTY(PROP_MARKETPLACE_ID, properties.getMarketplaceID());
|
APPEND_ENTITY_PROPERTY(PROP_MARKETPLACE_ID, properties.getMarketplaceID());
|
||||||
APPEND_ENTITY_PROPERTY(PROP_NAME, properties.getName());
|
APPEND_ENTITY_PROPERTY(PROP_NAME, properties.getName());
|
||||||
APPEND_ENTITY_PROPERTY(PROP_COLLISION_SOUND_URL, properties.getCollisionSoundURL());
|
APPEND_ENTITY_PROPERTY(PROP_COLLISION_SOUND_URL, properties.getCollisionSoundURL());
|
||||||
|
@ -1123,7 +1123,7 @@ bool EntityItemProperties::encodeEntityEditPacket(PacketType command, EntityItem
|
||||||
bool EntityItemProperties::decodeEntityEditPacket(const unsigned char* data, int bytesToRead, int& processedBytes,
|
bool EntityItemProperties::decodeEntityEditPacket(const unsigned char* data, int bytesToRead, int& processedBytes,
|
||||||
EntityItemID& entityID, EntityItemProperties& properties) {
|
EntityItemID& entityID, EntityItemProperties& properties) {
|
||||||
bool valid = false;
|
bool valid = false;
|
||||||
|
|
||||||
const unsigned char* dataAt = data;
|
const unsigned char* dataAt = data;
|
||||||
processedBytes = 0;
|
processedBytes = 0;
|
||||||
|
|
||||||
|
@ -1305,8 +1305,8 @@ bool EntityItemProperties::decodeEntityEditPacket(const unsigned char* data, int
|
||||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_WIDTH, float, setLineWidth);
|
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_WIDTH, float, setLineWidth);
|
||||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_POINTS, QVector<glm::vec3>, setLinePoints);
|
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_POINTS, QVector<glm::vec3>, setLinePoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (properties.getType() == EntityTypes::PolyLine) {
|
if (properties.getType() == EntityTypes::PolyLine) {
|
||||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_WIDTH, float, setLineWidth);
|
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_WIDTH, float, setLineWidth);
|
||||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_POINTS, QVector<glm::vec3>, setLinePoints);
|
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_POINTS, QVector<glm::vec3>, setLinePoints);
|
||||||
|
|
|
@ -32,16 +32,16 @@ public:
|
||||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const;
|
||||||
|
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged);
|
||||||
|
@ -92,20 +92,20 @@ public:
|
||||||
|
|
||||||
void setAnimationLoop(bool loop) { _animationLoop.setLoop(loop); }
|
void setAnimationLoop(bool loop) { _animationLoop.setLoop(loop); }
|
||||||
bool getAnimationLoop() const { return _animationLoop.getLoop(); }
|
bool getAnimationLoop() const { return _animationLoop.getLoop(); }
|
||||||
|
|
||||||
void setAnimationHold(bool hold) { _animationLoop.setHold(hold); }
|
void setAnimationHold(bool hold) { _animationLoop.setHold(hold); }
|
||||||
bool getAnimationHold() const { return _animationLoop.getHold(); }
|
bool getAnimationHold() const { return _animationLoop.getHold(); }
|
||||||
|
|
||||||
void setAnimationFirstFrame(float firstFrame) { _animationLoop.setFirstFrame(firstFrame); }
|
void setAnimationFirstFrame(float firstFrame) { _animationLoop.setFirstFrame(firstFrame); }
|
||||||
float getAnimationFirstFrame() const { return _animationLoop.getFirstFrame(); }
|
float getAnimationFirstFrame() const { return _animationLoop.getFirstFrame(); }
|
||||||
|
|
||||||
void setAnimationLastFrame(float lastFrame) { _animationLoop.setLastFrame(lastFrame); }
|
void setAnimationLastFrame(float lastFrame) { _animationLoop.setLastFrame(lastFrame); }
|
||||||
float getAnimationLastFrame() const { return _animationLoop.getLastFrame(); }
|
float getAnimationLastFrame() const { return _animationLoop.getLastFrame(); }
|
||||||
|
|
||||||
void mapJoints(const QStringList& modelJointNames);
|
void mapJoints(const QStringList& modelJointNames);
|
||||||
void getAnimationFrame(bool& newFrame, QVector<glm::quat>& rotationsResult, QVector<glm::vec3>& translationsResult);
|
void getAnimationFrame(bool& newFrame, QVector<glm::quat>& rotationsResult, QVector<glm::vec3>& translationsResult);
|
||||||
bool jointsMapped() const { return _jointMappingURL == getAnimationURL() && _jointMappingCompleted; }
|
bool jointsMapped() const { return _jointMappingURL == getAnimationURL() && _jointMappingCompleted; }
|
||||||
|
|
||||||
bool getAnimationIsPlaying() const { return _animationLoop.getRunning(); }
|
bool getAnimationIsPlaying() const { return _animationLoop.getRunning(); }
|
||||||
float getAnimationCurrentFrame() const { return _animationLoop.getCurrentFrame(); }
|
float getAnimationCurrentFrame() const { return _animationLoop.getCurrentFrame(); }
|
||||||
float getAnimationFPS() const { return _animationLoop.getFPS(); }
|
float getAnimationFPS() const { return _animationLoop.getFPS(); }
|
||||||
|
@ -115,9 +115,9 @@ public:
|
||||||
void setTextures(const QString& textures) { _textures = textures; }
|
void setTextures(const QString& textures) { _textures = textures; }
|
||||||
|
|
||||||
virtual bool shouldBePhysical() const;
|
virtual bool shouldBePhysical() const;
|
||||||
|
|
||||||
static void cleanupLoadedAnimations();
|
static void cleanupLoadedAnimations();
|
||||||
|
|
||||||
virtual glm::vec3 getJointPosition(int jointIndex) const { return glm::vec3(); }
|
virtual glm::vec3 getJointPosition(int jointIndex) const { return glm::vec3(); }
|
||||||
virtual glm::quat getJointRotation(int jointIndex) const { return glm::quat(); }
|
virtual glm::quat getJointRotation(int jointIndex) const { return glm::quat(); }
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ QDebug operator<<(QDebug debug, const PacketType& type) {
|
||||||
QMetaObject metaObject = PacketTypeEnum::staticMetaObject;
|
QMetaObject metaObject = PacketTypeEnum::staticMetaObject;
|
||||||
QMetaEnum metaEnum = metaObject.enumerator(metaObject.enumeratorOffset());
|
QMetaEnum metaEnum = metaObject.enumerator(metaObject.enumeratorOffset());
|
||||||
QString typeName = metaEnum.valueToKey((int) type);
|
QString typeName = metaEnum.valueToKey((int) type);
|
||||||
|
|
||||||
debug.nospace().noquote() << (uint8_t) type << " (" << typeName << ")";
|
debug.nospace().noquote() << (uint8_t) type << " (" << typeName << ")";
|
||||||
return debug.space();
|
return debug.space();
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ bool SixenseManager::isSupported() const {
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
@ -81,7 +81,7 @@ bool SixenseManager::isSupported() const {
|
||||||
|
|
||||||
void SixenseManager::activate() {
|
void SixenseManager::activate() {
|
||||||
InputPlugin::activate();
|
InputPlugin::activate();
|
||||||
|
|
||||||
#ifdef HAVE_SIXENSE
|
#ifdef HAVE_SIXENSE
|
||||||
_container->addMenu(MENU_PATH);
|
_container->addMenu(MENU_PATH);
|
||||||
_container->addMenuItem(PluginType::INPUT_PLUGIN, MENU_PATH, TOGGLE_SMOOTH,
|
_container->addMenuItem(PluginType::INPUT_PLUGIN, MENU_PATH, TOGGLE_SMOOTH,
|
||||||
|
@ -307,7 +307,7 @@ void SixenseManager::InputDevice::updateCalibration(SixenseControllerData* contr
|
||||||
switch (_calibrationState) {
|
switch (_calibrationState) {
|
||||||
case CALIBRATION_STATE_IDLE:
|
case CALIBRATION_STATE_IDLE:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CALIBRATION_STATE_COMPLETE: {
|
case CALIBRATION_STATE_COMPLETE: {
|
||||||
// compute calibration results
|
// compute calibration results
|
||||||
_avatarPosition = -0.5f * (_reachLeft + _reachRight); // neck is midway between right and left hands
|
_avatarPosition = -0.5f * (_reachLeft + _reachRight); // neck is midway between right and left hands
|
||||||
|
|
|
@ -98,7 +98,7 @@ private:
|
||||||
|
|
||||||
static const QString NAME;
|
static const QString NAME;
|
||||||
static const QString HYDRA_ID_STRING;
|
static const QString HYDRA_ID_STRING;
|
||||||
|
|
||||||
static bool _sixenseLoaded;
|
static bool _sixenseLoaded;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue