More work on thread safety

This commit is contained in:
Brad Davis 2017-04-03 14:22:37 -07:00
parent d89104f69c
commit fe84232ab4
4 changed files with 16 additions and 28 deletions

View file

@ -510,7 +510,7 @@ protected:
// NOTE: _volumeMultiplier is used to allow some mass properties code exist in the EntityItem base class
// rather than in all of the derived classes. If we ever collapse these classes to one we could do it a
// different way.
const float _volumeMultiplier { 1.0f };
float _volumeMultiplier { 1.0f };
glm::vec3 _gravity;
glm::vec3 _acceleration;
float _damping;

View file

@ -57,41 +57,27 @@ public:
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
bool& somethingChanged) override;
const rgbColor& getColor() const { return _color; }
xColor getXColor() const {
xColor color = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; return color;
}
const rgbColor& getColor() const;
xColor getXColor() const;
void setColor(const rgbColor& value) { memcpy(_color, value, sizeof(_color)); }
void setColor(const xColor& value) {
_color[RED_INDEX] = value.red;
_color[GREEN_INDEX] = value.green;
_color[BLUE_INDEX] = value.blue;
_lightPropertiesChanged = true;
}
void setColor(const rgbColor& value);
void setColor(const xColor& value);
bool getIsSpotlight() const { return _isSpotlight; }
bool getIsSpotlight() const;
void setIsSpotlight(bool value);
void setIgnoredColor(const rgbColor& value) { }
void setIgnoredAttenuation(float value) { }
float getIntensity() const { return _intensity; }
void setIntensity(float value) {
_intensity = value;
_lightPropertiesChanged = true;
}
float getFalloffRadius() const { return _falloffRadius; }
float getIntensity() const;
void setIntensity(float value);
float getFalloffRadius() const;
void setFalloffRadius(float value);
float getExponent() const { return _exponent; }
void setExponent(float value) {
_exponent = value;
_lightPropertiesChanged = true;
}
float getExponent() const;
void setExponent(float value);
float getCutoff() const { return _cutoff; }
float getCutoff() const;
void setCutoff(float value);
static bool getLightsArePickable() { return _lightsArePickable; }
@ -108,6 +94,7 @@ private:
float _exponent { DEFAULT_EXPONENT };
float _cutoff { DEFAULT_CUTOFF };
protected:
// Dirty flag turn true when either light properties is changing values.
// This gets back to false in the somethingChangedNotification() call
// Which is called after a setProperties() or a readEntitySubClassFromBUfferCall on the entity.

View file

@ -73,8 +73,9 @@ class LineEntityItem : public EntityItem {
private:
rgbColor _color;
float _lineWidth;
bool _pointsChanged;
QVector<glm::vec3> _points;
protected:
bool _pointsChanged;
};
#endif // hifi_LineEntityItem_h

View file

@ -130,7 +130,7 @@ private:
void setAnimationSettings(const QString& value); // only called for old bitstream format
ShapeType computeTrueShapeType() const;
private:
protected:
// these are used:
// - to bounce joint data from an animation into the model/rig.
// - to relay changes from scripts to model/rig.