Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3127 in orxonox.OLD for orxonox/branches/images/importer/material.h


Ignore:
Timestamp:
Dec 7, 2004, 8:02:05 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/images: Implemented a Way to read in the Files from any Directory.

  1. New Class created: PathList, handles lists of Paths (patrick… i really think this list is so small, that it does not make sense to use the list.h instead)
  2. Implemented it so it works. (windows-users should now be able to drag a file onto the importer, and it displays the file with all the maps and textures on it, if they are in the same directory as the obj-file)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/importer/material.h

    r3110 r3127  
    1212#include <GL/glu.h>
    1313#include <SDL/SDL.h>
    14 #include <stdlib.h>
    15 #include <fstream>
    1614
    1715#if HAVE_CONFIG_H
     
    3230#endif /* HAVE_PNG_H */
    3331#endif /* HAVE_SDL_SDL_IMAGE_H */
     32
     33class PathList
     34{
     35 public:
     36  PathList();
     37  PathList(char* pName);
     38
     39  ~PathList();
     40  void addPath (char* pName);
     41  char* pathName;
     42  PathList* next;
     43};
     44
    3445
    3546//! Class to handle Materials.
     
    6273
    6374
    64 
    65 
    66   // MAPPING //
     75 
     76  void addTexturePath(char* pathName);
     77  char* searchTextureInPaths(char* texName) const;
     78 // MAPPING //
    6779  void setDiffuseMap(char* dMap);
    6880  void setAmbientMap(char* aMap);
    6981  void setSpecularMap(char* sMap);
    7082  void setBump(char* bump);
    71 
    7283
    7384 private:
     
    91102  float transparency;
    92103
     104  static PathList* pathList;
     105 
    93106  GLuint diffuseTexture;
    94107  GLuint ambientTexture;
Note: See TracChangeset for help on using the changeset viewer.