Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2005, 3:52:33 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: some more functionality in the abstractModel class

File:
1 edited

Legend:

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

    r5790 r6008  
    113113  unsigned int     numTriangles;         //!< number of triangles in the Model
    114114  unsigned int     numNormals;           //!< how many Normals in the Model
    115   unsigned int     numTexCoor;
     115  unsigned int     numTexCoor;           //!< how many Texture Coordinates in the Model
    116116
    117117  const float*     pVertices;            //!< array of the Vertives
     
    131131    virtual ~AbstractModel() { }
    132132
    133     inline const modelInfo* getModelInfo() const { return this->pModelInfo; }
     133    inline const modelInfo* getModelInfo() const { return &this->pModelInfo; }
    134134
     135    /** @returns a Pointer to the Vertex-Array, if it was deleted it returns NULL */
     136    inline const float* getVertexArray() const { return this->pModelInfo.pVertices; };
     137    /** @returns the VertexCount of this Model */
     138    inline unsigned int getVertexCount() const { return this->pModelInfo.numVertices; };
     139
     140    /** @returns a Pointer to the Normals-Array, if it was deleted it returns NULL */
     141    inline const float* getNormalsArray() const { return this->pModelInfo.pNormals; };
     142    /** @returns the NormalsCount of this Model */
     143    inline unsigned int getNormalsCount() const { return this->pModelInfo.numNormals; };
     144
     145    /** @returns a Pointer to the TexCoord-Array, if it was deleted it returns NULL */
     146    inline const float* getTexCoordArray() const { return this->pModelInfo.pTexCoor; };
     147    /** @returns the TexCoord-Count of this Model */
     148    inline unsigned int getTexCoordCount() const { return this->pModelInfo.numTexCoor; };
     149
     150    /** @returns the Array of triangles */
     151    inline sTriangleExt* getTriangles() const { return this->pModelInfo.pTriangles; };
     152    /** @returns the Count of Faces of this Model */
     153    inline unsigned int getFaceCount() const { return this->pModelInfo.numTriangles; };
    135154
    136155  protected:
    137     modelInfo*     pModelInfo;      //!< Reference to the modelInfo
     156    modelInfo      pModelInfo;      //!< Reference to the modelInfo
    138157};
    139158
Note: See TracChangeset for help on using the changeset viewer.