- Main Page
- Classes

- Class List
- Class Hierarchy
- Class Members

# JMD2Model Class Reference

`#include <JMD2Model.h>`

Collaboration diagram for JMD2Model:

List of all members.

## Public Member Functions
| JMD2Model ()
void | SetState (int newState)
bool | Load (char *filename, char *textureName)
void | Render (int frameNum)
void | Update (float dt)
void | SetAnimationSpeed (float speed)
void | Render ()

## Detailed Description

Helper class to display Quake 2 MD2 model.

## Constructor & Destructor Documentation

JMD2Model::JMD2Model | ( |  | ) |

Constructor.

## Member Function Documentation

void JMD2Model::SetState | ( | int | newState | ) |

Set model state.

Parameters:

  | newState | - Model state.

bool JMD2Model::Load | ( | char * | filename,
|  | char * | textureName |
| ) |  |  |

Load MD2 model.

Parameters:

  | filename | - Name of MD2 file.
  | texturenName | - Name of texture.

void JMD2Model::Render | ( | int | frameNum | ) |

Render a single frame of the model.

Parameters:

  | frameNum | - Frame to render.

void JMD2Model::Update | ( | float | dt | ) |

Update animation.

Parameters:

  | dt | - Time elpased since last update (in seconds).

void JMD2Model::SetAnimationSpeed | ( | float | speed | ) |

Set speed of animation.

Parameters:

  | speed | - Speed of animation.

void JMD2Model::Render | ( |  | ) |

Render the model.

Parameters:

  | percent | - Interpolating percentage.