mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-25 09:09:26 +02:00
added other types, just stubs for now
This commit is contained in:
parent
e9db4fd120
commit
50309ef371
2 changed files with 21 additions and 0 deletions
|
@ -121,6 +121,10 @@ public:
|
|||
EntityItem(entityItemID, properties) { _type = EntityTypes::Sphere; }
|
||||
|
||||
virtual void somePureVirtualFunction() { }; // allow this class to be constructed
|
||||
|
||||
static EntityItem* factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
return new SphereEntityItem(entityID, properties);
|
||||
}
|
||||
};
|
||||
|
||||
class PlaneEntityItem : public EntityItem {
|
||||
|
@ -129,6 +133,10 @@ public:
|
|||
EntityItem(entityItemID, properties) { _type = EntityTypes::Plane; }
|
||||
|
||||
virtual void somePureVirtualFunction() { }; // allow this class to be constructed
|
||||
|
||||
static EntityItem* factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
return new PlaneEntityItem(entityID, properties);
|
||||
}
|
||||
};
|
||||
|
||||
class CylinderEntityItem : public EntityItem {
|
||||
|
@ -137,6 +145,10 @@ public:
|
|||
EntityItem(entityItemID, properties) { _type = EntityTypes::Cylinder; }
|
||||
|
||||
virtual void somePureVirtualFunction() { }; // allow this class to be constructed
|
||||
|
||||
static EntityItem* factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
return new CylinderEntityItem(entityID, properties);
|
||||
}
|
||||
};
|
||||
|
||||
class PyramidEntityItem : public EntityItem {
|
||||
|
@ -145,6 +157,10 @@ public:
|
|||
EntityItem(entityItemID, properties) { _type = EntityTypes::Pyramid; }
|
||||
|
||||
virtual void somePureVirtualFunction() { }; // allow this class to be constructed
|
||||
|
||||
static EntityItem* factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
return new PyramidEntityItem(entityID, properties);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // hifi_EntityItem_h
|
||||
|
|
|
@ -31,6 +31,11 @@ const QString ENTITY_TYPE_NAME_UNKNOWN = "Unknown";
|
|||
// Register Entity Types here...
|
||||
REGISTER_ENTITY_TYPE(Model)
|
||||
REGISTER_ENTITY_TYPE(Box)
|
||||
REGISTER_ENTITY_TYPE(Sphere)
|
||||
REGISTER_ENTITY_TYPE(Plane)
|
||||
REGISTER_ENTITY_TYPE(Cylinder)
|
||||
REGISTER_ENTITY_TYPE(Pyramid)
|
||||
|
||||
|
||||
const QString& EntityTypes::getEntityTypeName(EntityType_t entityType) {
|
||||
QMap<EntityType_t, QString>::iterator matchedTypeName = _typeNameHash.find(entityType);
|
||||
|
|
Loading…
Reference in a new issue