Changeset 3193 in orxonox.OLD for orxonox/trunk/src/object.h
- Timestamp:
- Dec 16, 2004, 4:00:43 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/object.h
r3185 r3193 35 35 36 36 private: 37 struct FaceElement 37 //! This is the placeholder of one Vertex beloning to a Face. 38 struct FaceElement 38 39 { 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. 43 44 }; 44 45 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 47 55 { 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. 50 58 51 char* materialString; 59 char* materialString; //!< The Name of the Material to which to Change. 52 60 53 Face* next; 54 }; 61 Face* next; //!< Pointer to the next Face. 62 }; 55 63 56 //! Group to handle multiple Objects per obj-file 64 //! Group to handle multiple Objects per obj-file. 57 65 struct Group 58 66 { 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. 60 68 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. 66 74 67 Group* next; 75 Group* next; //!< Pointer to the next Group. 68 76 }; 69 77 70 78 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. 76 83 77 84 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. 81 88 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 84 91 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) 88 95 89 96 bool initialize (void);
Note: See TracChangeset
for help on using the changeset viewer.