Ignore:
Timestamp:
04/17/09 17:37:38 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter.cpp

    r3358 r3360  
    401401} 
    402402 
    403 #if 0 
     403#if 1 
    404404 
    405405bool ObjConverter::WriteFile(const string &filename) 
     
    450450        } 
    451451 
     452        int texId = 0; 
     453        ofile.write(reinterpret_cast<char *>(&texId), sizeof(int)); 
     454 
     455        bool alphaTestEnabled = false; 
     456        //bool cullFaceEnabled = false; 
     457        bool cullFaceEnabled = true; 
     458                 
     459        ofile.write(reinterpret_cast<char *>(&alphaTestEnabled), sizeof(bool)); 
     460        ofile.write(reinterpret_cast<char *>(&cullFaceEnabled), sizeof(bool)); 
     461 
     462        // material 
     463        bool hasMaterial = true; 
     464        ofile.write(reinterpret_cast<char *>(&hasMaterial), sizeof(bool)); 
     465         
     466        SimpleVec ambient, diffuse, spec, emm; 
     467 
     468        ambient.x = ambient.y = ambient.z = 0.2f; 
     469        diffuse.x = diffuse.y = diffuse.z = 1.0f; 
     470        spec.x = spec.y = spec.z = .0f; 
     471        emm = spec; 
     472 
     473        // only write rgb part of the material 
     474        ofile.write(reinterpret_cast<char *>(&ambient), sizeof(SimpleVec)); 
     475        ofile.write(reinterpret_cast<char *>(&diffuse), sizeof(SimpleVec)); 
     476        ofile.write(reinterpret_cast<char *>(&spec), sizeof(SimpleVec)); 
     477        ofile.write(reinterpret_cast<char *>(&emm), sizeof(SimpleVec)); 
     478 
    452479 
    453480        int entityCount = 1; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter2.cpp

    r3358 r3360  
    300300        { 
    301301                //cout << "line: " << line << endl; 
    302  
    303302                switch (str[0]) 
    304303                { 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/main.cpp

    r3357 r3360  
    1 //#include "ObjConverter.h" 
    2 #include "PlyConverter.h" 
     1#include "ObjConverter.h" 
     2//#include "PlyConverter.h" 
    33#include <iostream> 
    44#include <time.h> 
     
    1212 
    1313        //ObjConverter2 converter; 
    14         //ObjConverter converter; 
    15         PlyConverter converter; 
     14        ObjConverter converter; 
     15        //PlyConverter converter; 
    1616 
    1717        cout << "converting obj to dem format" << endl; 
Note: See TracChangeset for help on using the changeset viewer.