Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6769 in orxonox.OLD for trunk/src/lib/graphics/importer


Ignore:
Timestamp:
Jan 26, 2006, 2:09:53 PM (18 years ago)
Author:
bensch
Message:

trunk: vertexArrayModel with TexCoords

Location:
trunk/src/lib/graphics/importer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/material.h

    r6622 r6769  
    1818#endif
    1919
     20#include "texture.h"
     21
    2022// FORWARD DECLARATIONS //
    21 class Texture;
    2223
    2324//! Class to handle Materials.
     
    5152  void setSpecularMap(const char* sMap, GLenum target = GL_TEXTURE_2D);
    5253  void setBump(const char* bump);
     54  GLuint getDiffuseTexture() const { return (this->diffuseTexture)? this->diffuseTexture->getTexture() : 0; };
    5355
    5456  static void addTexturePath(const char* pathName);
  • trunk/src/lib/graphics/importer/vertex_array_model.cc

    r6766 r6769  
    208208void VertexArrayModel::addTexCoor(float u, float v)
    209209{
    210   this->texCoords.push_back(u);
    211   this->texCoords.push_back(v);
     210  this->texCoords.push_back(Vector2D(u,v));
    212211  this->pModelInfo.numTexCoor++;
    213212}
     
    358357            this->vertices.size(),
    359358            this->normals.size(),
    360             this->texCoords.size()/2,
     359            this->texCoords.size(),
    361360            this->colors.size() );
    362361  for (GLuint i = 1; i < this->stripes.size(); ++i)
  • trunk/src/lib/graphics/importer/vertex_array_model.h

    r6454 r6769  
    1010
    1111#include "glincl.h"
     12#include "vector2D.h"
    1213
    1314#include <vector>
     
    5354  Vector& vertex(unsigned int i) { return this->vertices[i]; };
    5455  Vector& normal(unsigned int i) { return this->normals[i]; };
    55   //Vector& texCoord(unsigned int i) { return this->texCoord[i]; };
     56  Vector2D& texCoord(unsigned int i) { return this->texCoords[i]; };
    5657  Vector& color(unsigned int i) { return this->colors[i]; };
    5758  GLuint  index(unsigned int i) { return this->indices[i]; };
     
    6869  std::vector<Vector>        vertices;        //!< The Array that handles the Vertices.
    6970  std::vector<Vector>        normals;         //!< The Array that handles the Normals.
    70   std::vector<float>         texCoords;       //!< The Array that handles the VertexTextureCoordinates.
     71  std::vector<Vector2D>      texCoords;       //!< The Array that handles the VertexTextureCoordinates.
    7172  std::vector<Vector>        colors;          //!< The Array that handles Colors.
    7273
Note: See TracChangeset for help on using the changeset viewer.