mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 06:37:27 +02:00
Rework initializers
This commit is contained in:
parent
840bf7cfb4
commit
8a8e14f54a
2 changed files with 14 additions and 31 deletions
|
@ -32,24 +32,7 @@ KeyLightPropertyGroup EntityItemProperties::_staticKeyLight;
|
||||||
EntityPropertyList PROP_LAST_ITEM = (EntityPropertyList)(PROP_AFTER_LAST_ITEM - 1);
|
EntityPropertyList PROP_LAST_ITEM = (EntityPropertyList)(PROP_AFTER_LAST_ITEM - 1);
|
||||||
|
|
||||||
EntityItemProperties::EntityItemProperties(EntityPropertyFlags desiredProperties) :
|
EntityItemProperties::EntityItemProperties(EntityPropertyFlags desiredProperties) :
|
||||||
|
_desiredProperties(desiredProperties) //,
|
||||||
_id(UNKNOWN_ENTITY_ID),
|
|
||||||
_idSet(false),
|
|
||||||
_lastEdited(0),
|
|
||||||
_type(EntityTypes::Unknown),
|
|
||||||
|
|
||||||
_glowLevel(0.0f),
|
|
||||||
_localRenderAlpha(1.0f),
|
|
||||||
|
|
||||||
_glowLevelChanged(false),
|
|
||||||
_localRenderAlphaChanged(false),
|
|
||||||
|
|
||||||
_defaultSettings(true),
|
|
||||||
_naturalDimensions(1.0f, 1.0f, 1.0f),
|
|
||||||
_naturalPosition(0.0f, 0.0f, 0.0f),
|
|
||||||
_desiredProperties(desiredProperties),
|
|
||||||
|
|
||||||
_entityFound(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,29 +279,29 @@ protected:
|
||||||
void setCollisionMaskFromString(const QString& maskString);
|
void setCollisionMaskFromString(const QString& maskString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QUuid _id;
|
QUuid _id { UNKNOWN_ENTITY_ID };
|
||||||
bool _idSet;
|
bool _idSet { false };
|
||||||
quint64 _lastEdited;
|
quint64 _lastEdited { 0 };
|
||||||
EntityTypes::EntityType _type;
|
EntityTypes::EntityType _type { EntityTypes::Unknown };
|
||||||
void setType(const QString& typeName) { _type = EntityTypes::getEntityTypeFromName(typeName); }
|
void setType(const QString& typeName) { _type = EntityTypes::getEntityTypeFromName(typeName); }
|
||||||
|
|
||||||
float _glowLevel;
|
float _glowLevel { 0.0f };
|
||||||
float _localRenderAlpha;
|
float _localRenderAlpha { 1.0f };
|
||||||
bool _glowLevelChanged;
|
bool _glowLevelChanged { false };
|
||||||
bool _localRenderAlphaChanged;
|
bool _localRenderAlphaChanged { false };
|
||||||
bool _defaultSettings;
|
bool _defaultSettings { true };
|
||||||
bool _dimensionsInitialized = true; // Only false if creating an entity locally with no dimensions properties
|
bool _dimensionsInitialized { true }; // Only false if creating an entity locally with no dimensions properties
|
||||||
|
|
||||||
// NOTE: The following are pseudo client only properties. They are only used in clients which can access
|
// NOTE: The following are pseudo client only properties. They are only used in clients which can access
|
||||||
// properties of model geometry. But these properties are not serialized like other properties.
|
// properties of model geometry. But these properties are not serialized like other properties.
|
||||||
QVector<SittingPoint> _sittingPoints;
|
QVector<SittingPoint> _sittingPoints;
|
||||||
QStringList _textureNames;
|
QStringList _textureNames;
|
||||||
glm::vec3 _naturalDimensions;
|
glm::vec3 _naturalDimensions { 1.0f, 1.0f, 1.0f };
|
||||||
glm::vec3 _naturalPosition;
|
glm::vec3 _naturalPosition { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
EntityPropertyFlags _desiredProperties; // if set will narrow scopes of copy/to/from to just these properties
|
EntityPropertyFlags _desiredProperties; // if set will narrow scopes of copy/to/from to just these properties
|
||||||
|
|
||||||
bool _entityFound;
|
bool _entityFound { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(EntityItemProperties);
|
Q_DECLARE_METATYPE(EntityItemProperties);
|
||||||
|
|
Loading…
Reference in a new issue