mirror of
https://github.com/overte-org/overte.git
synced 2025-08-19 03:11:19 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into audio-fixes
This commit is contained in:
commit
cff4994c01
6 changed files with 22 additions and 12 deletions
|
@ -101,10 +101,12 @@ const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::D
|
|||
|
||||
const int STATS_PELS_PER_LINE = 20;
|
||||
|
||||
void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString &message) {
|
||||
QString messageWithNewLine = message + "\n";
|
||||
fprintf(stdout, "%s", messageWithNewLine.toLocal8Bit().constData());
|
||||
Application::getInstance()->getLogger()->addMessage(messageWithNewLine.toLocal8Bit().constData());
|
||||
void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) {
|
||||
if (message.size() > 0) {
|
||||
QString messageWithNewLine = message + "\n";
|
||||
fprintf(stdout, "%s", messageWithNewLine.toLocal8Bit().constData());
|
||||
Application::getInstance()->getLogger()->addMessage(messageWithNewLine.toLocal8Bit().constData());
|
||||
}
|
||||
}
|
||||
|
||||
Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||
|
|
|
@ -37,7 +37,6 @@ Head::Head(Avatar* owningAvatar) :
|
|||
_leftEyeBlinkVelocity(0.0f),
|
||||
_rightEyeBlinkVelocity(0.0f),
|
||||
_timeWithoutTalking(0.0f),
|
||||
_cameraYaw(_yaw),
|
||||
_isCameraMoving(false),
|
||||
_faceModel(this)
|
||||
{
|
||||
|
@ -189,8 +188,7 @@ glm::quat Head::getOrientation() const {
|
|||
|
||||
glm::quat Head::getCameraOrientation () const {
|
||||
Avatar* owningAvatar = static_cast<Avatar*>(_owningAvatar);
|
||||
return owningAvatar->getWorldAlignedOrientation()
|
||||
* glm::quat(glm::radians(glm::vec3(_pitch, _cameraYaw, 0.0f)));
|
||||
return owningAvatar->getWorldAlignedOrientation();
|
||||
}
|
||||
|
||||
glm::quat Head::getEyeRotation(const glm::vec3& eyePosition) const {
|
||||
|
|
|
@ -96,7 +96,6 @@ private:
|
|||
float _leftEyeBlinkVelocity;
|
||||
float _rightEyeBlinkVelocity;
|
||||
float _timeWithoutTalking;
|
||||
float _cameraYaw;
|
||||
bool _isCameraMoving;
|
||||
FaceModel _faceModel;
|
||||
|
||||
|
|
|
@ -92,6 +92,10 @@ Particle::Particle(const ParticleID& particleID, const ParticleProperties& prope
|
|||
_script = DEFAULT_SCRIPT;
|
||||
_inHand = NOT_IN_HAND;
|
||||
_shouldDie = false;
|
||||
_modelURL = DEFAULT_MODEL_URL;
|
||||
_modelTranslation = DEFAULT_MODEL_TRANSLATION;
|
||||
_modelRotation = DEFAULT_MODEL_ROTATION;
|
||||
_modelScale = DEFAULT_MODEL_SCALE;
|
||||
|
||||
setProperties(properties);
|
||||
}
|
||||
|
@ -124,6 +128,10 @@ void Particle::init(glm::vec3 position, float radius, rgbColor color, glm::vec3
|
|||
_script = updateScript;
|
||||
_inHand = inHand;
|
||||
_shouldDie = false;
|
||||
_modelURL = DEFAULT_MODEL_URL;
|
||||
_modelTranslation = DEFAULT_MODEL_TRANSLATION;
|
||||
_modelRotation = DEFAULT_MODEL_ROTATION;
|
||||
_modelScale = DEFAULT_MODEL_SCALE;
|
||||
}
|
||||
|
||||
void Particle::setMass(float value) {
|
||||
|
|
|
@ -56,13 +56,13 @@ const float DEFAULT_RADIUS = 0.1f / TREE_SCALE;
|
|||
const float MINIMUM_PARTICLE_ELEMENT_SIZE = (1.0f / 100000.0f) / TREE_SCALE; // smallest size container
|
||||
const glm::vec3 DEFAULT_GRAVITY(0, (-9.8f / TREE_SCALE), 0);
|
||||
const QString DEFAULT_SCRIPT("");
|
||||
const QString DEFAULT_MODEL_URL("");
|
||||
const glm::vec3 DEFAULT_MODEL_TRANSLATION(0, 0, 0);
|
||||
const glm::quat DEFAULT_MODEL_ROTATION(0, 0, 0, 0);
|
||||
const float DEFAULT_MODEL_SCALE = 1.0f;
|
||||
const bool IN_HAND = true; // it's in a hand
|
||||
const bool NOT_IN_HAND = !IN_HAND; // it's not in a hand
|
||||
|
||||
|
||||
/// A collection of properties of a particle used in the scripting API. Translates between the actual properties of a particle
|
||||
/// and a JavaScript style hash/QScriptValue storing a set of properties. Used in scripting to set/get the complete set of
|
||||
/// particle properties via JavaScript hashes/QScriptValues
|
||||
|
|
|
@ -65,6 +65,8 @@ bool shouldDo(float desiredInterval, float deltaTime) {
|
|||
return randFloat() < deltaTime / desiredInterval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void outputBufferBits(const unsigned char* buffer, int length, QDebug* continuedDebug) {
|
||||
for (int i = 0; i < length; i++) {
|
||||
outputBits(buffer[i], continuedDebug);
|
||||
|
@ -76,6 +78,7 @@ void outputBits(unsigned char byte, QDebug* continuedDebug) {
|
|||
|
||||
if (continuedDebug) {
|
||||
debug = *continuedDebug;
|
||||
debug.nospace();
|
||||
}
|
||||
|
||||
QString resultString;
|
||||
|
@ -85,12 +88,12 @@ void outputBits(unsigned char byte, QDebug* continuedDebug) {
|
|||
} else {
|
||||
resultString.sprintf("[ %d (0x%x): ", byte, byte);
|
||||
}
|
||||
debug << resultString;
|
||||
|
||||
debug << qPrintable(resultString);
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
resultString.sprintf("%d", byte >> (7 - i) & 1);
|
||||
debug << qPrintable(resultString);
|
||||
}
|
||||
debug << resultString;
|
||||
debug << " ]";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue