Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/graphics/importer/md3/md3_animation_cfg.h

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

merged the bsp-model-stuff back here

File size: 1.5 KB
Line 
1/*!
2 * @file md3_animation.h
3 *
4 * Code heavely inspired by: JAVA MD3 Model Viewer - A Java based Quake 3 model viewer
5 * Copyright (C) 1999 Erwin 'KLR8' Vervaet
6 */
7
8#ifndef _MD3_ANIMATION_CFG_H
9#define _MD3_ANIMATION_CFG_H
10
11#include "vector.h"
12
13#include "base_object.h"
14
15#include <string>
16#include <map>
17
18#include <iostream>
19#include <fstream>
20
21
22
23namespace md3
24{
25  class MD3Animation;
26
27
28  /**
29   * a class with metadata describing an MD3 model animation
30   */
31  class MD3AnimationCfg : public BaseObject
32  {
33
34    public:
35      MD3AnimationCfg();
36      MD3AnimationCfg(std::string filename);
37      virtual ~MD3AnimationCfg();
38
39      void loadConfig(std::string filename);
40
41      MD3Animation* getAnimation(std::string name);
42      void putAnimation(MD3Animation* animation);
43
44    private:
45      void loadAnimation(MD3Animation* anim, std::string line);
46
47
48    public:
49      std::string             filename;            //!< filename of the config file
50
51      char                    sex;                 //!< sex of animated model: 'm' for male, 'f' for female
52      Vector                  headOffset;          //!< head offset. this is the offset of the head model in the HUD x,y,z
53      std::string             footsteps;           //!< type of the footstep sounds associated with anumations (e.g. "mech", "default")
54
55      std::ifstream           dataStream;          //!< the data stream
56
57      std::map<std::string, MD3Animation*>     animations;          //!< mapping of animation names to MD3Animation objects.
58  };
59}
60
61#endif /* _MD3_ANIMATION_CFG_H */
Note: See TracBrowser for help on using the repository browser.