Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/mount_points/src/world_entities/mount_point.cc @ 10184

Last change on this file since 10184 was 10184, checked in by patrick, 17 years ago

extended model again, added mounting point generation procedures now working on a nicer interface

File size: 2.1 KB
RevLine 
[10050]1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific
[10059]12   main-programmer: Patrick Boenzli patrick@orxonox.net
[10050]13   co-programmer:
14*/
15#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
16
17
18#include "executor/executor.h"
19#include "util/loading/factory.h"
20#include "util/loading/load_param.h"
21
22
23#include "mount_point.h"
24#include "debug.h"
25#include "state.h"
26
27
28ObjectListDefinition(MountPoint);
29CREATE_FACTORY(MountPoint);
30
31
32/**
33 * construct
34 */
[10184]35MountPoint::MountPoint (const Vector& up, const Vector& forward, const Vector& center, const std::string& name)
[10050]36{
[10184]37
38  this->name = name;
39  this->setAbsCoor( center);
40  this->setAbsDir( Quaternion(forward, up));
41
[10050]42  this->init();
43}
44
45
46/**
47 * constructor
48 * @param root the xml root element
49 */
50MountPoint::MountPoint(const TiXmlElement* root)
51{
52  this->init();
53
54  if( root != NULL)
55    this->loadParams(root);
56}
57
58
59/**
60 * deconstructor
61 */
62MountPoint::~MountPoint ()
63{}
64
65
66/**
67 * initializing function
68 */
69void MountPoint::init()
70{
71  this->registerObject(this, MountPoint::_objectList);
72  this->toList(OM_GROUP_00);
[10057]73
[10058]74  this->_mount = NULL;
[10050]75}
76
77
78/**
79 * loads the Settings of a MD2Creature from an XML-element.
80 * @param root the XML-element to load the MD2Creature's properties from
81 */
82void MountPoint::loadParams(const TiXmlElement* root)
83{
84  WorldEntity::loadParams(root);
85}
86
87
88
89/**
90 * tick
91 * @param time  time passed since the last tick
92 */
93void MountPoint::tick (float time)
94{
95
96
97}
98
99
100/**
101 * draw this entity
102 */
103void MountPoint::draw() const
104{
105
106}
107
108
109
110/**
111 *  function called to draw the mount point itself for debug purposes only
112 */
113void MountPoint::debugDraw() const
114{
115
116}
[10057]117
118
119/**
120 * adds an entity to this mount point
121 * @param entity entity to be added
122 */
123void MountPoint::mount(WorldEntity* entity)
[10058]124{
125  this->_mount = entity;
126}
[10057]127
128
129/**
130 * removes an entity from this mount point
131 */
132void MountPoint::unmount()
[10058]133{
134  this->_mount = NULL;
135}
136
Note: See TracBrowser for help on using the repository browser.