/* model/tags.cc This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #include "model/model.h" #include "model/tags.h" namespace model { /* ---- class Tag -------------------------------------------------- */ Tag::Tag() : tag_location() { } Tag::Tag(const Tag& other) : tag_location(other.location()) { } Tag::~Tag() { } /* ---- class Light ------------------------------------------------ */ Light::Light() : Tag(), light_color(1.0f, 1.0f, 1.0f) { light_entity = false; light_entity_second = false; light_engine = false; light_strobe = false; light_has_color = false; light_radius = 100.0f * SCALE; light_frequency = 1.0f; light_offset = 0.0f; light_time = 0.5f; light_flare = 0; light_texture = 0; } Light::Light(const Light& other) : Tag(other), light_color(other.color()) { light_entity = other.entity(); light_entity_second = other.entity_second(); light_engine = other.engine(); light_strobe = other.strobe(); light_has_color = other.has_color(); light_radius = other.radius(); light_frequency = other.frequency(); light_offset = other.offset(); light_time = other.time(); light_flare = other.flare(); light_texture = other.texture(); } Light::~Light() { } /* ---- class Flare ------------------------------------------------ */ Flare::Flare() : Light(), flare_axis() { flare_cull = CullBack; } Flare::Flare(const Flare& other) : Light(other), flare_axis(other.axis()) { flare_cull = other.cull(); } Flare::~Flare() {} /* ---- class Particles -------------------------------------------- */ Particles::Particles() : Tag(), particles_axis(), particles_script() { particles_entity = false; particles_entity_second = false; particles_engine = false; particles_has_color = false; particles_scale = 1.0f; particles_cull = CullNone; } Particles::Particles(const Particles & other) : Tag(other), particles_axis(other.axis()), particles_script(other.script()) { particles_entity = other.entity(); particles_entity_second = other.entity_second(); particles_engine = other.engine(); particles_scale = other.scale(); particles_cull = other.cull(); particles_has_color = other.has_color(); } Particles::~Particles() { } /* ---- class Sound ------------------------------------------------- */ Sound::Sound() : Tag() { } Sound::Sound(const Sound& other) : Tag(other), sound_name(other.name()) { } Sound::~Sound() { } /* ---- class Slot ------------------------------------------------- */ Slot::Slot(const Type type) : Tag() { slot_radius = 0.0f; set_type(type); } Slot::Slot(const Slot& other) : Tag(other) { slot_type = other.type(); slot_axis.assign(other.axis()); slot_radius = other.radius(); slot_cone = other.cone(); } Slot::~Slot() { } void Slot::set_type(const Type type) { slot_type = type; switch (slot_type) { case None: case Dock: slot_cone = 0.0f; break; case Cannon: slot_cone = 60.0f; // 60 degrees break; case Turret: slot_cone = 180.0f; // 180 degrees break; } } /* ---- class SubModel---------------------------------------------- */ SubModel::SubModel() : Tag() { submodel_scale = 1.0f; } SubModel::SubModel(const SubModel& other) : Tag(other), submodel_name(other.name()), submodel_axis(other.axis()) { submodel_scale = other.scale(); } SubModel::~SubModel() { } }