|
| 1 | +/* |
| 2 | +This source file is part of KBEngine |
| 3 | +For the latest info, see http://www.kbengine.org/ |
| 4 | +
|
| 5 | +Copyright (c) 2008-2012 KBEngine. |
| 6 | +
|
| 7 | +KBEngine is free software: you can redistribute it and/or modify |
| 8 | +it under the terms of the GNU Lesser General Public License as published by |
| 9 | +the Free Software Foundation, either version 3 of the License, or |
| 10 | +(at your option) any later version. |
| 11 | +
|
| 12 | +KBEngine is distributed in the hope that it will be useful, |
| 13 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | +GNU Lesser General Public License for more details. |
| 16 | + |
| 17 | +You should have received a copy of the GNU Lesser General Public License |
| 18 | +along with KBEngine. If not, see <http://www.gnu.org/licenses/>. |
| 19 | +*/ |
| 20 | + |
| 21 | +#include "entity_range_node.hpp" |
| 22 | +#include "entity.hpp" |
| 23 | + |
| 24 | +namespace KBEngine{ |
| 25 | + |
| 26 | + |
| 27 | +//------------------------------------------------------------------------------------- |
| 28 | +EntityRangeNode::EntityRangeNode(Entity* pEntity): |
| 29 | +RangeNode(NULL), |
| 30 | +pEntity_(pEntity) |
| 31 | +{ |
| 32 | +} |
| 33 | + |
| 34 | +//------------------------------------------------------------------------------------- |
| 35 | +EntityRangeNode::~EntityRangeNode() |
| 36 | +{ |
| 37 | +} |
| 38 | + |
| 39 | +//------------------------------------------------------------------------------------- |
| 40 | +float EntityRangeNode::x()const |
| 41 | +{ |
| 42 | + return pEntity_->getPosition().x; |
| 43 | +} |
| 44 | + |
| 45 | +//------------------------------------------------------------------------------------- |
| 46 | +float EntityRangeNode::y()const |
| 47 | +{ |
| 48 | + return pEntity_->getPosition().y; |
| 49 | +} |
| 50 | + |
| 51 | +//------------------------------------------------------------------------------------- |
| 52 | +float EntityRangeNode::z()const |
| 53 | +{ |
| 54 | + return pEntity_->getPosition().z; |
| 55 | +} |
| 56 | + |
| 57 | +//------------------------------------------------------------------------------------- |
| 58 | +} |
0 commit comments