Changeset 8545 in orxonox.OLD for branches/bsp_model/src/lib
- Timestamp:
- Jun 16, 2006, 5:32:47 PM (18 years ago)
- Location:
- branches/bsp_model/src/lib/graphics/importer/md3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_animation.cc
r8526 r8545 63 63 64 64 /** 65 * create a new MD3 Anumation object and initialize it with the data on the given line66 * @param line: the line to read from67 */68 MD3Animation::MD3Animation(std::string line)69 {70 this->init();71 // loadAnimation()72 }73 74 75 /**76 65 * deconstructor 77 66 */ -
branches/bsp_model/src/lib/graphics/importer/md3/md3_animation.h
r8541 r8545 40 40 public: 41 41 MD3Animation(); 42 MD3Animation(std::string line);43 42 virtual ~MD3Animation(); 44 43 -
branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc
r8544 r8545 134 134 135 135 this->footsteps = tokens.back(); 136 // std::transform(this->footsteps.begin(), this->footsteps.end(), this->footsteps.begin(), std::tolower);137 138 while( !tokens.empty())139 {140 PRINTF(0)("tokens: %s\n", tokens.back().c_str());141 tokens.pop_back();142 }143 136 144 137 //check if value is ok … … 157 150 inHeader = false; 158 151 159 MD3Animation* animation = new MD3Animation(line); 152 MD3Animation* animation = new MD3Animation(); 153 this->loadAnimation(animation, line); 160 154 161 155 animation->name = MD3Animation::animationList[i].animationName; … … 183 177 184 178 179 /** 180 * loading the animation data itself 181 */ 182 void MD3AnimationCfg::loadAnimation(MD3Animation* anim, std::string line) 183 { 184 // parse the line: 185 // first frame, num frames, looping frames, frames per second (fps) 186 std::vector<std::string> tokens; 187 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 188 189 190 while( !tokens.empty()) 191 { 192 PRINTF(0)("tokens: %s\n", tokens.back().c_str()); 193 tokens.pop_back(); 194 } 195 } 196 // //parse line: 197 // //first frame, num frames, looping frames, frames per second 198 // try { 199 // StringTokenizer st=new StringTokenizer(line, " \t\n\r\f/"); 200 // 201 // newAnimation.first=new Integer(st.nextToken()).intValue(); 202 // newAnimation.num=new Integer(st.nextToken()).intValue(); 203 // newAnimation.looping=new Integer(st.nextToken()).intValue(); 204 // newAnimation.fps=new Integer(st.nextToken()).intValue(); 205 // } catch (Exception e) { 206 // throw new IOException("corrupt animation line"); 207 // } 208 185 209 186 210 /** -
branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.h
r8544 r8545 40 40 void putAnimation(MD3Animation* animation); 41 41 42 private: 43 void loadAnimation(MD3Animation* anim, std::string line); 44 42 45 43 46 public:
Note: See TracChangeset
for help on using the changeset viewer.