Changeset 4746 in orxonox.OLD for orxonox/trunk/src/lib/graphics/importer
- Timestamp:
- Jul 1, 2005, 12:48:48 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/importer
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/array.h
r4580 r4746 32 32 ~Array(); 33 33 34 void finalizeArray ( void);34 void finalizeArray (); 35 35 void addEntry (T entry); 36 36 void addEntry(T entry0, T entry1, T entry2); … … 39 39 inline const T* getArray () const { return this->array; }; 40 40 /** \returns The Count of entries in the Array*/ 41 inline unsigned int getCount( void)const { return this->entryCount; };42 void debug( void) const ;41 inline unsigned int getCount()const { return this->entryCount; }; 42 void debug() const ; 43 43 44 44 private: … … 97 97 */ 98 98 template<class T> 99 void Array<T>::finalizeArray ( void)99 void Array<T>::finalizeArray () 100 100 { 101 101 PRINTF(4)("Finalizing array. Length: %i\n", entryCount); … … 157 157 */ 158 158 template<class T> 159 void Array<T>::debug ( void) const159 void Array<T>::debug () const 160 160 { 161 161 PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array); -
orxonox/trunk/src/lib/graphics/importer/material.cc
r4584 r4746 64 64 \brief sets the material with which the following Faces will be painted 65 65 */ 66 bool Material::select ( void)66 bool Material::select () 67 67 { 68 68 // setting diffuse color -
orxonox/trunk/src/lib/graphics/importer/material.h
r4584 r4746 28 28 ~Material (); 29 29 30 bool select ( void);30 bool select (); 31 31 32 32 void setIllum (int illum); -
orxonox/trunk/src/lib/graphics/importer/model.cc
r4677 r4746 113 113 actually does the same as the delete Operator, but does not delete the predecessing group 114 114 */ 115 void ModelGroup::cleanup( void)115 void ModelGroup::cleanup() 116 116 { 117 117 PRINTF(5)("Cleaning up group\n"); … … 164 164 Looks if any from model allocated space is still in use, and if so deleted it. 165 165 */ 166 Model::~Model( void)166 Model::~Model() 167 167 { 168 168 PRINTF(4)("Deleting Model "); … … 198 198 \brief Finalizes an Object. This can be done outside of the Class. 199 199 */ 200 void Model::finalize( void)200 void Model::finalize() 201 201 { 202 202 // this creates the display List. … … 218 218 It does this by just calling the Lists that must have been created earlier. 219 219 */ 220 void Model::draw ( void) const220 void Model::draw () const 221 221 { 222 222 PRINTF(4)("drawing the 3D-Models\n"); … … 292 292 \brief deletes all the arrays 293 293 */ 294 bool Model::deleteArrays( void)294 bool Model::deleteArrays() 295 295 { 296 296 if (this->vertices) … … 310 310 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. 311 311 */ 312 bool Model::cleanup( void)312 bool Model::cleanup() 313 313 { 314 314 PRINTF(4)("cleaning up the 3D-Model to save Memory.\n"); … … 702 702 \brief reads and includes the Faces/Materials into the openGL state Machine 703 703 */ 704 bool Model::importToDisplayList( void)704 bool Model::importToDisplayList() 705 705 { 706 706 // finalize the Arrays … … 794 794 \brief reads and includes the Faces/Materials into the openGL state Machine 795 795 */ 796 bool Model::importToVertexArray( void)796 bool Model::importToVertexArray() 797 797 { 798 798 // finalize the Arrays … … 857 857 This will inject a Cube, because this is the most basic model. 858 858 */ 859 void Model::cubeModel( void)859 void Model::cubeModel() 860 860 { 861 861 this->addVertex (-0.5, -0.5, 0.5); -
orxonox/trunk/src/lib/graphics/importer/model.h
r4678 r4746 99 99 public: 100 100 Model(const char* modelName = NULL, MODEL_TYPE type = MODEL_DISPLAY_LIST); 101 virtual ~Model( void);101 virtual ~Model(); 102 102 103 void draw( void) const;103 void draw() const; 104 104 void draw(int groupNumber) const; 105 105 void draw(char* groupName) const; 106 106 107 107 /** \returns Count of the Models (Groups) in this File */ 108 inline int getGroupCount( void) const { return this->groupCount; };108 inline int getGroupCount() const { return this->groupCount; }; 109 109 110 110 /** \returns a Pointer to the Vertex-Array, if it was deleted it returns NULL */ 111 inline const GLfloat* getVertexArray( void) const { return this->vertices->getArray(); };111 inline const GLfloat* getVertexArray() const { return this->vertices->getArray(); }; 112 112 /** \returns the VertexCount of this Model */ 113 inline unsigned int getVertexCount( void) const { return this->vertexCount; };113 inline unsigned int getVertexCount() const { return this->vertexCount; }; 114 114 115 115 /** \returns a Pointer to the Normals-Array, if it was deleted it returns NULL */ 116 inline const GLfloat* getNormalsArray( void) const { return this->normals->getArray(); };116 inline const GLfloat* getNormalsArray() const { return this->normals->getArray(); }; 117 117 /** \returns the NormalsCount of this Model */ 118 inline unsigned int getNormalsCount( void) const { return this->normalCount; };118 inline unsigned int getNormalsCount() const { return this->normalCount; }; 119 119 120 120 /** \returns a Pointer to the TexCoord-Array, if it was deleted it returns NULL */ 121 inline const GLfloat* getTexCoordArray( void) const { return this->vTexture->getArray(); };121 inline const GLfloat* getTexCoordArray() const { return this->vTexture->getArray(); }; 122 122 /** \returns the TexCoord-Count of this Model */ 123 inline unsigned int getTexCoordCount( void) const { return this->texCoordCount; };123 inline unsigned int getTexCoordCount() const { return this->texCoordCount; }; 124 124 125 125 /** \returns the Count of Faces of this Model */ … … 141 141 bool setMaterial(const char* mtlString); 142 142 bool setMaterial(Material* mtl); 143 void finalize( void);143 void finalize(); 144 144 145 145 146 146 protected: 147 void cubeModel( void);147 void cubeModel(); 148 148 149 149 Material* findMaterialByName(const char* materialName); … … 154 154 155 155 private: 156 bool buildVertexNormals( void);156 bool buildVertexNormals(); 157 157 158 bool importToDisplayList( void);158 bool importToDisplayList(); 159 159 bool addGLElement(ModelFaceElement* elem); 160 160 161 bool importToVertexArray( void);161 bool importToVertexArray(); 162 162 163 bool deleteArrays( void);164 bool cleanup( void);163 bool deleteArrays(); 164 bool cleanup(); 165 165 166 166 private: -
orxonox/trunk/src/lib/graphics/importer/texture.cc
r4662 r4746 43 43 Frees Data, and deletes the textures from GL 44 44 */ 45 Texture::~Texture( void)45 Texture::~Texture() 46 46 { 47 47 if (this->texture) -
orxonox/trunk/src/lib/graphics/importer/texture.h
r4466 r4746 25 25 // Texture(TEXTURE_TYPE type, int resolution); 26 26 27 ~Texture( void);27 ~Texture(); 28 28 29 29 /** \returns The textureID of this texture. */ 30 inline GLuint getTexture( void) {return this->texture;}30 inline GLuint getTexture() {return this->texture;} 31 31 GLuint loadTexToGL (SDL_Surface* surface); 32 32 /** \returns true if texture has alpha, false otherwise */ 33 inline bool hasAlpha( void) const {return bAlpha;}33 inline bool hasAlpha() const {return bAlpha;} 34 34 35 35 bool loadImage(const char* imageName);
Note: See TracChangeset
for help on using the changeset viewer.