Changeset 3359 for GTP


Ignore:
Timestamp:
04/17/09 09:09:14 (15 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling
Files:
6 edited

Legend:

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

    r3357 r3359  
    156156                                AdditionalLibraryDirectories="libs\Zlib\lib" 
    157157                                IgnoreDefaultLibraryNames="libCMT" 
    158                                 GenerateDebugInformation="true" 
     158                                GenerateDebugInformation="false" 
    159159                                SubSystem="1" 
    160160                                LargeAddressAware="2" 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/PlyConverter.cpp

    r3358 r3359  
    120120 
    121121        v[i ++] = (float)ply_get_argument_value(argument); 
    122         //printf("here3 %g", ply_get_argument_value(argument)); 
     122        //printf("%g", ply_get_argument_value(argument)); 
    123123     
    124124        if (eol) 
     
    215215        //if (texCoordCount) str.write(reinterpret_cast<char *>(geom->mTexcoords), sizeof(float) * texCoordCount * 2); 
    216216 
    217         cout << "here34 " << geom->mNormals.back() << endl; 
    218  
    219217        int texCoordCount = 0; 
    220218        str.write(reinterpret_cast<char *>(&texCoordCount), sizeof(int)); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp

    r3358 r3359  
    346346        int vertexCount; 
    347347        str.read(reinterpret_cast<char *>(&vertexCount), sizeof(int)); 
    348         cout << "vertices: " << vertexCount << endl; 
     348         
    349349 
    350350        // end of file reached 
     
    382382                texcoords = NULL; 
    383383        } 
    384  
    385         cout << "here3: " << normals[vertexCount-1] << endl; 
    386         cout << "texCoordCount: " << texCoordCount << endl; 
    387  
    388384 
    389385        const bool delGeometry = true; 
     
    422418        if (!istr.is_open()) return 0; 
    423419 
    424         cout << "here7" << endl; 
    425420        cout << "loading textures" << endl; 
    426421         
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Transform3.cpp

    r3115 r3359  
    4040{ 
    4141        mIsIdentity = false; 
    42         mOldMatrix = mMatrix; 
     42        //mOldMatrix = mMatrix; 
    4343        mMatrix = trafo * mMatrix; 
    4444} 
     
    5353 
    5454 
     55void Transform3::InitFrame() 
     56{ 
     57        mOldMatrix = mMatrix; 
    5558} 
     59 
     60 
     61} 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Transform3.h

    r3114 r3359  
    4949        inline bool IsIdentity() const { return mIsIdentity; } 
    5050 
     51        void InitFrame(); 
     52 
    5153 
    5254protected: 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3358 r3359  
    646646        // sibenik positions 
    647647        VertexArray positions; 
    648         //positions.push_back(Vector3(6.07307, 8.20723, 6.7)); 
    649         positions.push_back(Vector3(6.07307, 8.20723, 6.62)); 
     648         
     649        /*positions.push_back(Vector3(6.07307, 8.20723, 6.62)); 
    650650        positions.push_back(Vector3(-17.1935, 11.1687, 8.8781)); 
    651         positions.push_back(Vector3(1.50032, 31.1943, 19.1f)); 
     651        positions.push_back(Vector3(1.50032, 31.1943, 19.1f));*/ 
     652 
     653        positions.push_back(Vector3(6.07307, 8.20723, 4.6f)); 
     654        positions.push_back(Vector3(-17.1935, 11.1687, 6.8f)); 
     655        positions.push_back(Vector3(1.50032, 31.1943, 17.6f)); 
    652656 
    653657#endif 
     
    671675        } 
    672676 
    673         const float rotAngle = M_PI / 180.0f; 
    674         const Matrix4x4 rotMatrix = RotationZMatrix(rotAngle); 
     677        const float rotAngle = M_PI / 2.0f; 
     678        const Matrix4x4 rotMatrix = RotationXMatrix(rotAngle); 
     679        const Matrix4x4 scaleMatrix = ScaleMatrix(14, 14, 14); 
     680 
    675681        // hack: second buddha 
    676         //dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 
    677  
    678          
     682        dynamicObjects[2]->GetTransform()->MultMatrix(rotMatrix); 
     683        dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 
     684        dynamicObjects[0]->GetTransform()->MultMatrix(rotMatrix); 
     685        dynamicObjects[0]->GetTransform()->MultMatrix(scaleMatrix); 
     686        dynamicObjects[1]->GetTransform()->MultMatrix(scaleMatrix); 
     687        dynamicObjects[2]->GetTransform()->MultMatrix(scaleMatrix); 
     688 
     689        cout << "dynamic objects: " << (int)dynamicObjects.size() << endl; 
     690 
     691        // hack 
    679692        resourceManager->mUseNormalMapping = false; 
    680693        resourceManager->mUseSpecialColors = false; 
     
    11461159void MainLoop()  
    11471160{        
    1148         if (buddha) 
     1161        for (size_t i = 0; i < dynamicObjects.size(); ++ i) 
     1162                dynamicObjects[i]->GetTransform()->InitFrame(); 
     1163 
     1164        if (0)//buddha) 
    11491165        { 
    11501166                Matrix4x4 oldTrafo = buddha->GetTransform()->GetMatrix(); 
     
    11801196                dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 
    11811197 
    1182                 const float rotAngle2 = 0.6f * M_PI / 180.0f; 
     1198                const float rotAngle2 = 0.0033f * M_PI; 
    11831199 
    11841200                Matrix4x4 rotMatrix2 = RotationZMatrix(rotAngle); 
Note: See TracChangeset for help on using the changeset viewer.