Changeset 4646 in orxonox.OLD for orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
- Timestamp:
- Jun 16, 2005, 11:43:28 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
r4640 r4646 27 27 #include "md2Model.h" 28 28 29 #include "graphics_engine.h" 29 30 30 31 … … 36 37 void Framework::moduleInit(int argc, char** argv) 37 38 { 39 GraphicsEngine::getInstance()->setWindowName("Collision Cluster", "collision"); 40 38 41 CDEngine::getInstance(); 39 CDEngine::getInstance()->debug();40 41 //model = new MD2Model("models/tris.md2", "models/tris.pcx");42 //model->tick(0.1f);42 //CDEngine::getInstance()->debug(); 43 44 model = new MD2Model("models/tris.md2", "models/tris.pcx"); 45 model->tick(0.1f); 43 46 44 47 // int const length = 6; … … 53 56 // } 54 57 55 //CDEngine::getInstance()->debugSpawnTree(3, model->data->pVertices, model->data->numVertices);58 CDEngine::getInstance()->debugSpawnTree(9, model->data->pVertices, model->data->numVertices); 56 59 57 60 … … 210 213 } 211 214 212 /* 215 int boxPolygons(GtkWidget* nonInterest, void* widget) 216 { 217 if(drawMode & DRAW_BV_POLYGON) 218 { 219 int temp = drawMode & DRAW_BV_POLYGON; 220 drawMode ^= temp; 221 printf("Removing OBB Polygons\n"); 222 } 223 else 224 { 225 drawMode |= DRAW_BV_POLYGON; 226 printf("Drawing OBB Polygons\n"); 227 } 228 } 229 230 int seperatingPlanes(GtkWidget* nonInterest, void* widget) 231 { 232 if(drawMode & DRAW_SEPARATING_PLANE) 233 { 234 int temp = drawMode & DRAW_SEPARATING_PLANE; 235 drawMode ^= temp; 236 printf("Removing Separation Plane\n"); 237 } 238 else 239 { 240 drawMode |= DRAW_SEPARATING_PLANE; 241 printf("Drawing Separation Plane\n"); 242 } 243 } 244 245 int treeDepth(GtkWidget* nonInterest, void* widget) 246 { 247 Option* option = (Option*) widget; 248 const char* name = option->getTitle(); 249 char* value = option->save(); 250 251 depth = atoi(value); 252 printf("Setting tree depth = %i\n", depth); 253 int temp = drawMode & DRAW_ALL; 254 drawMode ^= temp; 255 drawMode |= DRAW_SINGLE; 256 257 delete value; 258 } 259 260 213 261 void Framework::moduleInitGui(int argc, char** argv) 214 262 { … … 219 267 guiMainWindow = new Window("Collision_detection"); 220 268 { 221 //all the Widgets you need 269 Box* windowBox = new Box('v'); 270 { 271 CheckButton* BoxPolygons = new CheckButton("BoxPolygons"); 272 BoxPolygons->connectSignal("clicked", (void*)BoxPolygons, boxPolygons); 273 windowBox->fill(BoxPolygons); 274 275 276 CheckButton* SeperatingPlanes = new CheckButton("SeperatingPlanes"); 277 SeperatingPlanes->connectSignal("clicked", (void*)SeperatingPlanes, seperatingPlanes); 278 windowBox->fill(SeperatingPlanes); 279 280 Slider* TreeDepth = new Slider("TreeDepth", 0, 5); 281 TreeDepth->connectSignal("value_changed", (void*)TreeDepth, treeDepth); 282 windowBox->fill(TreeDepth); 283 } 284 guiMainWindow->fill(windowBox); 222 285 } 223 286 Window::mainWindow->showall(); 224 287 Window::mainWindow->setSize(300, 500); 225 288 } 226 */
Note: See TracChangeset
for help on using the changeset viewer.