[Opal-commits] opal/samples/simple_objects main.cpp,1.28,1.29 simple_objects.vcproj,1.10,1.11
Status: Inactive
Brought to you by:
tylerstreeter
|
From: tylerstreeter <tyl...@us...> - 2005-04-01 23:14:16
|
Update of /cvsroot/opal/opal/samples/simple_objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30340/samples/simple_objects Modified Files: main.cpp simple_objects.vcproj Log Message: added stuff to the playpen sample app Index: main.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/simple_objects/main.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** main.cpp 30 Mar 2005 23:26:21 -0000 1.28 --- main.cpp 1 Apr 2005 23:13:49 -0000 1.29 *************** *** 29,34 **** //float gMousePosWorld[2]; bool gMouseButtonsPressed[2]; ! const float gRotateSpeed = 3; ! const float gZoomSpeed = 3; opal::Simulator* gSimulator=NULL; std::vector<Base3DObject*> gObjects; --- 29,34 ---- //float gMousePosWorld[2]; bool gMouseButtonsPressed[2]; ! const float gRotateSpeed = 1; ! const float gZoomSpeed = 1; opal::Simulator* gSimulator=NULL; std::vector<Base3DObject*> gObjects; *************** *** 94,108 **** // Create and setup a Solid for the ground. ! gGround = gSimulator->createSolid(); ! gGround->setStatic(true); ! ! // Add a plane Shape to the Solid. ! opal::PlaneShapeData planeData; ! planeData.material = gGroundMaterial; ! planeData.abcd[0] = gGroundParams[0]; ! planeData.abcd[1] = gGroundParams[1]; ! planeData.abcd[2] = gGroundParams[2]; ! planeData.abcd[3] = gGroundParams[3]; ! gGround->addShape(planeData); // Create the objects used for picking. --- 94,99 ---- // Create and setup a Solid for the ground. ! gGround = gSimulator->createPlane(gGroundParams[0], gGroundParams[1], ! gGroundParams[2], gGroundParams[3], gGroundMaterial); // Create the objects used for picking. *************** *** 147,151 **** // Load the ragdoll Blueprint. ! opal::loadFile(gRagdollBP, "ragdoll.xml"); InitSDL(); --- 138,143 ---- // Load the ragdoll Blueprint. ! //opal::loadFile(gRagdollBP, "ragdoll.xml"); ! opal::loadFile(gRagdollBP, "SwitcherSceneOpal.xml"); InitSDL(); *************** *** 169,178 **** opal::Matrix44r offset; offset.translate(0, 2, 0); // Instantiate the Blueprint. opal::BlueprintInstance instance; ! gSimulator->instantiateBlueprint(instance, gRagdollBP, offset); ! int i=0; for (i=0; i<instance.getNumSolids(); ++i) { --- 161,171 ---- opal::Matrix44r offset; offset.translate(0, 2, 0); + offset.rotate(-90, 1, 0, 0); // Instantiate the Blueprint. opal::BlueprintInstance instance; ! gSimulator->instantiateBlueprint(instance, gRagdollBP, offset, 10); ! unsigned int i=0; for (i=0; i<instance.getNumSolids(); ++i) { *************** *** 220,224 **** { const opal::SolidData& data = s->getData(); ! int i=0; for (i=0; i<data.getNumShapes(); ++i) { --- 213,217 ---- { const opal::SolidData& data = s->getData(); ! unsigned int i=0; for (i=0; i<data.getNumShapes(); ++i) { *************** *** 500,507 **** break; case SDLK_a: ! gCameraZoom -= gZoomSpeed; break; case SDLK_z: ! gCameraZoom += gZoomSpeed; break; case SDLK_ESCAPE: //fall through --- 493,500 ---- break; case SDLK_a: ! gCameraZoom += gZoomSpeed; break; case SDLK_z: ! gCameraZoom -= gZoomSpeed; break; case SDLK_ESCAPE: //fall through *************** *** 836,840 **** void drawPickingSpring() ! { if (!gPickingSpring->isEnabled()) { --- 829,833 ---- void drawPickingSpring() ! {return; if (!gPickingSpring->isEnabled()) { Index: simple_objects.vcproj =================================================================== RCS file: /cvsroot/opal/opal/samples/simple_objects/simple_objects.vcproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** simple_objects.vcproj 1 Mar 2005 05:04:20 -0000 1.10 --- simple_objects.vcproj 1 Apr 2005 23:13:50 -0000 1.11 *************** *** 33,36 **** --- 33,37 ---- <Tool Name="VCLinkerTool" + AdditionalOptions="/STACK:10000000" AdditionalDependencies="opengl32.lib glu32.lib SDL.lib SDLmain.lib opal-ode_d.lib" OutputFile="$(OutDir)/simple_objects.exe" *************** *** 84,87 **** --- 85,89 ---- <Tool Name="VCLinkerTool" + AdditionalOptions="/STACK:10000000" AdditionalDependencies="opengl32.lib glu32.lib SDL.lib SDLmain.lib opal-ode.lib" OutputFile="$(OutDir)/simple_objects.exe" |