[Opal-commits] opal/samples/playpen main.cpp,1.9,1.10
Status: Inactive
Brought to you by:
tylerstreeter
|
From: tylerstreeter <tyl...@us...> - 2005-04-15 08:50:52
|
Update of /cvsroot/opal/opal/samples/playpen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10352/samples/playpen Modified Files: main.cpp Log Message: changed Simulator::instantiateBlueprint to apply scaling (of Shape dimensions and Solid transforms) before applying the additional Blueprint transform; made the playpen sample app cool Index: main.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/playpen/main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main.cpp 12 Apr 2005 21:23:44 -0000 1.9 --- main.cpp 15 Apr 2005 08:50:42 -0000 1.10 *************** *** 45,49 **** /// A visual line that represents the PhysicalCamera's grasping /// spring. ! opalSamples::OgreLine* mGraspingSpringLine; }; --- 45,49 ---- /// A visual line that represents the PhysicalCamera's grasping /// spring. ! //opalSamples::OgreLine* mGraspingSpringLine; }; *************** *** 52,81 **** { mUseShadows = true; ! mCreationPoint.set(0, 30, 0); ! mGraspingSpringLine = NULL; } PlaypenApp::~PlaypenApp() { ! if (mGraspingSpringLine) ! { ! // Destroy the grasping line and its SceneNode. ! Ogre::SceneNode* sn = mGraspingSpringLine->getParentSceneNode(); ! // Detach and destroy all objects from the SceneNode. The ! // scene node should only have the OgreLine attached which ! // we must delete explicitly. ! while(sn->numAttachedObjects() > 0) ! { ! MovableObject* thisObject = ! sn->detachObject(static_cast<unsigned short>(0)); ! delete thisObject; ! } ! // Destroy the SceneNodes all of its children. ! sn->removeAndDestroyAllChildren(); ! mSceneMgr->getRootSceneNode()->removeAndDestroyChild( ! sn->getName()); ! } } --- 52,81 ---- { mUseShadows = true; ! mCreationPoint.set(-55, 60, -55); ! //mGraspingSpringLine = NULL; } PlaypenApp::~PlaypenApp() { ! //if (mGraspingSpringLine) ! //{ ! // // Destroy the grasping line and its SceneNode. ! // Ogre::SceneNode* sn = mGraspingSpringLine->getParentSceneNode(); ! // // Detach and destroy all objects from the SceneNode. The ! // // scene node should only have the OgreLine attached which ! // // we must delete explicitly. ! // while(sn->numAttachedObjects() > 0) ! // { ! // MovableObject* thisObject = ! // sn->detachObject(static_cast<unsigned short>(0)); ! // delete thisObject; ! // } ! // // Destroy the SceneNodes all of its children. ! // sn->removeAndDestroyAllChildren(); ! // mSceneMgr->getRootSceneNode()->removeAndDestroyChild( ! // sn->getName()); ! //} } *************** *** 93,97 **** //mSceneMgr->showBoundingBoxes(true); ! //mSimulator->setStepSize(0.001); // Set the ambient light level. --- 93,98 ---- //mSceneMgr->showBoundingBoxes(true); ! mSimulator->setStepSize(0.02); ! mSimulator->setGravity(opal::Vec3r(0, -30, 0)); // Set the ambient light level. *************** *** 106,110 **** // Setup the initial camera position. ! mPhysicalCamera->setPosition(opal::Point3r(0, 30, 50)); mPhysicalCamera->lookAt(opal::Point3r(0, 0, 0)); --- 107,111 ---- // Setup the initial camera position. ! mPhysicalCamera->setPosition(opal::Point3r(0, 20, 30)); mPhysicalCamera->lookAt(opal::Point3r(0, 0, 0)); *************** *** 112,127 **** mSceneMgr->setSkyBox(true, "Skyboxes/Gray", 5000); ! // Create the visual line used to represent the PhysicalCamera's // grasping spring. Just create two points for now that will // be updated later. ! mGraspingSpringLine = ! new opalSamples::OgreLine(); ! mGraspingSpringLine->addPoint(0, 0, 0); ! mGraspingSpringLine->addPoint(0, 0, 0); ! mGraspingSpringLine->update(); ! SceneNode* lineNode = ! mSceneMgr->getRootSceneNode()->createChildSceneNode("graspLine"); ! lineNode->attachObject(mGraspingSpringLine); ! mGraspingSpringLine->setVisible(false); // Make a crosshairs for picking. --- 113,150 ---- mSceneMgr->setSkyBox(true, "Skyboxes/Gray", 5000); ! // Create the visual line used to represent the PhysicalCamera's // grasping spring. Just create two points for now that will // be updated later. ! //mGraspingSpringLine = ! // new opalSamples::OgreLine(); ! //mGraspingSpringLine->addPoint(0, 0, 0); ! //mGraspingSpringLine->addPoint(0, 0, 0); ! //mGraspingSpringLine->update(); ! //SceneNode* lineNode = ! // mSceneMgr->getRootSceneNode()->createChildSceneNode("graspLine"); ! //lineNode->attachObject(mGraspingSpringLine); ! //mGraspingSpringLine->setCastShadows(false); ! //mGraspingSpringLine->setVisible(false); ! ! // Make a sphere used to show the grasp position. ! Ogre::SceneNode* sphereNode = mSceneMgr->getRootSceneNode()-> ! createChildSceneNode("pickingSphere0"); ! sphereNode->scale(0.3, 0.3, 0.3); ! Entity* sphereEntity = mSceneMgr->createEntity("pickingSphere", ! "sphere.mesh"); ! sphereEntity->setMaterialName("Unlit/Yellow"); ! sphereEntity->setCastShadows(false); ! sphereEntity->setVisible(false); ! sphereNode->attachObject(sphereEntity); ! ! // Make a "line" (scaled cylinder) to show the grasping spring. ! Ogre::SceneNode* lineNode = mSceneMgr->getRootSceneNode()-> ! createChildSceneNode("springLine"); ! Entity* lineEntity = mSceneMgr->createEntity("springLine", ! "cylinder.mesh"); ! lineEntity->setMaterialName("Unlit/White"); ! lineEntity->setCastShadows(false); ! lineEntity->setVisible(false); ! lineNode->attachObject(lineEntity); // Make a crosshairs for picking. *************** *** 142,170 **** if (mPhysicalCamera->isGrasping()) { ! // Update the first point using the desired position. ! opal::Point3r graspPos = mPhysicalCamera->getGraspGlobalPos(); ! Ogre::Vector3 point(graspPos[0], graspPos[1], graspPos[2]); ! mGraspingSpringLine->setPoint(0, point); - // Update the second point using the spring's attach point. opal::Point3r attachPos = mPhysicalCamera->getAttachGlobalPos(); ! point[0] = attachPos[0]; ! point[1] = attachPos[1]; ! point[2] = attachPos[2]; ! mGraspingSpringLine->setPoint(1, point); ! mGraspingSpringLine->update(); ! if (mGraspingSpringLine->isVisible() == false) { ! mGraspingSpringLine->setVisible(true); } } else { ! if (mGraspingSpringLine->isVisible() == true) { ! mGraspingSpringLine->setVisible(false); } } --- 165,234 ---- if (mPhysicalCamera->isGrasping()) { ! Ogre::Entity* pickingSphere = ! mSceneMgr->getEntity("pickingSphere"); ! if (!pickingSphere->isVisible()) ! { ! pickingSphere->setVisible(true); ! } ! ! Ogre::Entity* springLine = ! mSceneMgr->getEntity("springLine"); ! if (!springLine->isVisible()) ! { ! springLine->setVisible(true); ! } ! ! //if (!mGraspingSpringLine->isVisible()) ! //{ ! // mGraspingSpringLine->setVisible(true); ! //} ! ! opal::Point3r desiredPos = mPhysicalCamera->getGraspGlobalPos(); ! Ogre::Vector3 point0(desiredPos[0], desiredPos[1], desiredPos[2]); ! //mGraspingSpringLine->setPoint(0, point); opal::Point3r attachPos = mPhysicalCamera->getAttachGlobalPos(); ! Ogre::Vector3 point1(attachPos[0], attachPos[1], attachPos[2]); ! //mGraspingSpringLine->setPoint(1, point); ! //mGraspingSpringLine->update(); ! pickingSphere->getParentSceneNode()->setPosition(point1); ! ! Ogre::Vector3 lineVec = point0 - point1; ! if (!lineVec.isZeroLength()) { ! Ogre::SceneNode* springLineNode = ! springLine->getParentSceneNode(); ! springLineNode->setPosition(0.5 * (point0 + point1)); ! ! springLineNode->setDirection(lineVec); ! springLineNode->setScale(0.1, 0.1, lineVec.length()); ! } ! else ! { ! springLine->setVisible(false); } } else { ! Ogre::Entity* pickingSphere = ! mSceneMgr->getEntity("pickingSphere"); ! if (pickingSphere->isVisible()) { ! pickingSphere->setVisible(false); ! } ! ! Ogre::Entity* springLine = ! mSceneMgr->getEntity("springLine"); ! if (springLine->isVisible()) ! { ! springLine->setVisible(false); } + + //if (mGraspingSpringLine->isVisible()) + //{ + // mGraspingSpringLine->setVisible(false); + //} } *************** *** 206,210 **** if(mInputDevice->isKeyDown(KC_1) && mTimeUntilNextToggle <= 0) { ! Ogre::Vector3 boxDim(1, 1, 1); opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); --- 270,274 ---- if(mInputDevice->isKeyDown(KC_1) && mTimeUntilNextToggle <= 0) { ! Ogre::Vector3 boxDim(2, 2, 2); opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); *************** *** 212,216 **** data.dimensions.set(boxDim[0], boxDim[1], boxDim[2]); s->addShape(data); ! createPhysicalEntityBox("", "Plastic/Red", boxDim, s); // Reset the timer for toggle keys. --- 276,280 ---- data.dimensions.set(boxDim[0], boxDim[1], boxDim[2]); s->addShape(data); ! createPhysicalEntityBox("", "Plastic/Yellow", boxDim, s); // Reset the timer for toggle keys. *************** *** 221,225 **** if(mInputDevice->isKeyDown(KC_2) && mTimeUntilNextToggle <= 0) { ! Ogre::Real radius = 0.5; opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); --- 285,289 ---- if(mInputDevice->isKeyDown(KC_2) && mTimeUntilNextToggle <= 0) { ! Ogre::Real radius = 1; opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); *************** *** 227,231 **** data.radius = radius; s->addShape(data); ! createPhysicalEntitySphere("", "Plastic/Blue", radius, s); // Reset the timer for toggle keys. --- 291,295 ---- data.radius = radius; s->addShape(data); ! createPhysicalEntitySphere("", "Plastic/Purple", radius, s); // Reset the timer for toggle keys. *************** *** 236,240 **** if(mInputDevice->isKeyDown(KC_3) && mTimeUntilNextToggle <= 0) { ! Ogre::Vector3 boxDim(2, 2, 8); opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); --- 300,304 ---- if(mInputDevice->isKeyDown(KC_3) && mTimeUntilNextToggle <= 0) { ! Ogre::Vector3 boxDim(5, 5, 5); opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); *************** *** 251,255 **** if(mInputDevice->isKeyDown(KC_4) && mTimeUntilNextToggle <= 0) { ! Ogre::Real radius = 1.68; // testing opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); --- 315,319 ---- if(mInputDevice->isKeyDown(KC_4) && mTimeUntilNextToggle <= 0) { ! Ogre::Real radius = 3; // testing opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); *************** *** 264,277 **** } ! // Create a large box. if(mInputDevice->isKeyDown(KC_5) && mTimeUntilNextToggle <= 0) { ! Ogre::Vector3 boxDim(16, 16, 16); opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); opal::BoxShapeData data; data.dimensions.set(boxDim[0], boxDim[1], boxDim[2]); s->addShape(data); ! createPhysicalEntityBox("", "Plastic/Red", boxDim, s); // Reset the timer for toggle keys. --- 328,342 ---- } ! // Create a long box. if(mInputDevice->isKeyDown(KC_5) && mTimeUntilNextToggle <= 0) { ! Ogre::Vector3 boxDim(3, 10, 5); opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); opal::BoxShapeData data; data.dimensions.set(boxDim[0], boxDim[1], boxDim[2]); + data.material.density = 10; s->addShape(data); ! createPhysicalEntityBox("", "Plastic/Green", boxDim, s); // Reset the timer for toggle keys. *************** *** 279,292 **** } ! // Create a large sphere. if(mInputDevice->isKeyDown(KC_6) && mTimeUntilNextToggle <= 0) { ! Ogre::Real radius = 8; opal::Solid* s = mSimulator->createSolid(); s->setPosition(mCreationPoint); ! opal::SphereShapeData data; ! data.radius = radius; s->addShape(data); ! createPhysicalEntitySphere("", "Plastic/Blue", radius, s); // Reset the timer for toggle keys. --- 344,370 ---- } ! // Create a log. if(mInputDevice->isKeyDown(KC_6) && mTimeUntilNextToggle <= 0) { ! Ogre::Real logScale = 9; ! Ogre::Vector3 boxDim(0.4243, 0.4243, 2); ! boxDim *= logScale; opal::Solid* s = mSimulator->createSolid(); + opal::Matrix44r m; + m.rotate(90, 1, 0, 0); + s->setTransform(m); s->setPosition(mCreationPoint); ! opal::BoxShapeData data; ! data.dimensions.set(boxDim[0], boxDim[1], boxDim[2]); s->addShape(data); ! ! std::string name = generateUniqueName(); ! Ogre::SceneNode* sn = mSceneMgr->getRootSceneNode()-> ! createChildSceneNode(name); ! sn->scale(logScale, logScale, logScale); ! Entity* e = mSceneMgr->createEntity(name, "log.mesh"); ! e->setMaterialName("Textured/Wood"); ! sn->attachObject(e); ! createPhysicalEntity(name, sn, s); // Reset the timer for toggle keys. *************** *** 297,301 **** if(mInputDevice->isKeyDown(KC_7) && mTimeUntilNextToggle <= 0) { ! createWall(6, 8, opal::Vec3r(2, 1, 1)); // Reset the timer for toggle keys. --- 375,382 ---- if(mInputDevice->isKeyDown(KC_7) && mTimeUntilNextToggle <= 0) { ! opal::Matrix44r m; ! m.rotate(45, 0, 1, 0); ! m.translate(0, 0, -20); ! createWall(6, 8, opal::Vec3r(3, 1.5, 1.5), m); // Reset the timer for toggle keys. *************** *** 306,310 **** if(mInputDevice->isKeyDown(KC_8) && mTimeUntilNextToggle <= 0) { ! createTower(2, 2, 20, opal::Vec3r(2, 1, 1)); // Reset the timer for toggle keys. --- 387,391 ---- if(mInputDevice->isKeyDown(KC_8) && mTimeUntilNextToggle <= 0) { ! createTower(2, 2, 15, opal::Vec3r(3, 1.5, 1.5)); // Reset the timer for toggle keys. *************** *** 312,380 **** } ! // Create a medium capsule. if(mInputDevice->isKeyDown(KC_9) && mTimeUntilNextToggle <= 0) { ! Ogre::Real radius = 0.6; ! Ogre::Real length = 4; ! opal::Solid* s = mSimulator->createSolid(); ! s->setPosition(mCreationPoint); ! opal::CapsuleShapeData data; ! data.radius = radius; ! data.length = length; ! s->addShape(data); ! createPhysicalEntityCapsule("", "Plastic/Blue", radius, length, ! s); ! ! // Reset the timer for toggle keys. ! mTimeUntilNextToggle = 0.3; ! } ! ! //// testing ! //if(mInputDevice->isKeyDown(KC_0) && mTimeUntilNextToggle <= 0) ! //{ ! // opal::Blueprint ragdollBP; ! // opal::loadFile(ragdollBP, "SwitcherSceneOpal.xml"); ! // opal::Matrix44r offset; ! // offset.translate(0, 2, 0); ! // offset.rotate(-90, 1, 0, 0); ! // // Instantiate the Blueprint. ! // opal::BlueprintInstance instance; ! // mSimulator->instantiateBlueprint(instance, ragdollBP, offset, 10); ! // unsigned int i=0; ! // for (i=0; i<instance.getNumSolids(); ++i) ! // { ! // opal::Solid* s = instance.getSolid(i); ! // const opal::SolidData& data = s->getData(); ! // unsigned int j=0; ! // for (j=0; j<data.getNumShapes(); ++j) ! // { ! // opal::ShapeData* shapeData = data.getShapeData(j); ! // switch(shapeData->getType()) ! // { ! // case opal::BOX_SHAPE: ! // { ! // opal::Vec3r dim = ((opal::BoxShapeData*)shapeData)->dimensions; ! // Ogre::Vector3 boxDim(dim[0], dim[1], dim[2]); ! // createPhysicalEntityBox("", "Plastic/Gray", boxDim, s); ! // break; ! // } ! // case opal::SPHERE_SHAPE: ! // { ! // opal::real r = ((opal::SphereShapeData*)shapeData)->radius; ! // createPhysicalEntitySphere("", "Plastic/Gray", r, s); ! // break; ! // } ! // default: ! // assert(false); ! // } ! // } ! // } ! // // Reset the timer for toggle keys. ! // mTimeUntilNextToggle = 0.5; ! //} // The following code updates the camera's position. --- 393,450 ---- } ! // Create a ragdoll. if(mInputDevice->isKeyDown(KC_9) && mTimeUntilNextToggle <= 0) { ! opal::Blueprint ragdollBP; ! opal::loadFile(ragdollBP, "../../data/blueprints/ragdoll.xml"); ! opal::Matrix44r transform; ! transform.translate(mCreationPoint[0], mCreationPoint[1] - 5, ! mCreationPoint[2]); ! // Instantiate the Blueprint. ! opal::BlueprintInstance instance; ! mSimulator->instantiateBlueprint(instance, ragdollBP, transform, 12); ! unsigned int i=0; ! for (i=0; i<instance.getNumSolids(); ++i) ! { ! opal::Solid* s = instance.getSolid(i); ! const opal::SolidData& data = s->getData(); ! unsigned int j=0; ! for (j=0; j<data.getNumShapes(); ++j) ! { ! opal::ShapeData* shapeData = data.getShapeData(j); ! switch(shapeData->getType()) ! { ! case opal::BOX_SHAPE: ! { ! opal::Vec3r dim = ((opal::BoxShapeData*)shapeData)->dimensions; ! Ogre::Vector3 boxDim(dim[0], dim[1], dim[2]); ! createPhysicalEntityBox("", "Plastic/LightBlue", boxDim, s); ! break; ! } ! case opal::SPHERE_SHAPE: ! { ! opal::real r = ((opal::SphereShapeData*)shapeData)->radius; ! createPhysicalEntitySphere("", "Plastic/LightBlue", r, s); ! break; ! } ! case opal::CAPSULE_SHAPE: ! { ! opal::real r = ((opal::CapsuleShapeData*)shapeData)->radius; ! opal::real l = ((opal::CapsuleShapeData*)shapeData)->length; ! createPhysicalEntityCapsule("", "Plastic/LightBlue", r, l, s); ! break; ! } ! default: ! assert(false); ! } ! } ! } ! // Reset the timer for toggle keys. ! mTimeUntilNextToggle = 0.5; ! } // The following code updates the camera's position. *************** *** 511,523 **** //sn->rotate(Ogre::Vector3(1, 0, 0), angle); // Create a static box for a ground plane. ! Ogre::Vector3 groundDim(100, 8, 100); opal::Solid* s = mSimulator->createSolid(); s->setStatic(true); s->setPosition(0, -4, 0); opal::BoxShapeData data; ! data.dimensions.set(groundDim[0], groundDim[1], groundDim[2]); s->addShape(data); ! createPhysicalEntityBox("ground", "Plastic/Gray", groundDim, s); } --- 581,652 ---- //sn->rotate(Ogre::Vector3(1, 0, 0), angle); + opal::Matrix44r m; + // Create a static box for a ground plane. ! Ogre::Vector3 boxDim(70, 8, 70); opal::Solid* s = mSimulator->createSolid(); s->setStatic(true); s->setPosition(0, -4, 0); opal::BoxShapeData data; ! data.dimensions.set(boxDim[0], boxDim[1], boxDim[2]); s->addShape(data); ! createPhysicalEntityBox("ground", "Plastic/Gray", boxDim, s); ! ! // Setup the "object creation tube". ! boxDim.x = 1; ! boxDim.y = 20; ! boxDim.z = 8; ! data.dimensions.set(boxDim[0], boxDim[1], boxDim[2]); ! ! s = mSimulator->createSolid(); ! s->setStatic(true); ! m.makeTranslation(mCreationPoint[0] + 0.5 * boxDim.z, ! mCreationPoint[1], mCreationPoint[2] + 0.5 * boxDim.x); ! s->setTransform(m); ! s->addShape(data); ! createPhysicalEntityBox("tube0", "Plastic/LightGray", boxDim, s); ! ! s = mSimulator->createSolid(); ! s->setStatic(true); ! m.makeTranslation(mCreationPoint[0] - 0.5 * boxDim.z, ! mCreationPoint[1], mCreationPoint[2] - 0.5 * boxDim.x); ! s->setTransform(m); ! s->addShape(data); ! createPhysicalEntityBox("tube1", "Plastic/LightGray", boxDim, s); ! ! s = mSimulator->createSolid(); ! s->setStatic(true); ! m.makeRotation(90, 0, 1, 0); ! m.translate(-mCreationPoint[2] + 0.5 * boxDim.z, mCreationPoint[1], ! mCreationPoint[0] + 0.5 * boxDim.x); ! s->setTransform(m); ! s->addShape(data); ! createPhysicalEntityBox("tube2", "Plastic/LightGray", boxDim, s); ! ! s = mSimulator->createSolid(); ! s->setStatic(true); ! m.makeRotation(90, 0, 1, 0); ! m.translate(-mCreationPoint[2] - 0.5 * boxDim.z, mCreationPoint[1], ! mCreationPoint[0] - 0.5 * boxDim.x); ! s->setTransform(m); ! s->addShape(data); ! createPhysicalEntityBox("tube3", "Plastic/LightGray", boxDim, s); ! ! // Make a slide under the object creation tube. ! boxDim.x = 60; ! boxDim.y = 1; ! boxDim.z = 15; ! data.dimensions.set(boxDim[0], boxDim[1], boxDim[2]); ! data.material.friction = 0.00001; ! s = mSimulator->createSolid(); ! s->setStatic(true); ! m.makeTranslation(mCreationPoint[0], mCreationPoint[1] - 33, ! mCreationPoint[2]); ! m.rotate(-45, 0, 1, 0); ! m.translate(0.3 * boxDim.x, 0, 0); ! m.rotate(-30, 0, 0, 1); ! s->setTransform(m); ! s->addShape(data); ! createPhysicalEntityBox("slide", "Plastic/DarkGray", boxDim, s); } *************** *** 545,549 **** opal::BoxShapeData boxData; boxData.dimensions = boxDim; ! boxData.material.density = 500; s->addShape(boxData); Ogre::Vector3 boxDimensions(boxDim[0], boxDim[1], boxDim[2]); --- 674,678 ---- opal::BoxShapeData boxData; boxData.dimensions = boxDim; ! boxData.material.density = 20; s->addShape(boxData); Ogre::Vector3 boxDimensions(boxDim[0], boxDim[1], boxDim[2]); *************** *** 599,628 **** createWall(length, height, boxDim, wallBaseTransform); - - //for (unsigned int l=0; l<length; ++l) - //{ - // for (unsigned int h=0; h<height; ++h) - // { - // opal::real offset = 0; - // if (h % 2 == 0) - // { - // offset = (opal::real)0.5 * boxDim[0]; - // } - - // opal::Matrix44r blockTransform = wallBaseTransform; - // blockTransform.translate(l * boxDim[0] + - // 0.5 * boxDim[0] - 0.5 * length * boxDim[0] + - // offset, h * boxDim[1] + 0.5 * boxDim[1], 0); - - // opal::Solid* s = mSimulator->createSolid(); - // s->setTransform(blockTransform); - // s->setSleeping(true); - // opal::BoxShapeData boxData; - // boxData.dimensions = boxDim; - // s->addShape(boxData); - // Ogre::Vector3 boxDimensions(boxDim[0], boxDim[1], boxDim[2]); - // createPhysicalEntityBox("", "Plastic/Red", boxDimensions, s); - // } - //} } } --- 728,731 ---- |