4 * Copyright (C) 2009 Mathias Gottschlag
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/>.
22 #include "eal/irrlicht/scenenode.hh"
23 #include "eal/irrlicht/engine.hh"
25 #include <irrlicht/irrlicht.h>
30 IrrlichtSceneNode::IrrlichtSceneNode()
34 IrrlichtSceneNode::~IrrlichtSceneNode()
41 IrrlichtSceneNode::getModel()
47 IrrlichtSceneNode::setModel(std::string model
)
50 // Delete old scene node
53 // Create new scene node
54 scene::ISceneManager
*smgr
= ((IrrlichtEngine
*)Engine::get())->getSceneManager();
55 scene::IAnimatedMesh
*mesh
= smgr
->getMesh(model
.c_str());
56 node
= smgr
->addAnimatedMeshSceneNode(mesh
);
60 IrrlichtSceneNode::getTexture()
65 IrrlichtSceneNode::setTexture(Texture
&texture
)
70 IrrlichtSceneNode::getColor()
75 IrrlichtSceneNode::setColor(const Color
&color
)
80 IrrlichtSceneNode::setPosition(const Vector3
&position
)
82 this->position
= position
;
85 node
->setPosition(core::vector3df(position
.x
, position
.y
, position
.z
));
90 IrrlichtSceneNode::getPosition()
96 IrrlichtSceneNode::setRotation(const RotationVector
&rotation
)
101 IrrlichtSceneNode::getRotation()
106 IrrlichtSceneNode::playAnimation (int start
, int end
, double speed
, int mode
)