Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10304 in orxonox.OLD for branches/mount_points


Ignore:
Timestamp:
Jan 23, 2007, 9:18:53 PM (18 years ago)
Author:
patrick
Message:

old mount point extraction algorithm redone

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/lib/graphics/importer/static_model.cc

    r10302 r10304  
    164164    }
    165165
    166 
     166    Vector forward;
     167    Vector side1 = vertices[0] - vertices[1];
     168    Vector side2 = vertices[1] - vertices[2];
     169    Vector side3 = vertices[2] - vertices[3];
     170
     171    if( fabs(side1.len()) > fabs(side2.len()) && fabs(side1.len()) > fabs(side3.len()))
     172      forward = side1;
     173    else if( fabs(side2.len()) > fabs(side1.len()) && fabs(side2.len()) > fabs(side3.len()))
     174      forward = side2;
     175    else if( fabs(side3.len()) > fabs(side1.len()) && fabs(side3.len()) > fabs(side2.len()))
     176      forward = side3;
    167177
    168178
     
    175185    center /= vertices.size();
    176186
    177 //     PRINTF(0)("Up Point\n");
    178 //     up.debug();
    179 //
    180 //     PRINTF(0)("Center\n");
    181 //     center.debug();
    182 //
    183 //     PRINTF(0)("Forward\n");
    184 //     forward.debug();
     187    //     PRINTF(0)("Up Point\n");
     188    //     up.debug();
     189    //
     190    //     PRINTF(0)("Center\n");
     191    //     center.debug();
     192    //
     193    //     PRINTF(0)("Forward\n");
     194    //     forward.debug();
    185195
    186196    // now add the mount point
Note: See TracChangeset for help on using the changeset viewer.