Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4615 in orxonox.OLD


Ignore:
Timestamp:
Jun 13, 2005, 1:26:25 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: modified the cd subproject, so it loads an md2 file now. the polygons are rendered black, so the bounding box is not viewable! Must render them in another color:)

Location:
orxonox/trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/collision_detection/cd_engine.cc

    r4551 r4615  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    1919#include "obb_tree.h"
    2020#include "debug.h"
     21#include "abstract_model.h"
    2122
    2223using namespace std;
     
    2627   \brief standard constructor
    2728*/
    28 CDEngine::CDEngine () 
     29CDEngine::CDEngine ()
    2930{
    3031   this->setClassName("CDEngine");
    31    this->setClassID(CL_CD_ENGINE, "CDEngine"); 
     32   this->setClassID(CL_CD_ENGINE, "CDEngine");
    3233
    3334   /* testing purposes only: */
     
    4445
    4546*/
    46 CDEngine::~CDEngine () 
     47CDEngine::~CDEngine ()
    4748{
    4849  CDEngine::singletonRef = NULL;
     
    7475  this->rootTree->debug();
    7576  PRINT(0)("=  CDEngine: Spawning Tree: Finished\n");
    76   PRINT(0)("=======================================================\n");     
     77  PRINT(0)("=======================================================\n");
    7778
    7879}
     80
     81void CDEngine::debugSpawnTree(int depth, sVec3D* vertices, int numVertices)
     82{
     83  this->rootTree->spawnBVTree(depth, vertices, numVertices);
     84}
  • orxonox/trunk/src/lib/collision_detection/cd_engine.h

    r4551 r4615  
    1 /*! 
     1/*!
    22    \file cd_engine.h
    33    \brief Definition of the collision detection engine
    4    
     4
    55*/
    66
     
    1010#include "base_object.h"
    1111#include "collision_defs.h"
     12#include "abstract_model.h"
    1213
    1314template<class T> class tList;
     
    5051
    5152  void debug();
     53  void debugSpawnTree(int depth, sVec3D* vertices, int numVertices);
    5254
    5355 private:
  • orxonox/trunk/src/lib/collision_detection/obb_tree.cc

    r4612 r4615  
    107107    }
    108108
    109   this->spawnBVTree(1, vertList, length);
     109  this->spawnBVTree(2, vertList, length);
    110110
    111111  PRINT(0)("=  Spawning Tree: Finished\n");
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc

    r4614 r4615  
    389389void OBBTreeNode::drawBV(int currentDepth, const int depth) const
    390390{
    391   glBegin(GL_LINE_LOOP);
    392   glColor3f(1.0, 1.0, 1.0);
    393   for(int i = 0; i < this->bvElement->numOfVertices; ++i)
    394     {
    395       glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
    396       //printf("v(%f, %f, %f)\n", this->vertices[i][0], this->vertices[i][1], this->vertices[i][2]);
    397     }
    398   glEnd();
     391//   glBegin(GL_LINE_LOOP);
     392//   glColor3f(1.0, 1.0, 1.0);
     393//   for(int i = 0; i < this->bvElement->numOfVertices; ++i)
     394//     {
     395//       glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
     396//       //printf("v(%f, %f, %f)\n", this->vertices[i][0], this->vertices[i][1], this->vertices[i][2]);
     397//     }
     398//   glEnd();
    399399}
    400400
  • orxonox/trunk/src/lib/graphics/importer/md2Model.h

    r4488 r4615  
    1 /*! 
     1/*!
    22    \file md2Model.h
    33    \brief Definition of an MD2 Model, a model format invented by ID Software.
    4    
     4
    55    We are deeply thankfull for all the wunderfull things id software made for us gamers!
    6    
     6
    77    The md2 file format is structured in a very simple way: it contains animations which are made out of
    88    frames (so called keyframes). Each frame is a complete draweable model in a specific position.
    99    A frame is a collection of vertex and its compagnions (normals, texture coordinates).
    10    
    11     A typical model has about 200 frames, the maximum frame count is fixed by MD2_MAX_FRAMES to currently 
     10
     11    A typical model has about 200 frames, the maximum frame count is fixed by MD2_MAX_FRAMES to currently
    1212    512 frames. The maximal vetices count is set to 2048 verteces, not enough?
    1313    You just have to change the MD2_MAX_* values if it doesn't fit your purposes...
    14    
     14
    1515    Surface Culling is fully implemented in md2 models: quake2 uses front face culling.
    1616*/
     
    2727#define MD2_IDENT                       (('2'<<24) + ('P'<<16) + ('D'<<8) + 'I') //!< the md2 identifier tag in the bin file
    2828#define MD2_VERSION                     8                                        //!< the md2 version in the header
    29 #define MD2_MAX_TRIANGLES               4096                                     //!< maximal triangles count
    30 #define MD2_MAX_VERTICES                2048                                     //!< maximal vertices count
    31 #define MD2_MAX_TEXCOORDS               2048                                     //!< maximal tex coordinates
    32 #define MD2_MAX_FRAMES                  512                                      //!< maximal frames
    33 #define MD2_MAX_SKINS                   32                                       //!< maximal skins
    34 #define MD2_MAX_FRAMESIZE               (MD2_MAX_VERTICES * 4 + 128)             //!< maximal framesize
     29#define MD2_MAX_TRIANGLES               4096                                     //!< maximal triangles count
     30#define MD2_MAX_VERTICES                2048                                     //!< maximal vertices count
     31#define MD2_MAX_TEXCOORDS               2048                                     //!< maximal tex coordinates
     32#define MD2_MAX_FRAMES                  512                                      //!< maximal frames
     33#define MD2_MAX_SKINS                   32                                       //!< maximal skins
     34#define MD2_MAX_FRAMESIZE               (MD2_MAX_VERTICES * 4 + 128)             //!< maximal framesize
    3535
    3636#define NUM_VERTEX_NORMALS              162                                      //!< number of vertex normals
     
    3838
    3939//! This stores the speed of the animation between each key frame - currently conflicting with the animation framework
    40 #define kAnimationSpeed                 12.0f                                    //!< animation speed
     40#define kAnimationSpeed                 12.0f                                    //!< animation speed
    4141
    4242//! This holds the header information that is read in at the beginning of the file: id software definition
    4343struct MD2Header
    44 { 
    45    int ident;                           //!< This is used to identify the file
    46    int version;                         //!< The version number of the file (Must be 8)
    47    
    48    int skinWidth;                       //!< The skin width in pixels
    49    int skinHeight;                      //!< The skin height in pixels
    50    int frameSize;                       //!< The size in bytes the frames are
    51    
    52    int numSkins;                        //!< The number of skins associated with the model
    53    int numVertices;                     //!< The number of vertices (constant for each frame)
    54    int numTexCoords;                    //!< The number of texture coordinates
    55    int numTriangles;                    //!< The number of faces (polygons)
    56    int numGlCommands;                   //!< The number of gl commands
    57    int numFrames;                       //!< The number of animation frames
    58    
    59    int offsetSkins;                     //!< The offset in the file for the skin data
    60    int offsetTexCoords;                 //!< The offset in the file for the texture data
    61    int offsetTriangles;                 //!< The offset in the file for the face data
    62    int offsetFrames;                    //!< The offset in the file for the frames data
    63    int offsetGlCommands;                //!< The offset in the file for the gl commands data
    64    int offsetEnd;                       //!< The end of the file offset
     44{
     45   int ident;                           //!< This is used to identify the file
     46   int version;                         //!< The version number of the file (Must be 8)
     47
     48   int skinWidth;                       //!< The skin width in pixels
     49   int skinHeight;                      //!< The skin height in pixels
     50   int frameSize;                       //!< The size in bytes the frames are
     51
     52   int numSkins;                        //!< The number of skins associated with the model
     53   int numVertices;                     //!< The number of vertices (constant for each frame)
     54   int numTexCoords;                    //!< The number of texture coordinates
     55   int numTriangles;                    //!< The number of faces (polygons)
     56   int numGlCommands;                   //!< The number of gl commands
     57   int numFrames;                       //!< The number of animation frames
     58
     59   int offsetSkins;                     //!< The offset in the file for the skin data
     60   int offsetTexCoords;                 //!< The offset in the file for the texture data
     61   int offsetTriangles;                 //!< The offset in the file for the face data
     62   int offsetFrames;                    //!< The offset in the file for the frames data
     63   int offsetGlCommands;                //!< The offset in the file for the gl commands data
     64   int offsetEnd;                       //!< The end of the file offset
    6565};
    6666
     
    8585    CROUCH_ATTACK,
    8686    CROUCH_PAIN,
    87     CROUCH_DEATH, 
     87    CROUCH_DEATH,
    8888    DEATH_FALLBACK,
    8989    DEATH_FALLFORWARD,
    9090    DEATH_FALLBACKSLOW,
    9191    BOOM,
    92  
     92
    9393    MAX_ANIMATIONS
    9494  };
     
    113113
    114114 public:
    115   int                numFrames;             //!< number of frames   
     115  int                numFrames;             //!< number of frames
    116116  int                numVertices;           //!< number of vertices
    117117  int                numTriangles;          //!< number of triangles
     
    125125  int*               pLightNormals;         //!< pointer to the light normals
    126126
    127   Material*          material;              //!< pointer to the material 
     127  Material*          material;              //!< pointer to the material
    128128  float              scaleFactor;           //!< the scale factor of the model, (global)
    129129};
     
    136136  MD2Model(const char* modelFileName, const char* skinFileName = NULL);
    137137  virtual ~MD2Model();
    138    
     138
    139139  void draw();
    140  
     140
    141141  void setAnim(int type);
    142142  /**
    143      \brief scales the current model 
     143     \brief scales the current model
    144144     \param scaleFactor: the factor [0..1] to use for scaling
    145145  */
     
    151151
    152152private:
    153   void animate(); 
     153  void animate();
    154154  void processLighting();
    155155  void interpolate(sVec3D* verticesList);
     
    162162  static sAnim        animationList[21];                //!< the anomation list
    163163
    164  private:
    165164  MD2Data*            data;                             //!< the md2 data pointer
    166165
     166 private:
    167167  float               scaleFactor;                      //!< the scale factor (individual)
    168168  sAnimState          animationState;                   //!< animation state of the model
  • orxonox/trunk/src/subprojects/collision_detection/Makefile.am

    r4612 r4615  
    1313                  $(MAINSRCDIR)/lib/newmat/libnewmat.a \
    1414                  $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) \
    15                   -lpthread
     15                  -lpthread
    1616
    1717collision_CPPFLAGS =  -DGUI_MODULE \
    18                       $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
     18                      $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
    1919
    2020collision_SOURCES= ../framework.cc \
    21                    collision_detection.cc \
    22                    $(MAINSRCDIR)/util/loading/load_param.cc \
    23                    $(MAINSRCDIR)/lib/util/substring.cc \                   
    24                    $(MAINSRCDIR)/lib/util/ini_parser.cc \
    25                    $(MAINSRCDIR)/lib/graphics/light.cc \
    26                    $(MAINSRCDIR)/util/state.cc \
    27                    $(MAINSRCDIR)/world_entities/camera.cc \
    28                    $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
    29                    $(MAINSRCDIR)/lib/lang/base_object.cc \
    30                    $(MAINSRCDIR)/lib/math/vector.cc \
    31                    $(MAINSRCDIR)/util/resource_manager.cc \
    32                    $(MAINSRCDIR)/lib/graphics/text_engine.cc \
    33                    $(MAINSRCDIR)/lib/coord/p_node.cc \
    34                    $(MAINSRCDIR)/lib/coord/null_parent.cc \
    35                    $(MAINSRCDIR)/lib/gui/gui_gtk.cc \
    36                    $(MAINSRCDIR)/lib/newmat/include.h \
    37                    $(MAINSRCDIR)/lib/newmat/newmat.h \
    38                    $(MAINSRCDIR)/lib/newmat/newmatap.h \
    39                    $(MAINSRCDIR)/lib/newmatio.h
     21                   collision_detection.cc \
     22                   $(MAINSRCDIR)/util/loading/load_param.cc \
     23                   $(MAINSRCDIR)/lib/util/substring.cc \
     24                   $(MAINSRCDIR)/lib/util/ini_parser.cc \
     25                   $(MAINSRCDIR)/lib/graphics/light.cc \
     26                   $(MAINSRCDIR)/lib/graphics/importer/md2Model.cc \
     27                   $(MAINSRCDIR)/util/state.cc \
     28                   $(MAINSRCDIR)/world_entities/camera.cc \
     29                   $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
     30                   $(MAINSRCDIR)/lib/lang/base_object.cc \
     31                   $(MAINSRCDIR)/lib/math/vector.cc \
     32                   $(MAINSRCDIR)/util/resource_manager.cc \
     33                   $(MAINSRCDIR)/lib/graphics/text_engine.cc \
     34                   $(MAINSRCDIR)/lib/coord/p_node.cc \
     35                   $(MAINSRCDIR)/lib/coord/null_parent.cc \
     36                   $(MAINSRCDIR)/lib/gui/gui_gtk.cc \
     37                   $(MAINSRCDIR)/lib/newmat/include.h \
     38                   $(MAINSRCDIR)/lib/newmat/newmat.h \
     39                   $(MAINSRCDIR)/lib/newmat/newmatap.h \
     40                   $(MAINSRCDIR)/lib/newmatio.h
  • orxonox/trunk/src/subprojects/collision_detection/Makefile.in

    r4612 r4615  
    5555        collision-load_param.$(OBJEXT) collision-substring.$(OBJEXT) \
    5656        collision-ini_parser.$(OBJEXT) collision-light.$(OBJEXT) \
    57         collision-state.$(OBJEXT) collision-camera.$(OBJEXT) \
    58         collision-graphics_engine.$(OBJEXT) \
     57        collision-md2Model.$(OBJEXT) collision-state.$(OBJEXT) \
     58        collision-camera.$(OBJEXT) collision-graphics_engine.$(OBJEXT) \
    5959        collision-base_object.$(OBJEXT) collision-vector.$(OBJEXT) \
    6060        collision-resource_manager.$(OBJEXT) \
     
    8383@AMDEP_TRUE@    ./$(DEPDIR)/collision-light.Po \
    8484@AMDEP_TRUE@    ./$(DEPDIR)/collision-load_param.Po \
     85@AMDEP_TRUE@    ./$(DEPDIR)/collision-md2Model.Po \
    8586@AMDEP_TRUE@    ./$(DEPDIR)/collision-null_parent.Po \
    8687@AMDEP_TRUE@    ./$(DEPDIR)/collision-p_node.Po \
     
    221222                  $(MAINSRCDIR)/lib/newmat/libnewmat.a \
    222223                  $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) \
    223                   -lpthread
     224                  -lpthread
    224225
    225226collision_CPPFLAGS = -DGUI_MODULE \
    226                       $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
     227                      $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
    227228
    228229collision_SOURCES = ../framework.cc \
    229                    collision_detection.cc \
    230                    $(MAINSRCDIR)/util/loading/load_param.cc \
    231                    $(MAINSRCDIR)/lib/util/substring.cc \
    232                    $(MAINSRCDIR)/lib/util/ini_parser.cc \
    233                    $(MAINSRCDIR)/lib/graphics/light.cc \
    234                    $(MAINSRCDIR)/util/state.cc \
    235                    $(MAINSRCDIR)/world_entities/camera.cc \
    236                    $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
    237                    $(MAINSRCDIR)/lib/lang/base_object.cc \
    238                    $(MAINSRCDIR)/lib/math/vector.cc \
    239                    $(MAINSRCDIR)/util/resource_manager.cc \
    240                    $(MAINSRCDIR)/lib/graphics/text_engine.cc \
    241                    $(MAINSRCDIR)/lib/coord/p_node.cc \
    242                    $(MAINSRCDIR)/lib/coord/null_parent.cc \
    243                    $(MAINSRCDIR)/lib/gui/gui_gtk.cc \
    244                    $(MAINSRCDIR)/lib/newmat/include.h \
    245                    $(MAINSRCDIR)/lib/newmat/newmat.h \
    246                    $(MAINSRCDIR)/lib/newmat/newmatap.h \
    247                    $(MAINSRCDIR)/lib/newmatio.h
     230                   collision_detection.cc \
     231                   $(MAINSRCDIR)/util/loading/load_param.cc \
     232                   $(MAINSRCDIR)/lib/util/substring.cc \
     233                   $(MAINSRCDIR)/lib/util/ini_parser.cc \
     234                   $(MAINSRCDIR)/lib/graphics/light.cc \
     235                   $(MAINSRCDIR)/lib/graphics/importer/md2Model.cc \
     236                   $(MAINSRCDIR)/util/state.cc \
     237                   $(MAINSRCDIR)/world_entities/camera.cc \
     238                   $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
     239                   $(MAINSRCDIR)/lib/lang/base_object.cc \
     240                   $(MAINSRCDIR)/lib/math/vector.cc \
     241                   $(MAINSRCDIR)/util/resource_manager.cc \
     242                   $(MAINSRCDIR)/lib/graphics/text_engine.cc \
     243                   $(MAINSRCDIR)/lib/coord/p_node.cc \
     244                   $(MAINSRCDIR)/lib/coord/null_parent.cc \
     245                   $(MAINSRCDIR)/lib/gui/gui_gtk.cc \
     246                   $(MAINSRCDIR)/lib/newmat/include.h \
     247                   $(MAINSRCDIR)/lib/newmat/newmat.h \
     248                   $(MAINSRCDIR)/lib/newmat/newmatap.h \
     249                   $(MAINSRCDIR)/lib/newmatio.h
    248250
    249251all: all-am
     
    322324@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-light.Po@am__quote@
    323325@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-load_param.Po@am__quote@
     326@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-md2Model.Po@am__quote@
    324327@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-null_parent.Po@am__quote@
    325328@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-p_node.Po@am__quote@
     
    441444@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    442445@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-light.obj `if test -f '$(MAINSRCDIR)/lib/graphics/light.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/light.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/light.cc'; fi`
     446
     447collision-md2Model.o: $(MAINSRCDIR)/lib/graphics/importer/md2Model.cc
     448@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-md2Model.o -MD -MP -MF "$(DEPDIR)/collision-md2Model.Tpo" -c -o collision-md2Model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc; \
     449@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-md2Model.Tpo" "$(DEPDIR)/collision-md2Model.Po"; else rm -f "$(DEPDIR)/collision-md2Model.Tpo"; exit 1; fi
     450@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc' object='collision-md2Model.o' libtool=no @AMDEPBACKSLASH@
     451@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/collision-md2Model.Po' tmpdepfile='$(DEPDIR)/collision-md2Model.TPo' @AMDEPBACKSLASH@
     452@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     453@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-md2Model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc
     454
     455collision-md2Model.obj: $(MAINSRCDIR)/lib/graphics/importer/md2Model.cc
     456@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-md2Model.obj -MD -MP -MF "$(DEPDIR)/collision-md2Model.Tpo" -c -o collision-md2Model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc'; fi`; \
     457@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-md2Model.Tpo" "$(DEPDIR)/collision-md2Model.Po"; else rm -f "$(DEPDIR)/collision-md2Model.Tpo"; exit 1; fi
     458@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc' object='collision-md2Model.obj' libtool=no @AMDEPBACKSLASH@
     459@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/collision-md2Model.Po' tmpdepfile='$(DEPDIR)/collision-md2Model.TPo' @AMDEPBACKSLASH@
     460@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     461@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-md2Model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/md2Model.cc'; fi`
    443462
    444463collision-state.o: $(MAINSRCDIR)/util/state.cc
  • orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc

    r4552 r4615  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    2424#include "cd_engine.h"
    2525
     26#include "md2Model.h"
     27
     28MD2Model* model;
     29
    2630void Framework::moduleInit(int argc, char** argv)
    2731{
    2832  CDEngine::getInstance();
    29   CDEngine::getInstance()->debug();
    30  
     33  //CDEngine::getInstance()->debug();
    3134
     35  model = new MD2Model("models/tris.md2", "models/tris.pcx");
     36  model->tick(0.1f);
     37  CDEngine::getInstance()->debugSpawnTree(1, model->data->pVertices, model->data->numVertices);
    3238
    3339  LightManager* lightMan = LightManager::getInstance();
     
    4551    case SDL_KEYDOWN:
    4652      switch (event->key.keysym.sym)
    47         {
    48         case SDLK_i:
    49           break;
    50         }
     53        {
     54        case SDLK_i:
     55          break;
     56        }
    5157    }
    5258}
     
    6369
    6470  LightManager::getInstance()->draw();
     71
     72  model->draw();
    6573}
    6674
     
    7785{
    7886  Window* guiMainWindow = NULL;
    79  
     87
    8088  initGUI(0, NULL);
    81  
     89
    8290  guiMainWindow = new Window("Collision_detection");
    8391  {
Note: See TracChangeset for help on using the changeset viewer.