Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc @ 4598

Last change on this file since 4598 was 4552, checked in by patrick, 19 years ago

orxonox/trunk: data now gets displayed in the viewer. nothing fancy yet

File size: 1.6 KB
Line 
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:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14
15   this file extends the framework file, so it renders what i want.
16*/
17
18#include "framework.h"
19
20#include "fields.h"
21#include "stdlibincl.h"
22#include "light.h"
23
24#include "cd_engine.h"
25
26void Framework::moduleInit(int argc, char** argv)
27{
28  CDEngine::getInstance();
29  CDEngine::getInstance()->debug();
30 
31
32
33  LightManager* lightMan = LightManager::getInstance();
34  lightMan->setAmbientColor(.1,.1,.1);
35  lightMan->addLight();
36  lightMan->addLight();
37  lightMan->setPosition(10, 20, 100);
38}
39
40
41void Framework::moduleEventHandler(SDL_Event* event)
42{
43  switch (event->type)
44    {
45    case SDL_KEYDOWN:
46      switch (event->key.keysym.sym)
47        {
48        case SDLK_i:
49          break;
50        }
51    }
52}
53
54
55void Framework::moduleTick(float dt)
56{
57}
58
59
60void Framework::moduleDraw() const
61{
62  CDEngine::getInstance()->drawBV(1,1);
63
64  LightManager::getInstance()->draw();
65}
66
67
68void Framework::moduleHelp(void) const
69{
70  PRINT(0)("\n");
71  PRINT(0)("i - print debug information of Collision-detection\n");
72  PRINT(0)("\n");
73}
74
75
76void Framework::moduleInitGui(int argc, char** argv)
77{
78  Window* guiMainWindow = NULL;
79 
80  initGUI(0, NULL);
81 
82  guiMainWindow = new Window("Collision_detection");
83  {
84    // all the Widgets you need
85  }
86  Window::mainWindow->showall();
87  Window::mainWindow->setSize(300, 500);
88}
Note: See TracBrowser for help on using the repository browser.