- Timestamp:
- 04/17/09 09:09:14 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter.vcproj
r3357 r3359 156 156 AdditionalLibraryDirectories="libs\Zlib\lib" 157 157 IgnoreDefaultLibraryNames="libCMT" 158 GenerateDebugInformation=" true"158 GenerateDebugInformation="false" 159 159 SubSystem="1" 160 160 LargeAddressAware="2" -
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/PlyConverter.cpp
r3358 r3359 120 120 121 121 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)); 123 123 124 124 if (eol) … … 215 215 //if (texCoordCount) str.write(reinterpret_cast<char *>(geom->mTexcoords), sizeof(float) * texCoordCount * 2); 216 216 217 cout << "here34 " << geom->mNormals.back() << endl;218 219 217 int texCoordCount = 0; 220 218 str.write(reinterpret_cast<char *>(&texCoordCount), sizeof(int)); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
r3358 r3359 346 346 int vertexCount; 347 347 str.read(reinterpret_cast<char *>(&vertexCount), sizeof(int)); 348 cout << "vertices: " << vertexCount << endl;348 349 349 350 350 // end of file reached … … 382 382 texcoords = NULL; 383 383 } 384 385 cout << "here3: " << normals[vertexCount-1] << endl;386 cout << "texCoordCount: " << texCoordCount << endl;387 388 384 389 385 const bool delGeometry = true; … … 422 418 if (!istr.is_open()) return 0; 423 419 424 cout << "here7" << endl;425 420 cout << "loading textures" << endl; 426 421 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Transform3.cpp
r3115 r3359 40 40 { 41 41 mIsIdentity = false; 42 mOldMatrix = mMatrix;42 //mOldMatrix = mMatrix; 43 43 mMatrix = trafo * mMatrix; 44 44 } … … 53 53 54 54 55 void Transform3::InitFrame() 56 { 57 mOldMatrix = mMatrix; 55 58 } 59 60 61 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Transform3.h
r3114 r3359 49 49 inline bool IsIdentity() const { return mIsIdentity; } 50 50 51 void InitFrame(); 52 51 53 52 54 protected: -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3358 r3359 646 646 // sibenik positions 647 647 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)); 650 650 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)); 652 656 653 657 #endif … … 671 675 } 672 676 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 675 681 // 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 679 692 resourceManager->mUseNormalMapping = false; 680 693 resourceManager->mUseSpecialColors = false; … … 1146 1159 void MainLoop() 1147 1160 { 1148 if (buddha) 1161 for (size_t i = 0; i < dynamicObjects.size(); ++ i) 1162 dynamicObjects[i]->GetTransform()->InitFrame(); 1163 1164 if (0)//buddha) 1149 1165 { 1150 1166 Matrix4x4 oldTrafo = buddha->GetTransform()->GetMatrix(); … … 1180 1196 dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 1181 1197 1182 const float rotAngle2 = 0. 6f * M_PI / 180.0f;1198 const float rotAngle2 = 0.0033f * M_PI; 1183 1199 1184 1200 Matrix4x4 rotMatrix2 = RotationZMatrix(rotAngle);
Note: See TracChangeset
for help on using the changeset viewer.