Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/graphics/importer/texture_sequence.h @ 7194

Last change on this file since 7194 was 7194, checked in by bensch, 18 years ago

orxonox/trunk: compile again

File size: 1.8 KB
RevLine 
[3341]1/*!
[7194]2 * @file texture_sequence.h
3 * @brief Contains the texture_sequence class, that handles the reading of Image-files into multiple Texutres.
[5768]4 */
[3341]5
[5861]6#ifndef _TEXTURE_SEQUENCE_H
7#define _TEXTURE_SEQUENCE_H
[3341]8
[5858]9#include "texture.h"
[3548]10
[5768]11#include "glincl.h"
[5860]12
[5858]13#include <vector>
[5860]14#include <stdarg.h>
[3548]15
[5768]16/* Forward Declaration */
[5239]17struct SDL_Surface;
18
[3341]19//! A Class, that reads in Textures from different fileformats.
[5861]20class TextureSequence : public Texture
[5860]21{
22  public:
[5861]23    TextureSequence(unsigned int count = 0, ...);
[4466]24  //  Texture(TEXTURE_TYPE type, int resolution);
[6981]25    virtual ~TextureSequence();
[3905]26
[5860]27    bool loadImageSeries(unsigned int count, ...);
28    bool loadImageSeries(unsigned int count, va_list textureNames);
29    bool addFrame(const char* image);
30    bool addFrame(SDL_Surface* surface);
[6532]31    bool addFrame(GLuint texture);
[5753]32
[6532]33    void clearLists();
34
[5860]35    virtual bool rebuild();
[3341]36
[5865]37    /** @returns the count of frames in this sequence */
38    inline unsigned int getFrameCount() const { return this->textures.size(); };
39
[6532]40    //void gotoFrame(unsigned int frameNumber);
[5860]41    /** @returns The textureID of the Frame @param frameNumber the n-th frame this texture-series.  */
[5865]42    inline GLuint getFrameTexture(unsigned int frameNumber) const { return (this->textures.size()>frameNumber)?this->textures[frameNumber]:0; };
[5860]43    /** @returns The SDL_Surface of the image at Frame @param frameNumber the n-th frame of this image-seriers */
[5865]44    const SDL_Surface* const getFrameImage(unsigned int frameNumber) const { return (this->images.size()>frameNumber)?this->images[frameNumber]:NULL; };
[5856]45
[5860]46  private:
47    std::vector<GLuint>          textures;            //!< The Texture-ID of opengl from this Texture.
48    std::vector<SDL_Surface*>    images;              //!< The SDL_Surfce that stores the Texture on it.
49};
[5768]50
[5861]51#endif /* _TEXTURE_SEQUENCE_H */
Note: See TracBrowser for help on using the repository browser.