Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4213 in orxonox.OLD for orxonox


Ignore:
Timestamp:
May 18, 2005, 2:10:56 AM (20 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: some more code improvements, no correct rendering yet

Location:
orxonox/branches/md2_loader/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc

    r4212 r4213  
    603603
    604604
     605void MD2Model2::tick(float time)
     606{
     607  this->animationState.localTime += time;
     608}
     609
    605610void MD2Model2::draw()
    606611{
     612  if( likely(this->animationState.localTime > 0.0))
     613    this->animate();
     614
    607615  glPushMatrix();
    608616  /* rotate because id software uses another orientation then the openGL default */
     
    663671
    664672
    665 void MD2Model2::animate(float time)
    666 {
    667   this->animationState.localTime += time;
    668 
     673void MD2Model2::animate()
     674{
    669675  if( this->animationState.localTime - this->animationState.lastTime > (1.0f / this->animationState.fps))
    670676    {
  • orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h

    r4212 r4213  
    193193  void tick(float dtS);
    194194
    195   void animate(float time); 
     195
    196196private:
    197 
     197  void animate(); 
    198198  void processLighting();
    199199  void interpolate(sVec3D* verticesList);
  • orxonox/branches/md2_loader/src/world_entities/test_entity.cc

    r4212 r4213  
    3333  this->md2Model2->loadModel("../data/models/tris.md2");
    3434  this->md2Model2->loadSkin("../data/models/tris.pcx");
    35   this->md2Model2->animate(0);
    3635}
    3736
     
    4342void TestEntity::tick (float time)
    4443{
    45   //this->md2Model->tick(time);
     44  this->md2Model2->tick(time);
    4645}
    4746
Note: See TracChangeset for help on using the changeset viewer.