Changeset 3361 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
- Timestamp:
- 04/20/09 09:11:32 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3360 r3361 149 149 150 150 bool useSkylightForIllum = true; 151 152 151 bool showFPS = true; 153 154 152 static int globalVisibleId = 0; 155 156 153 PerfTimer applicationTimer; 157 154 … … 203 200 // ssao parameters 204 201 float ssaoKernelRadius = 1e-8f; 205 float ssaoSampleIntensity = 0.2f;202 float ssaoSampleIntensity = .2f; 206 203 float ssaoFilterRadius = 3.0f; 207 204 float ssaoTempCohFactor = 255.0; … … 647 644 648 645 // for buddha (lowres) 649 /*positions.push_back(Vector3(6.07307, 8.20723, 6.62));646 positions.push_back(Vector3(6.07307, 8.20723, 6.62)); 650 647 positions.push_back(Vector3(-17.1935, 11.1687, 8.8781)); 651 positions.push_back(Vector3(1.50032, 31.1943, 19.1f)); */648 positions.push_back(Vector3(1.50032, 31.1943, 19.1f)); 652 649 653 650 // for happy buddha … … 658 655 // for dragon 659 656 //positions.push_back(Vector3(6.07307, 8.20723, 5.0f)); 660 positions.push_back(Vector3(0, 0, -0.8));657 //positions.push_back(Vector3(0, 0, -0.8)); 661 658 662 659 #endif … … 666 663 667 664 //LoadModel("hbuddha.dem", dynamicObjects); 668 LoadModel("horse.dem", dynamicObjects);669 //LoadModel("happy.dem", dynamicObjects);665 //LoadModel("horse.dem", dynamicObjects); 666 LoadModel("happy.dem", dynamicObjects); 670 667 //LoadModel("dragon.dem", dynamicObjects); 671 668 //LoadModel("torus.dem", dynamicObjects); … … 681 678 } 682 679 680 /* 683 681 const float rotAngle = M_PI / 2.0f; 684 682 const Matrix4x4 rotMatrix = RotationXMatrix(rotAngle); … … 689 687 dynamicObjects[0]->GetTransform()->MultMatrix(scaleMatrix); 690 688 691 //dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix);692 //dynamicObjects[1]->GetTransform()->MultMatrix(scaleMatrix);693 694 //dynamicObjects[2]->GetTransform()->MultMatrix(rotMatrix);695 //dynamicObjects[2]->GetTransform()->MultMatrix(scaleMatrix);689 dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 690 dynamicObjects[1]->GetTransform()->MultMatrix(scaleMatrix); 691 692 dynamicObjects[2]->GetTransform()->MultMatrix(rotMatrix); 693 dynamicObjects[2]->GetTransform()->MultMatrix(scaleMatrix); 696 694 697 695 cout << "dynamic objects: " << (int)dynamicObjects.size() << endl; 698 696 */ 699 697 CreateAnimation(positions[0]); 698 700 699 #endif 701 700 … … 827 826 // buffer holding the difference vector to the old frame 828 827 fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 828 //fbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 829 829 // another color buffer 830 830 fbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, ColorBufferObject::FILTER_NEAREST); … … 1172 1172 dynamicObjects[i]->GetTransform()->InitFrame(); 1173 1173 1174 if ( 0)//buddha)1174 if (buddha) 1175 1175 { 1176 1176 Matrix4x4 oldTrafo = buddha->GetTransform()->GetMatrix(); … … 1194 1194 #endif 1195 1195 1196 #if 01196 #if 1 1197 1197 ///////////////////////// 1198 1198 //-- update animations 1199 1199 1200 1200 //const float rotAngle = M_PI * 1e-3f; 1201 //const float rotAngle = 0.3f * M_PI / 180.0f;1202 const float rotAngle = 0.6f * M_PI / 180.0f;1201 const float rotAngle = 0.3f * M_PI / 180.0f; 1202 //const float rotAngle = 0.6f * M_PI / 180.0f; 1203 1203 1204 1204 Matrix4x4 rotMatrix = RotationZMatrix(rotAngle); … … 1206 1206 dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 1207 1207 1208 // hack: second buddha 1208 1209 const float rotAngle2 = 0.0033f * M_PI; 1209 1210 1210 Matrix4x4 rotMatrix2 = RotationZMatrix(rotAngle); 1211 // hack: second buddha1212 1211 //dynamicObjects[3]->GetTransform()->MultMatrix(rotMatrix2); 1213 1214 1212 1215 1213 //const float moveSpeed = 5e-3f;
Note: See TracChangeset
for help on using the changeset viewer.