Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8544 in orxonox.OLD


Ignore:
Timestamp:
Jun 16, 2006, 5:28:03 PM (18 years ago)
Author:
patrick
Message:

bsp: md3 animation parsing and reading construct finished

Location:
branches/bsp_model/src/lib/graphics/importer/md3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc

    r8541 r8544  
    176176              firstTorsoFrame = animation->first;
    177177
    178 
    179           //newAnimCfg.putAnimation(animation);
     178          this->putAnimation(animation);
    180179        }
    181180      }
    182 
    183 
    184181    }
    185 
    186182  }
    187183
     
    196192  MD3Animation* MD3AnimationCfg::getAnimation(std::string name)
    197193  {
    198 //     return (MD3Animation)animations.get(name);
     194    return this->animations[name];
    199195  }
    200196
     
    205201   void MD3AnimationCfg::putAnimation(MD3Animation* anim)
    206202   {
    207 //        animations.put(anim.name, anim);
     203      this->animations[anim->name] = anim;
    208204   }
    209205
     
    211207}
    212208
    213 #if 0
    214       /**
    215          * <p>Create an empty animation data resource. Use this when creating and
    216          * managing your own animations.
    217       */
    218         protected AnimationCfg() {
    219                 animations=new TreeMap();
    220 }
    221 
    222         /**
    223          * <p>Constructor that loads an <i>animation.cfg</i> file into the internal
    224          * data stuctures. The read information can later be consulted using the
    225          * animationNames() and getAnimation() methods.
    226          *
    227          * @param file The file to open.
    228         */
    229         protected AnimationCfg(String file) throws IOException {
    230                 this();
    231                 InputStream fin=new FileInputStream(file);
    232                 CFGIO.loadAnimationCfg(this, fin);
    233                 fin.close();
    234 }
    235 
    236         /**
    237          * <p>Constructor that loads <i>animation.cfg</i> data coming from the specified
    238          * input stream into the internal data stuctures. The read information can later
    239          * be consulted using the animationNames() and getAnimation() methods.
    240          *
    241          * @param in The stream to read data from.
    242         */
    243         protected AnimationCfg(InputStream in) throws IOException {
    244                 this();
    245                 CFGIO.loadAnimationCfg(this, in);
    246 }
    247 
    248         /**
    249          * <p>Return an Iterator listing the names of all known animations.
    250         */
    251         public Iterator animationNames() {
    252                 return animations.keySet().iterator();
    253 }
    254 
    255         /**
    256          * <p>Look up the animation data for the animation with the specified name.
    257          *
    258          * @param name Name of the animation.
    259          * @return The animation data associated with the name or null if no data was found.
    260         */
    261         public MD3Animation getAnimation(String name) {
    262                 return (MD3Animation)animations.get(name);
    263 }
    264 
    265         /**
    266          * <p>Add the specified animation to the list of known animations.
    267         */
    268         public void putAnimation(MD3Animation anim) {
    269                 animations.put(anim.name, anim);
    270 }
    271 #endif
    272 
     209
     210
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.h

    r8541 r8544  
    4040      void putAnimation(MD3Animation* animation);
    4141
    42       std::string toString() { return std::string("Name: " + this->filename); }
    43 
    4442
    4543    public:
Note: See TracChangeset for help on using the changeset viewer.