2 * See entity.hh for a brief description of the entity class.
4 * Copyright (C) 2008 Hermann Walth
6 * This file is part of OpenStranded
8 * OpenStranded is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * OpenStranded is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with OpenStranded. If not, see <http://www.gnu.org/licenses/>.
25 #include "eal/engine.hh"
27 Entity::Entity (ID type
):
32 Entity::load(Type
*type
)
34 Out::msg
.printf("Entity: %s\n", type
->getName().c_str());
35 std::string model
= type
->getModel();
38 scenenode
= eal::Engine::get()->addSceneNode();
39 scenenode
->setModel(model
);
44 Entity::setPosition(eal::Vector3 position
)
46 this->position
= position
;
48 scenenode
->setPosition(position
);