Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

AVI Class Reference

#include <AVI.h>

List of all members.

Public Member Functions

 AVI ()
virtual ~AVI ()
void unload ()
bool load (LPCSTR filename)
bool isDone ()
void update (DWORD milliseconds)
void setFrame (int frame)
void setSpeed (float playSpeed)
void setState (int state)
GLuint genTex (int w=256, int h=256)
void sethDC (HDC hDC)

Private Attributes

GLuint texture
int curFrame
AVISTREAMINFO psi
PAVISTREAM pavi
PGETFRAME pgf
BITMAPINFOHEADER bmih
int lastframe
UINT width
UINT height
charpdata
int millisPerFrame
int elapsedTime
HDRAWDIB hdd
HBITMAP hBitmap
HDC hdc
unsigned chardata
bool play
bool looping
bool direction
bool done
float scale


Detailed Description

Definition at line 8 of file AVI.h.


Constructor & Destructor Documentation

AVI::AVI  ) 
 

Definition at line 3 of file AVI.cpp.

References curFrame, data, direction, elapsedTime, hdc, hdd, looping, play, scale, and texture.

AVI::~AVI  )  [virtual]
 

Definition at line 20 of file AVI.cpp.


Member Function Documentation

GLuint AVI::genTex int  w = 256,
int  h = 256
 

Definition at line 163 of file AVI.cpp.

References curFrame, data, hdc, hdd, height, lastframe, pdata, pgf, texture, and width.

Referenced by Demo::drawFrame().

bool AVI::isDone  )  [inline]
 

Definition at line 14 of file AVI.h.

References done.

Referenced by Demo::update().

bool AVI::load LPCSTR  filename  ) 
 

curFrame = 0; hdc = CreateCompatibleDC(0);

hdd = DrawDibOpen(); data = 0; elapsedTime = 0; glGenTextures(1, &texture);

scale = 1; play = true; looping = false; direction = true;

glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,256,256,0,GL_RGB,GL_UNSIGNED_BYTE,data); gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 256, 256, 0, GL_UNSIGNED_BYTE, data);

Definition at line 32 of file AVI.cpp.

References bmih, data, done, hBitmap, hdc, height, lastframe, LOG_ERROR, millisPerFrame, pavi, pgf, psi, and width.

Referenced by Demo::load().

void AVI::setFrame int  frame  ) 
 

Definition at line 110 of file AVI.cpp.

References curFrame, elapsedTime, and millisPerFrame.

void AVI::sethDC HDC  hDC  )  [inline]
 

Definition at line 21 of file AVI.h.

Referenced by Demo::load().

void AVI::setSpeed float  playSpeed  )  [inline]
 

Definition at line 17 of file AVI.h.

References scale.

void AVI::setState int  state  ) 
 

if(State == AVI_START) SetFrame(0); if(State == AVI_STOP) Play = false; if(State == AVI_CONTINUE) Play = true; if(State == AVI_LOOP) looping = true; if(State == AVI_NO_LOOP) looping = false; if(State == AVI_FOREWARD) Direction = true; if(State == AVI_REVERSE) Direction = false;

Definition at line 203 of file AVI.cpp.

void AVI::unload  ) 
 

Definition at line 24 of file AVI.cpp.

References hBitmap, hdd, pavi, and pgf.

Referenced by Demo::unload().

void AVI::update DWORD  milliseconds  ) 
 

Definition at line 117 of file AVI.cpp.

References curFrame, direction, done, elapsedTime, int(), lastframe, looping, millisPerFrame, play, and scale.

Referenced by Demo::update().

Here is the call graph for this function:


Member Data Documentation

BITMAPINFOHEADER AVI::bmih [private]
 

Definition at line 30 of file AVI.h.

Referenced by load().

int AVI::curFrame [private]
 

Definition at line 26 of file AVI.h.

Referenced by AVI(), genTex(), setFrame(), and update().

unsigned char* AVI::data [private]
 

Definition at line 44 of file AVI.h.

Referenced by AVI(), genTex(), and load().

bool AVI::direction [private]
 

Definition at line 48 of file AVI.h.

Referenced by AVI(), and update().

bool AVI::done [private]
 

Definition at line 50 of file AVI.h.

Referenced by isDone(), load(), and update().

int AVI::elapsedTime [private]
 

Definition at line 38 of file AVI.h.

Referenced by AVI(), setFrame(), and update().

HBITMAP AVI::hBitmap [private]
 

Definition at line 41 of file AVI.h.

Referenced by load(), and unload().

HDC AVI::hdc [private]
 

Definition at line 42 of file AVI.h.

Referenced by AVI(), genTex(), and load().

HDRAWDIB AVI::hdd [private]
 

Definition at line 40 of file AVI.h.

Referenced by AVI(), genTex(), and unload().

UINT AVI::height [private]
 

Definition at line 33 of file AVI.h.

Referenced by genTex(), and load().

int AVI::lastframe [private]
 

Definition at line 31 of file AVI.h.

Referenced by genTex(), load(), and update().

bool AVI::looping [private]
 

Definition at line 47 of file AVI.h.

Referenced by AVI(), and update().

int AVI::millisPerFrame [private]
 

Definition at line 37 of file AVI.h.

Referenced by load(), setFrame(), and update().

PAVISTREAM AVI::pavi [private]
 

Definition at line 28 of file AVI.h.

Referenced by load(), and unload().

char* AVI::pdata [private]
 

Definition at line 35 of file AVI.h.

Referenced by genTex().

PGETFRAME AVI::pgf [private]
 

Definition at line 29 of file AVI.h.

Referenced by genTex(), load(), and unload().

bool AVI::play [private]
 

Definition at line 46 of file AVI.h.

Referenced by AVI(), and update().

AVISTREAMINFO AVI::psi [private]
 

Definition at line 27 of file AVI.h.

Referenced by load().

float AVI::scale [private]
 

Definition at line 52 of file AVI.h.

Referenced by AVI(), setSpeed(), and update().

GLuint AVI::texture [private]
 

Definition at line 21 of file AVI.h.

Referenced by AVI(), and genTex().

UINT AVI::width [private]
 

Definition at line 32 of file AVI.h.

Referenced by genTex(), and load().


Generated on Sun Jun 5 15:49:21 2005 for Defacto by  doxygen 1.4.3