/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: ... co-programmer: ... */ #include "proto_world_entity.h" ObjectListDefinition(ProtoWorldEntity); /** * constructs and loads a ProtoWorldEntity from a XML-element * @param root the XML-element to load from */ ProtoWorldEntity::ProtoWorldEntity(const TiXmlElement* root) { this->registerObject(this, ProtoWorldEntity::_objectList); this->init(); if (root != NULL) this->loadParams(root); } /** * standard deconstructor */ ProtoWorldEntity::~ProtoWorldEntity () { } /** * initializes the ProtoWorldEntity * @todo change this to what you wish */ void ProtoWorldEntity::init() { } /** * loads a ProtoWorldEntity from a XML-element * @param root the XML-element to load from * @todo make the class Loadable */ void ProtoWorldEntity::loadParams(const TiXmlElement* root) { // all the clases this Entity is directly derived from must be called in this way, to load all settings. WorldEntity::loadParam(root); /** * @todo: make the class Loadable */ } /** * advances the ProtoWorldEntity about time seconds * @param time the Time to step */ ProtoWorldEntity::tick(float time) { } /** * draws this worldEntity */ void ProtoWorldEntity::draw () const { glMatrixMode(GL_MODELVIEW); glPushMatrix(); float matrix[4][4]; /* translate */ glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); /* rotate */ this->getAbsDir().matrix(matrix); glMultMatrixf((float*)matrix); if (model) model->draw(); glPopMatrix(); } /** * * */ void ProtoWorldEntity::collidesWith (WorldEntity* entity, const Vector& location) { }