Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3193 in orxonox.OLD for orxonox/trunk/src/object.h


Ignore:
Timestamp:
Dec 16, 2004, 4:00:43 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/src: merged importer into src again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/object.h

    r3185 r3193  
    3535
    3636 private:
    37   struct FaceElement
     37  //! This is the placeholder of one Vertex beloning to a Face.
     38  struct FaceElement
    3839  {
    39     int vertexNumber;
    40     int normalNumber;
    41     int texCoordNumber;
    42     FaceElement* next;
     40    int vertexNumber;    //!< The number of the Vertex out of the Array* vertices, this vertex points to.
     41    int normalNumber;    //!< The number of the Normal out of the Array* normals, this vertex points to.
     42    int texCoordNumber;  //!< The number of the textureCoordinate out of the Array* vTexture, this vertex points to.
     43    FaceElement* next;   //!< Point to the next FaceElement in this List.
    4344  };
    4445
    45   //! Face
    46   struct Face
     46  //! This is the placeholder of a Face belonging to a Group of Faces.
     47  /**
     48     \todo take Material to a call for itself.
     49
     50     This can also be a Material-Change switch.
     51     That means if you want to change a Material inside of a group,
     52     you can create an empty face and apply a material to it, and the Importer will cahnge Colors
     53  */
     54  struct Face
    4755  {
    48     int vertexCount;
    49     FaceElement* firstElem;
     56    int vertexCount;        //!< The Count of vertices this Face has.
     57    FaceElement* firstElem; //!< Points to the first Vertex (FaceElement) of this Face.
    5058
    51     char* materialString;
     59    char* materialString;   //!< The Name of the Material to which to Change.
    5260
    53     Face* next;
    54   };
     61    Face* next;             //!< Pointer to the next Face.
     62  }; 
    5563
    56   //! Group to handle multiple Objects per obj-file
     64  //! Group to handle multiple Objects per obj-file.
    5765  struct Group
    5866  {
    59     char* name;
     67    char* name;         //!< the Name of the Group. this is an identifier, that can be accessed via the draw (char* name) function.
    6068
    61     GLuint listNumber;
    62     Face* firstFace;
    63     Face* currentFace;
    64     int faceMode;
    65     int faceCount;
     69    GLuint listNumber;  //!< The number of the GL-List this Group gets.
     70    Face* firstFace;    //!< The first Face in this group.
     71    Face* currentFace;  //!< The current Face in this Group (the one we are currently working with.)
     72    int faceMode;       //!< The Mode the Face is in: initially -1, 0 for FaceList opened, 1 for Material,  3 for triangle, 4 for Quad, 5+ for Poly \todo ENUM...
     73    int faceCount;      //!< The Number of Faces this Group holds.
    6674
    67     Group* next;
     75    Group* next;        //!< Pointer to the next Group.
    6876  };
    6977
    7078
    71   Array* vertices;
    72   int verticesCount;
    73   Array* colors;
    74   Array* normals;
    75   Array* vTexture;
     79  Array* vertices;      //!< The Array that handles the Vertices.
     80  int verticesCount;    //!< A global Counter for vertices.
     81  Array* normals;       //!< The Array that handles the Normals.
     82  Array* vTexture;      //!< The Array that handles the VertexTextureCoordinates.
    7683
    7784 
    78   Group* firstGroup; //!< the first of all groups.
    79   Group* currentGroup; //!< the currentGroup. this is the one we will work with.
    80   int groupCount;
     85  Group* firstGroup;    //!< The first of all groups.
     86  Group* currentGroup;  //!< The currentGroup. this is the one we will work with.
     87  int groupCount;       //!< The Count of Groups.
    8188
    82   Material* material;
    83   float scaleFactor;
     89  Material* material;   //!< Initial pointer to the Material. This can hold many materials, because Material can be added with Material::addMaterial(..)
     90  float scaleFactor;    //!< The Factor with which the Object hould be scaled. \todo maybe one wants to scale the Object after Initialisation
    8491
    85   char* objPath;
    86   char* objFileName;
    87   char* mtlFileName;
     92  char* objPath;        //!< The Path wher the obj and mtl-file are located.
     93  char* objFileName;    //!< The Name of the obj-file.
     94  char* mtlFileName;    //!< The Name of the mtl-file (parsed out of the obj-file)
    8895
    8996  bool initialize (void);
Note: See TracChangeset for help on using the changeset viewer.