Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3360 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Jan 6, 2005, 9:37:39 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/parenting: Importer: moved object.h → model.h and renamed it everywhere.

Location:
orxonox/branches/parenting/src
Files:
11 edited
2 moved

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/Makefile.am

    r3357 r3360  
    2424                 story_entity.cc \
    2525                 environment.cc \
    26                  importer/object.cc \
     26                 importer/model.cc \
    2727                 importer/array.cc \
    2828                 importer/material.cc \
  • orxonox/branches/parenting/src/Makefile.in

    r3357 r3360  
    5959        track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \
    6060        campaign.$(OBJEXT) story_entity.$(OBJEXT) \
    61         environment.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \
     61        environment.$(OBJEXT) model.$(OBJEXT) array.$(OBJEXT) \
    6262        material.$(OBJEXT) texture.$(OBJEXT) list.$(OBJEXT) \
    6363        p_node.$(OBJEXT) null_parent.$(OBJEXT) base_object.$(OBJEXT) \
     
    8181@AMDEP_TRUE@    ./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
    8282@AMDEP_TRUE@    ./$(DEPDIR)/list.Po ./$(DEPDIR)/material.Po \
    83 @AMDEP_TRUE@    ./$(DEPDIR)/matrix.Po ./$(DEPDIR)/null_parent.Po \
    84 @AMDEP_TRUE@    ./$(DEPDIR)/object.Po ./$(DEPDIR)/orxonox.Po \
     83@AMDEP_TRUE@    ./$(DEPDIR)/matrix.Po ./$(DEPDIR)/model.Po \
     84@AMDEP_TRUE@    ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/orxonox.Po \
    8585@AMDEP_TRUE@    ./$(DEPDIR)/p_node.Po ./$(DEPDIR)/player.Po \
    8686@AMDEP_TRUE@    ./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/texture.Po \
     
    222222                 story_entity.cc \
    223223                 environment.cc \
    224                  importer/object.cc \
     224                 importer/model.cc \
    225225                 importer/array.cc \
    226226                 importer/material.cc \
     
    299299          esac; \
    300300        done; \
    301         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
     301        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
    302302        cd $(top_srcdir) && \
    303           $(AUTOMAKE) --gnu  src/Makefile
     303          $(AUTOMAKE) --foreign  src/Makefile
    304304.PRECIOUS: Makefile
    305305Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    370370@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
    371371@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Po@am__quote@
     372@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
    372373@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@
    373 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@
    374374@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@
    375375@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@
     
    399399@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    400400
    401 object.o: importer/object.cc
    402 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.o -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc; \
    403 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
    404 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='importer/object.cc' object='object.o' libtool=no @AMDEPBACKSLASH@
    405 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.TPo' @AMDEPBACKSLASH@
    406 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    407 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc
    408 
    409 object.obj: importer/object.cc
    410 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.obj -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`; \
    411 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
    412 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='importer/object.cc' object='object.obj' libtool=no @AMDEPBACKSLASH@
    413 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.TPo' @AMDEPBACKSLASH@
    414 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    415 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`
     401model.o: importer/model.cc
     402@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.o -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.o `test -f 'importer/model.cc' || echo '$(srcdir)/'`importer/model.cc; \
     403@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi
     404@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='importer/model.cc' object='model.o' libtool=no @AMDEPBACKSLASH@
     405@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@
     406@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     407@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.o `test -f 'importer/model.cc' || echo '$(srcdir)/'`importer/model.cc
     408
     409model.obj: importer/model.cc
     410@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.obj -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.obj `if test -f 'importer/model.cc'; then $(CYGPATH_W) 'importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/importer/model.cc'; fi`; \
     411@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi
     412@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='importer/model.cc' object='model.obj' libtool=no @AMDEPBACKSLASH@
     413@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@
     414@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     415@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.obj `if test -f 'importer/model.cc'; then $(CYGPATH_W) 'importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/importer/model.cc'; fi`
    416416
    417417array.o: importer/array.cc
  • orxonox/branches/parenting/src/environment.cc

    r3336 r3360  
    2121#include "world_entity.h"
    2222#include "vector.h"
    23 #include "importer/object.h"
     23#include "importer/model.h"
    2424
    2525using namespace std;
     
    2929Environment::Environment () : WorldEntity()
    3030{
    31   this->model = new Object("reaplow.obj");
     31  this->model = new Model("reaplow.obj");
    3232}
    3333
  • orxonox/branches/parenting/src/importer/Makefile.am

    r3340 r3360  
    88importer_SOURCES= framework.cc \
    99                  windowHandler.cc \
    10                   object.cc \
     10                  model.cc \
    1111                  array.cc \
    1212                  material.cc \
     
    1616noinst_HEADERS= framework.h \
    1717                windowHandler.h \
    18                 object.h \
     18                model.h \
    1919                array.h \
    2020                material.h \
  • orxonox/branches/parenting/src/importer/Makefile.in

    r3353 r3360  
    5454PROGRAMS = $(bin_PROGRAMS)
    5555am_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \
    56         object.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT) \
     56        model.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT) \
    5757        texture.$(OBJEXT) vector.$(OBJEXT)
    5858importer_OBJECTS = $(am_importer_OBJECTS)
     
    6262am__depfiles_maybe = depfiles
    6363@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/framework.Po \
    64 @AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/object.Po \
     64@AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \
    6565@AMDEP_TRUE@    ./$(DEPDIR)/texture.Po ./$(DEPDIR)/vector.Po \
    6666@AMDEP_TRUE@    ./$(DEPDIR)/windowHandler.Po
     
    177177importer_SOURCES = framework.cc \
    178178                  windowHandler.cc \
    179                   object.cc \
     179                  model.cc \
    180180                  array.cc \
    181181                  material.cc \
     
    185185noinst_HEADERS = framework.h \
    186186                windowHandler.h \
    187                 object.h \
     187                model.h \
    188188                array.h \
    189189                material.h \
     
    259259@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framework.Po@am__quote@
    260260@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
    261 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@
     261@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
    262262@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
    263263@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
  • orxonox/branches/parenting/src/importer/framework.cc

    r3340 r3360  
    7171  PRINTF(2)("screensize: %i, %i\n", wHandler.screen->w, wHandler.screen->h);
    7272  if (argc>=3)
    73     obj = new Object (argv[1], atof(argv[2]));
     73    obj = new Model (argv[1], atof(argv[2]));
    7474  else if (argc>=2)
    75     obj = new Object(argv[1]);
     75    obj = new Model(argv[1]);
    7676  else
    77     obj = new Object();
     77    obj = new Model();
    7878 
    7979  M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0);
     
    215215          case SDLK_c:
    216216            if (!obj)
    217               obj = new Object(argv[1]);
     217              obj = new Model(argv[1]);
    218218            break;
    219219          }
  • orxonox/branches/parenting/src/importer/framework.h

    r2963 r3360  
    33 
    44#include "windowHandler.h" // Include the Whandler Basecode
    5 #include "object.h"
     5#include "model.h"
    66#include "vector.h"
    77
     
    3333
    3434WindowHandler wHandler;  // Create an instance of the whandler basecode class
    35 Object* obj;
     35Model* obj;
    3636
    3737
  • orxonox/branches/parenting/src/importer/model.cc

    r3357 r3360  
    1414*/
    1515
    16 #include "object.h"
     16#include "model.h"
    1717int verbose = 1; //! \todo should be GLOBAL
    1818using namespace std;
    1919
    2020/**
    21    \brief Creates a 3D-Object, but does not load any 3D-models.
    22 
    23    This Constructor is pretty useless, because why load no object in an object-loader??
    24 */
    25 Object::Object ()
     21   \brief Creates a 3D-Model, but does not load any 3D-models.
     22
     23   This Constructor is pretty useless, because why load no model in an model-loader??
     24*/
     25Model::Model ()
    2626{
    2727
    2828  this->initialize();
    2929
    30   this->BoxObject();
     30  this->BoxModel();
    3131
    3232  this->importToGL ();
     
    3636
    3737/**
    38    \brief Crates a 3D-Object and loads in a File.
     38   \brief Crates a 3D-Model and loads in a File.
    3939   \param fileName file to parse and load (must be a .obj file)
    4040*/
    41 Object::Object(char* fileName)
     41Model::Model(char* fileName)
    4242{
    4343  this->initialize();
     
    5151
    5252/**
    53    \brief Crates a 3D-Object, loads in a File and scales it.
     53   \brief Crates a 3D-Model, loads in a File and scales it.
    5454   \param fileName file to parse and load (must be a .obj file)
    55    \param scaling The factor that the object will be scaled with.
    56 */
    57 Object::Object(char* fileName, float scaling)
     55   \param scaling The factor that the model will be scaled with.
     56*/
     57Model::Model(char* fileName, float scaling)
    5858{
    5959  this->initialize();
     
    6868
    6969/**
    70    \brief deletes an Object.
    71 
    72    Looks if any from object allocated space is still in use, and if so deleted it.
    73 */
    74 Object::~Object()
     70   \brief deletes an Model.
     71
     72   Looks if any from model allocated space is still in use, and if so deleted it.
     73*/
     74Model::~Model()
    7575{
    7676  PRINTF(2)("Deleting display Lists.\n");
     
    9797
    9898/**
    99    \brief Draws the Objects of all Groups.
     99   \brief Draws the Models of all Groups.
    100100   It does this by just calling the Lists that must have been created earlier.
    101101*/
    102 void Object::draw (void) const
    103 {
    104   PRINTF(2)("drawing the 3D-Objects\n");
     102void Model::draw (void) const
     103{
     104  PRINTF(2)("drawing the 3D-Models\n");
    105105  Group* walker = this->firstGroup;
    106106  while (walker != NULL)
    107107    {
    108       PRINTF(3)("Drawing object %s\n", walker->name);
     108      PRINTF(3)("Drawing model %s\n", walker->name);
    109109      glCallList (walker->listNumber);
    110110      walker = walker->next;
     
    113113
    114114/**
    115    \brief Draws the Object number groupNumber
     115   \brief Draws the Model number groupNumber
    116116   \param groupNumber The number of the group that will be displayed.
    117117
    118118   It does this by just calling the List that must have been created earlier.
    119119*/
    120 void Object::draw (int groupNumber) const
     120void Model::draw (int groupNumber) const
    121121{
    122122  if (groupNumber >= this->groupCount)
    123123    {
    124       PRINTF(1)("You requested object number %i, but this File only contains of %i Objects.\n", groupNumber-1, this->groupCount);
     124      PRINTF(1)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
    125125      return;
    126126    }
    127   PRINTF(2)("drawing the requested 3D-Objects if found.\n");
     127  PRINTF(2)("drawing the requested 3D-Models if found.\n");
    128128  Group* walker = this->firstGroup;
    129129  int counter = 0;
     
    132132      if (counter == groupNumber)
    133133        {
    134           PRINTF(2)("Drawing object number %i named %s\n", counter, walker->name);
     134          PRINTF(2)("Drawing model number %i named %s\n", counter, walker->name);
    135135          glCallList (walker->listNumber);
    136136          return;
     
    139139      walker = walker->next;
    140140    }
    141   PRINTF(1)("Object number %i in %s not Found.\n", groupNumber, this->objFileName);
     141  PRINTF(1)("Model number %i in %s not Found.\n", groupNumber, this->objFileName);
    142142  return;
    143143
     
    145145
    146146/**
    147    \brief Draws the Object with a specific groupName
     147   \brief Draws the Model with a specific groupName
    148148   \param groupName The name of the group that will be displayed.
    149149
    150150   It does this by just calling the List that must have been created earlier.
    151151*/
    152 void Object::draw (char* groupName) const
    153 {
    154   PRINTF(2)("drawing the requested 3D-Objects if found.\n");
     152void Model::draw (char* groupName) const
     153{
     154  PRINTF(2)("drawing the requested 3D-Models if found.\n");
    155155  Group* walker = this->firstGroup;
    156156  while (walker != NULL)
     
    158158      if (!strcmp(walker->name, groupName))
    159159        {
    160           PRINTF(2)("Drawing object %s\n", walker->name);
     160          PRINTF(2)("Drawing model %s\n", walker->name);
    161161          glCallList (walker->listNumber);
    162162          return;
     
    164164      walker = walker->next;
    165165    }
    166   PRINTF(1)("Object Named %s in %s not Found.\n", groupName, this->objFileName);
     166  PRINTF(1)("Model Named %s in %s not Found.\n", groupName, this->objFileName);
    167167  return;
    168168}
    169169
    170170/**
    171    \returns Count of the Objects in this File
    172 */
    173 int Object::getGroupCount (void) const
     171   \returns Count of the Models in this File
     172*/
     173int Model::getGroupCount (void) const
    174174{
    175175  return this->groupCount;
     
    177177
    178178/**
    179     \brief initializes the Object.
     179    \brief initializes the Model.
    180180
    181181    This Function initializes all the needed arrays, Lists and clientStates.
    182182    It also defines default values.
    183183*/
    184 bool Object::initialize (void)
    185 {
    186   PRINTF(2)("new 3D-Object is being created\n");
     184bool Model::initialize (void)
     185{
     186  PRINTF(2)("new 3D-Model is being created\n");
    187187
    188188  // setting the start group;
     
    206206
    207207/**
    208    \brief initializes a new Group object
     208   \brief initializes a new Group model
    209209   \param group the group that should be initialized.
    210210   \todo Maybe Group should be a Class, because it does a lot of stuff
    211211   
    212212*/
    213 bool Object::initGroup(Group* group)
     213bool Model::initGroup(Group* group)
    214214{
    215215  PRINTF(3)("Adding new Group\n");
     
    228228   \param face The face to initialize
    229229*/
    230 bool Object::initFace (Face* face)
     230bool Model::initFace (Face* face)
    231231{
    232232  face->vertexCount = 0;
     
    242242
    243243/**
    244    \brief finalizes an Object.
     244   \brief finalizes an Model.
    245245   This funcion is needed, to delete all the Lists, and arrays that are no more needed because they are already imported into openGL. This will be applied at the end of the importing Process.
    246246*/
    247 bool Object::cleanup(void)
    248 {
    249   PRINTF(3)("cleaning up the 3D-Object to save Memory.\n");
     247bool Model::cleanup(void)
     248{
     249  PRINTF(3)("cleaning up the 3D-Model to save Memory.\n");
    250250
    251251  if (this->vertices)
     
    264264   \param group the first Group to clean
    265265*/
    266 bool Object::cleanupGroup (Group* group)
     266bool Model::cleanupGroup (Group* group)
    267267{
    268268  PRINTF(3)("Cleaning up group\n");
     
    282282   \param face the first face to clean.
    283283*/
    284 bool Object::cleanupFace (Face* face)
     284bool Model::cleanupFace (Face* face)
    285285{
    286286  PRINTF(3)("Cleaning up Face\n");
     
    307307   \param faceElem the first FaceElement to clean.
    308308*/
    309 bool Object::cleanupFaceElement(FaceElement* faceElem)
     309bool Model::cleanupFaceElement(FaceElement* faceElem)
    310310{
    311311  if (faceElem->next != NULL)
     
    320320   \param fileName The file to import
    321321*/
    322 bool Object::importFile (char* fileName)
     322bool Model::importFile (char* fileName)
    323323{
    324324  PRINTF(3)("preparing to read in file: %s\n", fileName);
     
    361361   This function does read the file, parses it for the occurence of things like vertices, faces and so on, and executes the specific tasks
    362362*/
    363 bool Object::readFromObjFile (void)
     363bool Model::readFromObjFile (void)
    364364{
    365365  char* fileName = new char [strlen(objPath)+strlen(objFileName)+1];
     
    372372  if (OBJ_FILE->fail())
    373373    {
    374       PRINTF(1)("unable to open .OBJ file: %s\n Loading Box Object instead.\n", fileName);
    375       BoxObject();
     374      PRINTF(1)("unable to open .OBJ file: %s\n Loading Box Model instead.\n", fileName);
     375      BoxModel();
    376376      OBJ_FILE->close();
    377377      delete []fileName;
     
    443443
    444444   This function initializes a new Group.
    445    With it you should be able to import .obj-files with more than one Objects inside.
    446 */
    447 bool Object::readGroup (char* groupString)
     445   With it you should be able to import .obj-files with more than one Models inside.
     446*/
     447bool Model::readGroup (char* groupString)
    448448{
    449449  PRINTF(3)("Read Group: %s.\n", groupString);
     
    470470   If a vertex line is found this function will inject it into the vertex-Array
    471471*/
    472 bool Object::readVertex (char* vertexString)
     472bool Model::readVertex (char* vertexString)
    473473{
    474474  float subbuffer1;
     
    488488   The function makes a difference between QUADS and TRIANGLES, and will if changed re-open, set and re-close the gl-processe.
    489489*/
    490 bool Object::readFace (char* faceString)
     490bool Model::readFace (char* faceString)
    491491{
    492492  if (this->currentGroup->faceCount >0)
     
    551551   If a vertexNormal line is found this function will inject it into the vertexNormal-Array
    552552*/
    553 bool Object::readVertexNormal (char* normalString)
     553bool Model::readVertexNormal (char* normalString)
    554554{
    555555  float subbuffer1;
     
    569569   this function will inject it into the vertexTexture-Array
    570570*/
    571 bool Object::readVertexTexture (char* vTextureString)
     571bool Model::readVertexTexture (char* vTextureString)
    572572{
    573573  float subbuffer1;
     
    589589
    590590*/
    591 bool Object::readMtlLib (char* mtlFile)
     591bool Model::readMtlLib (char* mtlFile)
    592592{
    593593  this->mtlFileName = new char [strlen(mtlFile)+1];
     
    688688   \param matString the Material that will be set.
    689689*/
    690 bool Object::readUseMtl (char* matString)
     690bool Model::readUseMtl (char* matString)
    691691{
    692692  if (!this->mtlFileName)
     
    711711   \brief reads and includes the Faces/Materials into the openGL state Machine
    712712*/
    713 bool Object::importToGL (void)
     713bool Model::importToGL (void)
    714714{
    715715
     
    729729      if ((this->currentGroup->listNumber = glGenLists(1)) == 0)
    730730        {
    731           PRINTF(1)("list could not be created for this Object\n");
     731          PRINTF(1)("list could not be created for this Model\n");
    732732          return false;
    733733        }
     
    810810   merging this information, the face will be drawn.
    811811*/
    812 bool Object::addGLElement (FaceElement* elem)
     812bool Model::addGLElement (FaceElement* elem)
    813813{
    814814  PRINTF(3)("importing grafical Element to openGL.\n");
     
    832832   4. It goes through all the normale-Points and calculates the VertexNormale and includes it in the normals-Array.
    833833*/
    834 bool Object::buildVertexNormals ()
     834bool Model::buildVertexNormals ()
    835835{
    836836 
     
    903903
    904904/**
    905    \brief Includes a default object
    906 
    907    This will inject a Cube, because this is the most basic object.
    908 */
    909 void Object::BoxObject(void)
     905   \brief Includes a default model
     906
     907   This will inject a Cube, because this is the most basic model.
     908*/
     909void Model::BoxModel(void)
    910910{
    911911  this->readVertex ("-0.5 -0.5 0.5");
  • orxonox/branches/parenting/src/importer/model.h

    r3357 r3360  
    11/*!
    2   \file object.h
    3   \brief Contains the Object Class that handles 3D-Objects
     2  \file model.h
     3  \brief Contains the Model Class that handles 3D-Models
    44*/
    55
    6 #ifndef _OBJECT_H
    7 #define _OBJECT_H
     6#ifndef _MODEL_H
     7#define _MODEL_H
    88
    99#include "../stdincl.h"
     
    1818
    1919
    20 //! Class that handles 3D-Objects. it can also read them in and display them.
    21 class Object
     20//! Class that handles 3D-Models. it can also read them in and display them.
     21class Model
    2222{
    2323 public:
    24   Object ();
    25   Object (char* fileName);
    26   Object(char* fileName, float scaling);
    27   ~Object ();
     24  Model ();
     25  Model (char* fileName);
     26  Model(char* fileName, float scaling);
     27  ~Model ();
    2828 
    2929  void draw (void) const;
     
    6060  };
    6161
    62   //! Group to handle multiple Objects per obj-file.
     62  //! Group to handle multiple Models per obj-file.
    6363  struct Group
    6464  {
     
    8686
    8787  Material* material;   //!< Initial pointer to the Material. This can hold many materials, because Material can be added with Material::addMaterial(..)
    88   float scaleFactor;    //!< The Factor with which the Object hould be scaled. \todo maybe one wants to scale the Object after Initialisation
     88  float scaleFactor;    //!< The Factor with which the Model should be scaled. \todo maybe one wants to scale the Model after Initialisation
    8989
    9090  char* objPath;        //!< The Path wher the obj and mtl-file are located.
     
    117117  bool buildVertexNormals ();
    118118
    119   void BoxObject (void);
     119  void BoxModel (void);
    120120};
    121121
  • orxonox/branches/parenting/src/player.cc

    r3325 r3360  
    1919#include "stdincl.h"
    2020#include "collision.h"
    21 #include "importer/object.h"
     21#include "importer/model.h"
    2222
    2323using namespace std;
     
    2727{
    2828
    29   this->model = new Object("reaplow.obj");
     29  this->model = new Model("reaplow.obj");
    3030  /*
    3131  objectList = glGenLists(1);
  • orxonox/branches/parenting/src/player.h

    r3309 r3360  
    99#include "world_entity.h"
    1010
    11 class Object;
     11class Model;
    1212
    1313//! Basic controllable WorldEntity
  • orxonox/branches/parenting/src/world.cc

    r3358 r3360  
    190190      trackManager->addPoint(Vector(150,0,-10));
    191191      trackManager->setDuration(.5);
    192       int fork11, fork12, fork13;
    193       trackManager->fork(3, &fork11, &fork12, &fork13);
     192      int fork11, fork12, fork13, fork14;
     193      trackManager->fork(4, &fork11, &fork12, &fork13, &fork14);
    194194      trackManager->workOn(fork11);
    195195      trackManager->addPoint(Vector(170, 0, -15));
     
    217217      trackManager->addPoint(Vector(200,-10,5));
    218218      trackManager->addPoint(Vector(250,-10,5));
    219       trackManager->join(3, fork21, fork22, fork13);
     219      printf("fork14: %d\n", fork14);
     220      trackManager->workOn(fork14);
     221      trackManager->addPoint(Vector(200,15,0));
     222      trackManager->addPoint(Vector(210,0,10));
     223
     224
     225
     226      trackManager->join(4, fork21, fork22, fork13, fork14);
     227
    220228      /*
    221229      tmpCurve->addNode(Vector(10,0,-10));
  • orxonox/branches/parenting/src/world_entity.h

    r3342 r3360  
    1111
    1212class CollisionCluster;
    13 class Object;
     13class Model;
    1414
    1515//! Basic class from which all interactive stuff in the world is derived from
     
    2222  virtual ~WorldEntity ();
    2323
    24   Object* model;
     24  Model* model;
    2525 
    2626  void setCollision (CollisionCluster* newhull);
Note: See TracChangeset for help on using the changeset viewer.