Changeset 4636 in orxonox.OLD for orxonox/trunk/src/subprojects
- Timestamp:
- Jun 15, 2005, 10:38:15 PM (19 years ago)
- Location:
- orxonox/trunk/src/subprojects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
r4635 r4636 27 27 #include "md2Model.h" 28 28 29 30 31 29 32 MD2Model* model; 33 int drawMode; 34 int depth; 30 35 31 36 void Framework::moduleInit(int argc, char** argv) … … 48 53 // } 49 54 50 CDEngine::getInstance()->debugSpawnTree( 3, model->data->pVertices, model->data->numVertices);55 CDEngine::getInstance()->debugSpawnTree(7, model->data->pVertices, model->data->numVertices); 51 56 52 57 … … 56 61 lightMan->addLight(); 57 62 lightMan->setPosition(10, 20, 100); 63 64 drawMode = DRAW_MODEL; 65 depth = 2; 66 67 printf("\n\n==========================="); 68 printf("Collision Detection Modler:\n"); 69 printf("Key Bindings:\n"); 70 printf(" -| Displaying Polygons\t\t p\n"); 71 printf(" -| Displaying Separation Plane\t s\n"); 72 printf("\n"); 73 printf(" -| Tree Depth 1\t\t 1\n"); 74 printf(" -| Tree Depth 2\t\t 2\n"); 75 printf(" -| Tree Depth 3\t\t 3\n"); 76 printf(" -| Tree Depth 4\t\t 4\n"); 77 printf(" -| Tree Depth 5\t\t 5\n"); 78 printf("===========================\n\n"); 58 79 } 59 80 … … 66 87 switch (event->key.keysym.sym) 67 88 { 68 case SDLK_i: 89 case SDLK_a: 90 drawMode |= DRAW_ALL; 69 91 break; 70 92 case SDLK_1: 71 printf("alsjdf;lajsfd;lajsdf\n"); 72 break; 93 { 94 printf("Setting tree depth = 1\n"); 95 depth = 1; 96 int temp = drawMode & DRAW_ALL; 97 drawMode ^= temp; 98 drawMode |= DRAW_SINGLE; 99 break; 100 } 101 case SDLK_2: 102 { 103 printf("Setting tree depth = 2\n"); 104 depth = 2; 105 int temp = drawMode & DRAW_ALL; 106 drawMode ^= temp; 107 drawMode |= DRAW_SINGLE; 108 break; 109 } 110 case SDLK_3: 111 { 112 printf("Setting tree depth = 3\n"); 113 depth = 3; 114 int temp = drawMode & DRAW_ALL; 115 drawMode ^= temp; 116 drawMode |= DRAW_SINGLE; 117 break; 118 } 119 case SDLK_4: 120 { 121 printf("Setting tree depth = 4\n"); 122 depth = 4; 123 int temp = drawMode & DRAW_ALL; 124 drawMode ^= temp; 125 drawMode |= DRAW_SINGLE; 126 break; 127 } 128 case SDLK_5: 129 { 130 printf("Setting tree depth = 5\n"); 131 depth = 5; 132 int temp = drawMode & DRAW_ALL; 133 drawMode ^= temp; 134 drawMode |= DRAW_SINGLE; 135 break; 136 } 137 case SDLK_6: 138 { 139 printf("Setting tree depth = 6\n"); 140 depth = 6; 141 int temp = drawMode & DRAW_ALL; 142 drawMode ^= temp; 143 drawMode |= DRAW_SINGLE; 144 break; 145 } 146 case SDLK_s: 147 if(drawMode & DRAW_SEPARATING_PLANE) 148 { 149 int temp = drawMode & DRAW_SEPARATING_PLANE; 150 drawMode ^= temp; 151 printf("Removing Separation Plane\n"); 152 } 153 else 154 { 155 drawMode |= DRAW_SEPARATING_PLANE; 156 printf("Drawing Separation Plane\n"); 157 } 158 159 break; 160 case SDLK_p: 161 if(drawMode & DRAW_BV_POLYGON) 162 { 163 int temp = drawMode & DRAW_BV_POLYGON; 164 drawMode ^= temp; 165 printf("Removing OBB Polygons\n"); 166 } 167 else 168 { 169 drawMode |= DRAW_BV_POLYGON; 170 printf("Drawing OBB Polygons\n"); 171 } 172 break; 173 73 174 } 74 175 } … … 83 184 void Framework::moduleDraw() const 84 185 { 85 CDEngine::getInstance()->drawBV( 2, DRAW_MODEL);186 CDEngine::getInstance()->drawBV(depth, drawMode); 86 187 87 188 LightManager::getInstance()->draw(); -
orxonox/trunk/src/subprojects/framework.cc
r4554 r4636 171 171 #endif 172 172 break; 173 case SDLK_ a:173 case SDLK_t: 174 174 camera->setRelCoor(camera->getRelCoor() + (camera->getTarget()->getAbsCoor() - camera->getAbsCoor())*.1); 175 175 break; … … 184 184 this->printHelp(); 185 185 break; 186 case SDLK_ 2:186 case SDLK_l: 187 187 for (int i = 0; i < 3; i++) 188 188 {
Note: See TracChangeset
for help on using the changeset viewer.