opal-commits Mailing List for Open Physics Abstraction Layer (Page 22)
Status: Inactive
Brought to you by:
tylerstreeter
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
(162) |
Mar
(134) |
Apr
(113) |
May
(13) |
Jun
(60) |
Jul
(18) |
Aug
(25) |
Sep
|
Oct
(2) |
Nov
(35) |
Dec
(76) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(3) |
Apr
(8) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(1) |
Mar
(12) |
Apr
(16) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
|
Dec
(3) |
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(15) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: tylerstreeter <tyl...@us...> - 2005-03-04 23:27:05
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21757/src Modified Files: AttractorMotor.cpp BlueprintManager.cpp Defines.h Joint.h Simulator.h Solid.h Log Message: added a define to conditionally compile mesh support (mainly for ODE on IRIX which can't use trimeshes); removed some old commented-out code Index: Defines.h =================================================================== RCS file: /cvsroot/opal/opal/src/Defines.h,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** Defines.h 3 Mar 2005 02:32:28 -0000 1.64 --- Defines.h 4 Mar 2005 23:26:53 -0000 1.65 *************** *** 50,55 **** class Joint; - // TODO: output/logging functions - /// Types of Forces. Used when creating a Force struct to designate /// how the Forces should be applied to a Solid. --- 50,53 ---- *************** *** 399,440 **** } } - - // Structs used for Blueprints... - - /// Data structure for storing user-defined properties loaded from XML - /// files. - //struct UserProperty - //{ - // std::string name; - // std::string value; - //}; - - ///// TODO: replace with SpaceData? - //struct SpaceDescription - //{ - // ~SpaceDescription() - // { - // solidNameList.clear(); - // } - - // // TODO: this needs an operator= and copy constructor - - // bool containsSolid(const std::string& name) - // { - // std::vector<std::string>::iterator iter; - // for (iter = solidNameList.begin(); iter != solidNameList.end(); - // ++iter) - // { - // if (name == (*iter)) - // { - // return true; - // } - // } - - // return false; - // } - - // std::vector<std::string> solidNameList; - //}; } --- 397,400 ---- Index: BlueprintManager.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintManager.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** BlueprintManager.cpp 26 Feb 2005 10:22:23 -0000 1.28 --- BlueprintManager.cpp 4 Mar 2005 23:26:53 -0000 1.29 *************** *** 1293,1297 **** rayData->ray.setDir(dir); } ! // TODO: add MESH_SHAPE type? else { --- 1293,1297 ---- rayData->ray.setDir(dir); } ! // MESH_SHAPE type not supported in OPAL XML. else { Index: Solid.h =================================================================== RCS file: /cvsroot/opal/opal/src/Solid.h,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** Solid.h 1 Mar 2005 05:04:22 -0000 1.79 --- Solid.h 4 Mar 2005 23:26:54 -0000 1.80 *************** *** 74,81 **** virtual void OPAL_CALL setEnabled(bool e); - //virtual Vec3r OPAL_CALL getGlobalLinearAccel()const; - - //virtual Vec3r OPAL_CALL getGlobalAngularAccel()const; - /// Returns true if this is a static Solid. virtual bool OPAL_CALL isStatic()const; --- 74,77 ---- *************** *** 147,197 **** virtual void OPAL_CALL addShape(const ShapeData& data) = 0; - ///// Adds a box Shape to this Solid. - //virtual void OPAL_CALL addBox(const Vec3r& dimensions, - // const Matrix44r& offset = Matrix44r(), - // const Material& m = defaults::material) = 0; - - ///// Adds a sphere Shape to this Solid. - //virtual void OPAL_CALL addSphere(real radius, - // const Matrix44r& offset = Matrix44r(), - // const Material& m = defaults::material) = 0; - - ///// Adds a plane Shape to this Solid. abcd are used to define - ///// the plane equation a*x + b*y + c*z = d. - //virtual void OPAL_CALL addPlane(real abcd[4], - // const Material& m = defaults::material) = 0; - - //// alternate plane definition method; uses a point on the plane and - //// the plane normal - ////void addPlane(const Point3r& point, const Vec3r& normal, - //// const Material& m = defaults::material); - - ////note: normal cylinders are not yet part of standard ODE - ////virtual void addCylinder(real radius, real length, - //// const Matrix44r& offset = Matrix44r(), - //// const Material& m = defaults::material) = 0; - - ///// Adds a capsule Shape to this Solid. - //virtual void OPAL_CALL addCapsule(real radius, real length, - // const Matrix44r& offset = Matrix44r(), - // const Material& m = defaults::material) = 0; - - ///// Adds a ray Shape to this Solid. - //virtual void OPAL_CALL addRay(const Point3r& origin, - // const Vec3r& dir, real length, - // const Matrix44r& offset = Matrix44r(), - // const Material& m = defaults::material) = 0; - - ///// The data pointers passed in here must remain valid because no data - ///// is stored within the Solid. It is critical that the size of the - ///// data type used in these arrays (i.e. OPAL real) matches the size - ///// of the data type expected by the underlying physics engine. - //virtual void OPAL_CALL addMesh(const real* vertexArray[3], - // int numVertices, const int* faceArray, int numFaces, - // const Matrix44r& offset = Matrix44r(), - // const Material& m = defaults::material) = 0; - - ////virtual void addCHull(); - /// Applies a force/torque to this Solid. If the Solid is disabled, /// the Solid is static, or the magnitude of the force/torque is --- 143,146 ---- *************** *** 199,232 **** virtual void OPAL_CALL addForce(const Force& f); - //virtual void OPAL_CALL addLocalForce(const Vec3r& force, - // real duration=-1.0); - - //virtual void OPAL_CALL addGlobalForce(const Vec3r& force, - // real duration=-1.0); - - //virtual void OPAL_CALL addLocalForceAtLocalPos(const Vec3r& force, - // const Point3r& pos, real duration=-1.0); - - //virtual void OPAL_CALL addLocalForceAtGlobalPos(const Vec3r& force, - // const Point3r& pos, real duration=-1.0); - - //virtual void OPAL_CALL addGlobalForceAtLocalPos(const Vec3r& force, - // const Point3r& pos, real duration=-1.0); - - //virtual void OPAL_CALL addGlobalForceAtGlobalPos(const Vec3r& force, - // const Point3r& pos, real duration=-1.0); - - //virtual void OPAL_CALL addLocalTorque(const Vec3r& axis, - // real duration=-1.0); - - //virtual void OPAL_CALL addGlobalTorque(const Vec3r& axis, - // real duration=-1.0); - - //virtual void OPAL_CALL addLocalTorque(real amount, Vec3r axis, - // real duration=-1.0); - - //virtual void OPAL_CALL addGlobalTorque(real amount, Vec3r axis, - // real duration=-1.0); - /// Sets the Solid's linear velocity in local coordinates. virtual void OPAL_CALL setLocalLinearVel(const Vec3r& vel) = 0; --- 148,151 ---- *************** *** 275,284 **** virtual real OPAL_CALL getMass()const = 0; - // TODO: replace with SolidData functions? - //virtual BodyState OPAL_CALL getState()const; - - // TODO: replace with SolidData functions? - //virtual void OPAL_CALL setState(const BodyState & s); - /// Update the OPAL transform using the physics engine transform. virtual void OPAL_CALL internal_updateOPALTransform() = 0; --- 194,197 ---- *************** *** 306,318 **** SolidData mData; - /// This Solids's transform corresponding to its center of mass. - //Matrix44r mTransform; - - /// True if this Solid is enabled. - //bool mEnabled; - - /// True if this Solid is static. - //bool mStatic; - /// Pointer to this Solid's event handler. EventHandler* mEventHandler; --- 219,222 ---- *************** *** 322,336 **** void* mUserData; - //Vec3r mPrevGlobalLinearVel; - //Vec3r mPrevGlobalAngularVel; - //Vec3r mGlobalLinearAccel; - //Vec3r mGlobalAngularAccel; - - /// The amount of linear damping used by this Solid. - //real mLinearDamping; - - /// The amount of angular damping used by this Solid. - //real mAngularDamping; - private: }; --- 226,229 ---- Index: Joint.h =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.h,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** Joint.h 4 Mar 2005 05:09:24 -0000 1.60 --- Joint.h 4 Mar 2005 23:26:53 -0000 1.61 *************** *** 60,73 **** virtual ~Joint(); - ///// Sets the type of Joint, the Solids attached to this Joint, and - ///// the Joint anchor and axes. Calling this - ///// more than once will automatically detach the Joint from its - ///// old Solids first. - //virtual void OPAL_CALL init(JointType type, Solid* s0, Solid* s1, - // const Point3r& anchor=Point3r(), - // const JointAxis& axis0=JointAxis(), - // const JointAxis& axis1=JointAxis(), - // const JointAxis& axis2=JointAxis()) = 0; - /// Initializes the Joint with the given data structure. Calling /// this more than once will automatically detach the Joint from --- 60,63 ---- *************** *** 105,114 **** virtual bool OPAL_CALL areLimitsEnabled(int axisNum); - ///// Sets limits for the given axis. - //virtual void OPAL_CALL setLimits(int axisNum, JointLimits l); - - ///// Returns the limits for the given axis. - //virtual const JointLimits& OPAL_CALL getLimits(int axisNum)const; - /// Sets the Joint's limit angles (in degrees for rotational axes, /// distance for translational axes). --- 95,98 ---- *************** *** 250,259 **** JointData mData; - ///// A pointer to Solid0. - //Solid* mSolid0; - - ///// A pointer to Solid1. - //Solid* mSolid1; - /// A pointer to the Joint's event handler. EventHandler* mEventHandler; --- 234,237 ---- *************** *** 271,303 **** bool mAxisRotational[3]; - //bool mEnabled; - - //breakable joint parameters - //JointBreakMode mBreakMode; //determines how damage is handled - //real mBreakThresh; //joint breaks if force/torque exceeds this value - - //// Force/torque exceeding this adds to accumulated damage. - //real mAccumThresh; - //real mAccumDamage; //the amount of accumulated damage - //bool mIsBroken; //set to true when broken - - //JointType mType; - - //TODO: move these into the JointData - //JointAxis mAxis[3]; - - //Point3r mAnchor; - - // Joint limits. - //bool mLimit0Enabled; - //bool mLimit1Enabled; - //bool mLimit2Enabled; - //real mLowLimit0; - //real mHighLimit0; - //real mLowLimit1; - //real mHighLimit1; - //real mLowLimit2; - //real mHighLimit2; - private: --- 249,252 ---- Index: AttractorMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/AttractorMotor.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** AttractorMotor.cpp 1 Mar 2005 05:04:22 -0000 1.18 --- AttractorMotor.cpp 4 Mar 2005 23:26:53 -0000 1.19 *************** *** 102,107 **** if (mData.enabled) { - // TODO: Try including the solids' masses (i.e. f = gmm/r^2). - Point3r pos1 = mData.solid0->getPosition(); Point3r pos2 = mData.solid1->getPosition(); --- 102,105 ---- Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** Simulator.h 3 Mar 2005 04:39:56 -0000 1.77 --- Simulator.h 4 Mar 2005 23:26:53 -0000 1.78 *************** *** 116,123 **** virtual Vec3r OPAL_CALL getGravity()const = 0; - //virtual void OPAL_CALL setDefaultSleepiness(real value); - - //virtual real OPAL_CALL getDefaultSleepiness()const; - /// Sets the accuracy level used by the physics engine's constraint /// solver. --- 116,119 ---- *************** *** 127,138 **** virtual SolverAccuracyLevel OPAL_CALL getSolverAccuracy()const; - //virtual void OPAL_CALL setDefaultLinearDamping(real ld); - - //virtual real OPAL_CALL getDefaultLinearDamping()const; - - //virtual void OPAL_CALL setDefaultAngularDamping(real ad); - - //virtual real OPAL_CALL getDefaultAngularDamping()const; - /// Sets the maximum linear velocity for any Solid. This limits /// Solid motion to prevent explosions from numerical innacuracy. --- 123,126 ---- *************** *** 275,281 **** real mTimeBuffer; - // ranges from 0.0 to 1.0; TODO: make this per-Solid - //real mSleepiness; - /// The accuracy level used internally by the physics engine's /// constraint solver. --- 263,266 ---- *************** *** 286,292 **** void* mUserData; - //real mDefaultLinearDamping; - //real mDefaultAngularDamping; - /// A limit on Solid motion to protect against simulation explosions /// due to numerical inaccuracy. --- 271,274 ---- *************** *** 297,302 **** real mMaxAngularVel; - //bool mAllowPartialFrames; - /// An internal list of all Solids. std::vector<Solid*> mSolidList; --- 279,282 ---- |
|
From: tylerstreeter <tyl...@us...> - 2005-03-04 23:27:05
|
Update of /cvsroot/opal/opal/vc7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21757/vc7 Modified Files: opal-ode.vcproj Log Message: added a define to conditionally compile mesh support (mainly for ODE on IRIX which can't use trimeshes); removed some old commented-out code Index: opal-ode.vcproj =================================================================== RCS file: /cvsroot/opal/opal/vc7/opal-ode.vcproj,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** opal-ode.vcproj 25 Feb 2005 06:40:26 -0000 1.13 --- opal-ode.vcproj 4 Mar 2005 23:26:55 -0000 1.14 *************** *** 26,30 **** FavorSizeOrSpeed="0" AdditionalIncludeDirectories="" ! PreprocessorDefinitions="WIN32;_DEBUG;_LIB;OPAL_DLL_EXPORTING;OPAL_USE_XML" MinimalRebuild="TRUE" BasicRuntimeChecks="0" --- 26,30 ---- FavorSizeOrSpeed="0" AdditionalIncludeDirectories="" ! PreprocessorDefinitions="WIN32;_DEBUG;_LIB;OPAL_DLL_EXPORTING;OPAL_USE_XML;OPAL_USE_MESH" MinimalRebuild="TRUE" BasicRuntimeChecks="0" *************** *** 75,79 **** FavorSizeOrSpeed="1" AdditionalIncludeDirectories="" ! PreprocessorDefinitions="WIN32;NDEBUG;_LIB;OPAL_DLL_EXPORTING;OPAL_USE_XML" RuntimeLibrary="2" UsePrecompiledHeader="0" --- 75,79 ---- FavorSizeOrSpeed="1" AdditionalIncludeDirectories="" ! PreprocessorDefinitions="WIN32;NDEBUG;_LIB;OPAL_DLL_EXPORTING;OPAL_USE_XML;OPAL_USE_MESH" RuntimeLibrary="2" UsePrecompiledHeader="0" |
|
From: tylerstreeter <tyl...@us...> - 2005-03-04 23:27:02
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21757 Modified Files: SConstruct todo.txt Log Message: added a define to conditionally compile mesh support (mainly for ODE on IRIX which can't use trimeshes); removed some old commented-out code Index: SConstruct =================================================================== RCS file: /cvsroot/opal/opal/SConstruct,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SConstruct 25 Feb 2005 06:40:26 -0000 1.6 --- SConstruct 4 Mar 2005 23:26:53 -0000 1.7 *************** *** 60,63 **** --- 60,64 ---- BoolOption('debug', 'Build in debug mode', False), BoolOption('XML', 'Build with XML saving/loading functions (TinyXML headers required)', True), + BoolOption('mesh', 'Build with Mesh Shape functionality', True), PathOption('extra_include_path', 'Additional include directory', '.'), PathOption('extra_lib_path', 'Additional lib directory', '.')) *************** *** 94,97 **** --- 95,102 ---- env.Append(CPPDEFINES = ['OPAL_USE_XML']) + # Add mesh support if desired + if env['mesh'] == True: + env.Append(CPPDEFINES = ['OPAL_USE_MESH']) + if len(COMMAND_LINE_TARGETS) != 0: printOptions(env['debug'], physicsEngine, env['XML']) Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** todo.txt 3 Mar 2005 02:32:28 -0000 1.48 --- todo.txt 4 Mar 2005 23:26:53 -0000 1.49 *************** *** 4,7 **** --- 4,10 ---- * look at scons dylib-building problem on os x + * add scons examples to readme + - mention that paths might need to be full paths + * fix memory allocation across dll boundary - volume collision check results -> put results in a specific class |
|
From: tylerstreeter <tyl...@us...> - 2005-03-04 05:10:04
|
Update of /cvsroot/opal/opal/samples/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10750/samples/src Modified Files: BoxObject.cpp BoxObject.h CapsuleObject.cpp CapsuleObject.h SphereObject.cpp SphereObject.h Log Message: changed how friction is used (now sqrt(f1*f2) instead of just f1*f2); minor changes to sample apps Index: CapsuleObject.h =================================================================== RCS file: /cvsroot/opal/opal/samples/src/CapsuleObject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CapsuleObject.h 1 Mar 2005 05:04:21 -0000 1.1 --- CapsuleObject.h 4 Mar 2005 05:09:23 -0000 1.2 *************** *** 8,12 **** public: CapsuleObject(opal::Simulator* sim, opal::Solid* s, opal::real radius, ! opal::real length); ~CapsuleObject(); --- 8,12 ---- public: CapsuleObject(opal::Simulator* sim, opal::Solid* s, opal::real radius, ! opal::real length, const opal::Matrix44r& offset); ~CapsuleObject(); *************** *** 21,24 **** --- 21,27 ---- opal::Solid* mSolid; opal::Simulator* mSim; + + // The offset from the Solid's base transform. + opal::Matrix44r mOffset; }; Index: SphereObject.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/src/SphereObject.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SphereObject.cpp 1 Mar 2005 05:04:21 -0000 1.7 --- SphereObject.cpp 4 Mar 2005 05:09:23 -0000 1.8 *************** *** 2,6 **** SphereObject::SphereObject(opal::Simulator* sim, opal::Solid* s, ! opal::real radius) : Base3DObject() { --- 2,6 ---- SphereObject::SphereObject(opal::Simulator* sim, opal::Solid* s, ! opal::real radius, const opal::Matrix44r& offset) : Base3DObject() { *************** *** 8,22 **** mRadius = radius; mSim = sim; ! ! //// Create and setup the Solid. ! //mSolid = sim->createSolid(); ! //mSolid->setStatic(isStatic); ! //mSolid->setTransform(transform); ! ! //// Add a Sphere Shape to the Solid. ! //opal::SphereShapeData sphereData; ! //sphereData.material = material; ! //sphereData.radius = radius; ! //mSolid->addShape(sphereData); } --- 8,12 ---- mRadius = radius; mSim = sim; ! mOffset = offset; } *************** *** 43,46 **** --- 33,37 ---- glPushMatrix(); glMultMatrixf(mSolid->getTransform().getData()); + glMultMatrixf(mOffset.getData()); DrawSphere(mRadius); glPopMatrix(); Index: SphereObject.h =================================================================== RCS file: /cvsroot/opal/opal/samples/src/SphereObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SphereObject.h 1 Mar 2005 05:04:21 -0000 1.4 --- SphereObject.h 4 Mar 2005 05:09:23 -0000 1.5 *************** *** 7,11 **** { public: ! SphereObject(opal::Simulator* sim, opal::Solid* s, opal::real radius); ~SphereObject(); --- 7,12 ---- { public: ! SphereObject(opal::Simulator* sim, opal::Solid* s, opal::real radius, ! const opal::Matrix44r& offset); ~SphereObject(); *************** *** 19,22 **** --- 20,26 ---- opal::Solid* mSolid; opal::Simulator* mSim; + + // The offset from the Solid's base transform. + opal::Matrix44r mOffset; }; Index: BoxObject.h =================================================================== RCS file: /cvsroot/opal/opal/samples/src/BoxObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BoxObject.h 1 Mar 2005 05:04:20 -0000 1.4 --- BoxObject.h 4 Mar 2005 05:09:23 -0000 1.5 *************** *** 7,11 **** { public: ! BoxObject(opal::Simulator* sim, opal::Solid* s, opal::Vec3r size); ~BoxObject(); --- 7,12 ---- { public: ! BoxObject(opal::Simulator* sim, opal::Solid* s, opal::Vec3r size, ! const opal::Matrix44r& offset); ~BoxObject(); *************** *** 19,22 **** --- 20,26 ---- opal::Solid* mSolid; opal::Simulator* mSim; + + // The offset from the Solid's base transform. + opal::Matrix44r mOffset; }; Index: CapsuleObject.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/src/CapsuleObject.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CapsuleObject.cpp 1 Mar 2005 05:04:21 -0000 1.1 --- CapsuleObject.cpp 4 Mar 2005 05:09:23 -0000 1.2 *************** *** 2,6 **** CapsuleObject::CapsuleObject(opal::Simulator* sim, opal::Solid* s, ! opal::real radius, opal::real length) : Base3DObject() { --- 2,6 ---- CapsuleObject::CapsuleObject(opal::Simulator* sim, opal::Solid* s, ! opal::real radius, opal::real length, const opal::Matrix44r& offset) : Base3DObject() { *************** *** 9,12 **** --- 9,13 ---- mLength = length; mSim = sim; + mOffset = offset; } *************** *** 33,36 **** --- 34,38 ---- glPushMatrix(); glMultMatrixf(mSolid->getTransform().getData()); + glMultMatrixf(mOffset.getData()); glPushMatrix(); glTranslatef(0.0, 0.0, -mLength * (opal::real)0.5); Index: BoxObject.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/src/BoxObject.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BoxObject.cpp 1 Mar 2005 05:04:20 -0000 1.8 --- BoxObject.cpp 4 Mar 2005 05:09:23 -0000 1.9 *************** *** 2,6 **** BoxObject::BoxObject(opal::Simulator* sim, opal::Solid* s, ! opal::Vec3r dimensions) : Base3DObject() { --- 2,6 ---- BoxObject::BoxObject(opal::Simulator* sim, opal::Solid* s, ! opal::Vec3r dimensions, const opal::Matrix44r& offset) : Base3DObject() { *************** *** 8,11 **** --- 8,12 ---- mDimensions = dimensions; mSim = sim; + mOffset = offset; } *************** *** 31,34 **** --- 32,36 ---- glPushMatrix(); glMultMatrixf(mSolid->getTransform().getData()); + glMultMatrixf(mOffset.getData()); DrawBox(mDimensions); glPopMatrix(); |
|
From: tylerstreeter <tyl...@us...> - 2005-03-04 05:10:03
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10750/src Modified Files: Joint.h ThrusterMotor.cpp ThrusterMotor.h Log Message: changed how friction is used (now sqrt(f1*f2) instead of just f1*f2); minor changes to sample apps Index: Joint.h =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.h,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Joint.h 3 Mar 2005 02:32:28 -0000 1.59 --- Joint.h 4 Mar 2005 05:09:24 -0000 1.60 *************** *** 112,116 **** /// Sets the Joint's limit angles (in degrees for rotational axes, ! /// distance for linear axes). /// No limits are applied /// if this is not called. The Wheel Joint does not --- 112,116 ---- /// Sets the Joint's limit angles (in degrees for rotational axes, ! /// distance for translational axes). /// No limits are applied /// if this is not called. The Wheel Joint does not *************** *** 120,128 **** /// Returns the low limit for a given axis (angle in degrees for ! /// rotational axes, distance for linear axes). virtual real OPAL_CALL getLowLimit(int axisNum)const; /// Returns the high limit for a given axis (angle in degrees for ! /// rotational axes, distance for linear axes). virtual real OPAL_CALL getHighLimit(int axisNum)const; --- 120,128 ---- /// Returns the low limit for a given axis (angle in degrees for ! /// rotational axes, distance for translational axes). virtual real OPAL_CALL getLowLimit(int axisNum)const; /// Returns the high limit for a given axis (angle in degrees for ! /// rotational axes, distance for translational axes). virtual real OPAL_CALL getHighLimit(int axisNum)const; *************** *** 146,164 **** /// For rotational axes, returns the current angle in degrees ! /// measured from the initial Joint configuration. For linear /// axes, simply returns 0. virtual real OPAL_CALL getAngle(int axisNum)const = 0; ! /// For linear axes, returns the distance from the initial Joint ! /// configuration. For rotational axes, simply returns 0. virtual real OPAL_CALL getDistance(int axisNum)const = 0; /// Returns the current rate (degrees per second for rotational ! /// axes, distance units per second for linear axes) for a /// given axis. virtual real OPAL_CALL getVelocity(int axisNum)const = 0; /// Applies a force to this Joint's Solids. To be used for ! /// linear Joints. This does nothing if the Joint is disabled. virtual void OPAL_CALL addForce(int axisNum, real magnitude, real duration, bool singleStep=false); --- 146,164 ---- /// For rotational axes, returns the current angle in degrees ! /// measured from the initial Joint configuration. For translational /// axes, simply returns 0. virtual real OPAL_CALL getAngle(int axisNum)const = 0; ! /// For translational axes, returns the distance from the initial ! /// Joint configuration. For rotational axes, simply returns 0. virtual real OPAL_CALL getDistance(int axisNum)const = 0; /// Returns the current rate (degrees per second for rotational ! /// axes, distance units per second for translational axes) for a /// given axis. virtual real OPAL_CALL getVelocity(int axisNum)const = 0; /// Applies a force to this Joint's Solids. To be used for ! /// translational axes. This does nothing if the Joint is disabled. virtual void OPAL_CALL addForce(int axisNum, real magnitude, real duration, bool singleStep=false); *************** *** 267,272 **** int mNumAxes; ! // This data stores which axes are rotational, as opposed to linear ! // degrees of freedom. bool mAxisRotational[3]; --- 267,272 ---- int mNumAxes; ! // This data stores which axes are rotational, as opposed to ! // translational, degrees of freedom. bool mAxisRotational[3]; Index: ThrusterMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/ThrusterMotor.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ThrusterMotor.h 1 Mar 2005 05:04:23 -0000 1.9 --- ThrusterMotor.h 4 Mar 2005 05:09:24 -0000 1.10 *************** *** 51,56 **** //virtual void OPAL_CALL init(Solid* solid); ! /// Initializes the Motor with the given data structure. Solid ! /// pointer in the data must be valid. virtual void OPAL_CALL init(const ThrusterMotorData& data); --- 51,57 ---- //virtual void OPAL_CALL init(Solid* solid); ! /// Initializes the Motor with the given data structure. The Solid ! /// pointer in the data must be valid. The Force in this data ! /// structure will automatically be set to a "single step" Force. virtual void OPAL_CALL init(const ThrusterMotorData& data); *************** *** 66,70 **** virtual void OPAL_CALL setEnabled(bool e); ! /// Sets the Force applied by this Motor every time step. virtual void OPAL_CALL setForce(const Force& f); --- 67,73 ---- virtual void OPAL_CALL setEnabled(bool e); ! /// Sets the Force applied by this Motor every time step. The ! /// Force in this data structure will automatically be set to a ! /// "single step" Force. virtual void OPAL_CALL setForce(const Force& f); Index: ThrusterMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ThrusterMotor.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ThrusterMotor.cpp 1 Mar 2005 05:04:23 -0000 1.8 --- ThrusterMotor.cpp 4 Mar 2005 05:09:24 -0000 1.9 *************** *** 53,56 **** --- 53,57 ---- Motor::init(); mData = data; + mData.force.singleStep = true; } *************** *** 96,99 **** --- 97,101 ---- { mData.force = f; + mData.force.singleStep = true; } |
|
From: tylerstreeter <tyl...@us...> - 2005-03-04 05:10:03
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10750/src/ODE Modified Files: ODESimulator.cpp Log Message: changed how friction is used (now sqrt(f1*f2) instead of just f1*f2); minor changes to sample apps Index: ODESimulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** ODESimulator.cpp 3 Mar 2005 04:39:57 -0000 1.82 --- ODESimulator.cpp 4 Mar 2005 05:09:24 -0000 1.83 *************** *** 415,420 **** else { ! tempContact.surface.mu = m0->friction * ! m1->friction * defaults::ode::maxFriction; } --- 415,421 ---- else { ! tempContact.surface.mu = ! sqrt(m0->friction * m1->friction) * ! defaults::ode::maxFriction; } |
|
From: tylerstreeter <tyl...@us...> - 2005-03-04 05:09:50
|
Update of /cvsroot/opal/opal/samples/simple_objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10750/samples/simple_objects Modified Files: main.cpp Log Message: changed how friction is used (now sqrt(f1*f2) instead of just f1*f2); minor changes to sample apps Index: main.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/simple_objects/main.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** main.cpp 3 Mar 2005 04:39:54 -0000 1.22 --- main.cpp 4 Mar 2005 05:09:23 -0000 1.23 *************** *** 189,193 **** { opal::Vec3r dim = ((opal::BoxShapeData*)shapeData)->dimensions; ! newObject = new BoxObject(gSimulator, s, dim); break; } --- 189,194 ---- { opal::Vec3r dim = ((opal::BoxShapeData*)shapeData)->dimensions; ! newObject = new BoxObject(gSimulator, s, dim, ! shapeData->offset); break; } *************** *** 195,199 **** { opal::real rad = ((opal::SphereShapeData*)shapeData)->radius; ! newObject = new SphereObject(gSimulator, s, rad); break; } --- 196,201 ---- { opal::real rad = ((opal::SphereShapeData*)shapeData)->radius; ! newObject = new SphereObject(gSimulator, s, rad, ! shapeData->offset); break; } *************** *** 202,221 **** opal::real rad = ((opal::CapsuleShapeData*)shapeData)->radius; opal::real len = ((opal::CapsuleShapeData*)shapeData)->length; ! newObject = new CapsuleObject(gSimulator, s, rad, len); break; } case opal::PLANE_SHAPE: { ! // Not implemented; break; } case opal::RAY_SHAPE: { ! // Not implemented; break; } case opal::MESH_SHAPE: { ! // Not implemented; break; } --- 204,224 ---- opal::real rad = ((opal::CapsuleShapeData*)shapeData)->radius; opal::real len = ((opal::CapsuleShapeData*)shapeData)->length; ! newObject = new CapsuleObject(gSimulator, s, rad, len, ! shapeData->offset); break; } case opal::PLANE_SHAPE: { ! // Not implemented. break; } case opal::RAY_SHAPE: { ! // Not implemented. break; } case opal::MESH_SHAPE: { ! // Not implemented. break; } *************** *** 518,522 **** s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; --- 521,525 ---- s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions, boxData.offset); gObjects.push_back(newBox); break; *************** *** 534,538 **** s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; --- 537,541 ---- s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions, boxData.offset); gObjects.push_back(newBox); break; *************** *** 550,554 **** s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; --- 553,557 ---- s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions, boxData.offset); gObjects.push_back(newBox); break; *************** *** 566,571 **** s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; } --- 569,588 ---- s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions, boxData.offset); gObjects.push_back(newBox); + + // Add a Capsule Shape to the Solid. + opal::CapsuleShapeData capsuleData; + capsuleData.material = gObjectMaterial; + capsuleData.length = 2; + capsuleData.radius = 1; + capsuleData.offset.translate(0, 3, 0); + s->addShape(capsuleData); + CapsuleObject* newCapsule = + new CapsuleObject(gSimulator, s, + capsuleData.radius, capsuleData.length, + capsuleData.offset); + + gObjects.push_back(newCapsule); break; } *************** *** 582,586 **** s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; --- 599,603 ---- s->addShape(boxData); BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions, boxData.offset); gObjects.push_back(newBox); break; *************** *** 597,601 **** s->addShape(sphereData); SphereObject* newSphere = new SphereObject(gSimulator, s, ! sphereData.radius); gObjects.push_back(newSphere); break; --- 614,618 ---- s->addShape(sphereData); SphereObject* newSphere = new SphereObject(gSimulator, s, ! sphereData.radius, sphereData.offset); gObjects.push_back(newSphere); break; *************** *** 612,616 **** s->addShape(sphereData); SphereObject* newSphere = new SphereObject(gSimulator, s, ! sphereData.radius); gObjects.push_back(newSphere); break; --- 629,633 ---- s->addShape(sphereData); SphereObject* newSphere = new SphereObject(gSimulator, s, ! sphereData.radius, sphereData.offset); gObjects.push_back(newSphere); break; |
|
From: tylerstreeter <tyl...@us...> - 2005-03-04 03:45:42
|
Update of /cvsroot/opal/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23540 Modified Files: manual.html tutorial1.html tutorial2.html tutorial3.html Added Files: tutorial4.html tutorial5.html Log Message: added Motors tutorial and fixed some things with the others Index: tutorial3.html =================================================================== RCS file: /cvsroot/opal/web/tutorial3.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tutorial3.html 3 Mar 2005 02:22:48 -0000 1.1 --- tutorial3.html 4 Mar 2005 03:45:32 -0000 1.2 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>134</o:Revision> ! <o:TotalTime>254</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-03T02:21:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>361</o:Words> ! <o:Characters>2059</o:Characters> <o:Company>none</o:Company> ! <o:Lines>17</o:Lines> ! <o:Paragraphs>4</o:Paragraphs> ! <o:CharactersWithSpaces>2416</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>138</o:Revision> ! <o:TotalTime>259</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-04T01:21:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>446</o:Words> ! <o:Characters>2543</o:Characters> <o:Company>none</o:Company> ! <o:Lines>21</o:Lines> ! <o:Paragraphs>5</o:Paragraphs> ! <o:CharactersWithSpaces>2984</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 41,44 **** --- 41,46 ---- <w:WordDocument> <w:Zoom>90</w:Zoom> + <w:SpellingState>Clean</w:SpellingState> + <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> *************** *** 80,83 **** --- 82,88 ---- text-decoration:underline; text-underline:single;} + span.SpellE + {mso-style-name:""; + mso-spl-e:yes;} @page Section1 {size:8.5in 11.0in; *************** *** 107,111 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="54274"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 112,116 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="55298"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 141,144 **** --- 146,159 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Joints + connect two Solids, constraining their relative motion. There are + several types of Joints, each constraining motion in different ways. <span + style='mso-spacerun:yes'> </span>The available Joints are: Hinge Joints (one + rotational degree of freedom), Universal Joints (two rotational degrees of + freedom), Ball Joints (three rotational degrees of freedom), Wheel Joints (two + rotational degrees of freedom; typically one axis coincides with a wheels + axis, and the other is used for steering), Slider Joints (one translational + degree of freedom), and Fixed Joints (zero rotational degrees of freedom).<o:p></o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Joints are created much like Solids:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> *************** *** 153,160 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Simulator* ! sim = opal::createSimulator();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Joint* ! joint = sim->createJoint();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 168,178 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Simulator</span></span><span style='font-family:Courier; ! color:black'>* <span class=SpellE>sim</span> = <span class=SpellE>opal::createSimulator</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Joint</span></span><span style='font-family:Courier; ! color:black'>* joint = <span class=SpellE>sim</span>-><span ! class=SpellE>createJoint</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 167,173 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Before ! using the Joint, it must be initialized with a JointData object.<span ! style='mso-spacerun:yes'> </span>Before it can be initialized, you must create ! two Solids and position them:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 185,191 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Before ! using the Joint, it must be initialized with a <span class=SpellE>JointData</span> ! object.<span style='mso-spacerun:yes'> </span>Before it can be initialized, ! you must create two Solids and position them:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 181,213 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Solid* ! solid0 = sim->createSolid();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::BoxShapeData ! boxData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid0->addShape(boxData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Solid* ! solid1 = sim->createSolid();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Matrix44r solid1Transform;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1Transform.translate(0.0, 1.5, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1->setTransform(solid1Transform);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::CapsuleShapeData ! capsuleData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1->addShape(capsuleData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::JointData ! jointData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.setType(opal::HINGE_JOINT);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid0 = solid0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid1 = solid1;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.anchor ! = opal::Point3r(0.0, 0.75, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].direction ! = opal::Vec3r(1.0, 0.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>joint->init(jointData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 199,246 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Solid</span></span><span style='font-family:Courier; ! color:black'>* solid0 = <span class=SpellE>sim</span>-><span ! class=SpellE>createSolid</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::BoxShapeData</span></span><span style='font-family:Courier; ! color:black'> <span class=SpellE>boxData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid0-><span ! class=SpellE>addShape</span>(<span class=SpellE>boxData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Solid</span></span><span style='font-family:Courier; ! color:black'>* solid1 = <span class=SpellE>sim</span>-><span ! class=SpellE>createSolid</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Matrix44r solid1Transform;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1Transform.translate(0.0, 1.5, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1-><span ! class=SpellE>setTransform</span>(solid1Transform);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::CapsuleShapeData</span></span><span style='font-family: ! Courier;color:black'> <span class=SpellE>capsuleData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1-><span ! class=SpellE>addShape</span>(<span class=SpellE>capsuleData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::JointData</span></span><span style='font-family:Courier; ! color:black'> <span class=SpellE>jointData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.setType</span></span><span style='font-family:Courier; ! color:black'>(<span class=SpellE>opal::HINGE_JOINT</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid0 = solid0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid1 = solid1;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.anchor</span></span><span style='font-family:Courier; ! color:black'> = opal::Point3r(0.0, 0.75, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.axis</span></span><span style='font-family:Courier; ! color:black'>[0].direction = opal::Vec3r(1.0, 0.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>joint->init(<span ! class=SpellE>jointData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 238,243 **** static environment by simply setting the Joints other Solid to NULL.<span style='mso-spacerun:yes'> </span>Joints can have limits for each of their ! degrees of freedom.<span style='mso-spacerun:yes'> </span>Lets create ! another Joint with some limits:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 271,276 ---- static environment by simply setting the Joints other Solid to NULL.<span style='mso-spacerun:yes'> </span>Joints can have limits for each of their ! degrees of freedom.<span style='mso-spacerun:yes'> </span>Lets create another ! Joint with some limits:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 251,272 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::JointData ! jointData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.setType(opal::HINGE_JOINT);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid0 = solid0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid1 = solid1;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.anchor ! = opal::Point3r(0.0, 0.75, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].direction ! = opal::Vec3r(1.0, 0.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].limitsEnabled ! = true;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].limits.low ! = -45.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].limits.high ! = 25.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>joint->init(jointData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 284,314 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::JointData</span></span><span style='font-family:Courier; ! color:black'> <span class=SpellE>jointData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.setType</span></span><span style='font-family:Courier; ! color:black'>(<span class=SpellE>opal::HINGE_JOINT</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid0 = solid0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid1 = solid1;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.anchor</span></span><span style='font-family:Courier; ! color:black'> = opal::Point3r(0.0, 0.75, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.axis</span></span><span style='font-family:Courier; ! color:black'>[0].direction = opal::Vec3r(1.0, 0.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.axis</span></span><span style='font-family:Courier; ! color:black'>[0].<span class=SpellE>limitsEnabled</span> = true;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.axis</span></span><span style='font-family:Courier; ! color:black'>[0].<span class=SpellE>limits.low</span> = -45.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>jointData.axis</span></span><span style='font-family:Courier; ! color:black'>[0].<span class=SpellE>limits.high</span> = 25.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>joint->init(<span ! class=SpellE>jointData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 304,308 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>joint->setBreakParams(opal::THRESHOLD_MODE, 3.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> --- 346,351 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>joint-><span ! class=SpellE>setBreakParams</span>(<span class=SpellE>opal::THRESHOLD_MODE</span>, 3.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> *************** *** 318,323 **** it exceeds a threshold, at which point the Joint breaks.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>When you ! are done with a Joint, tell the Simulator to destroy it:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 361,366 ---- it exceeds a threshold, at which point the Joint breaks.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>When ! you are done with a Joint, tell the Simulator to destroy it:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 332,336 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>sim->destroySolid(joint);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 375,381 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>sim</span></span><span style='font-family:Courier;color:black'>-><span ! class=SpellE>destroySolid</span>(joint);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- NEW FILE: tutorial5.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="tutorial5_files/filelist.xml"> <link rel=Edit-Time-Data href="tutorial5_files/editdata.mso"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <title>OPAL: Open Physics Abstraction Layer</title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> <o:Revision>138</o:Revision> <o:TotalTime>257</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> <o:LastSaved>2005-03-04T03:44:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>38</o:Words> <o:Characters>223</o:Characters> <o:Company>none</o:Company> <o:Lines>1</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>260</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>90</w:Zoom> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:"Book Antiqua"; panose-1:2 4 6 2 5 3 5 3 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:white;} a:link, span.MsoHyperlink {color:#3366FF; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:#000066; text-decoration:underline; text-underline:single;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="57346"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--> </head> <body bgcolor=white lang=EN-US link="#3366FF" vlink="#000066" style='tab-interval: .5in' alink="#ffcc33"> <div class=Section1> <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="95%" style='width:95.58%;mso-cellspacing:0in;mso-padding-alt:7.5pt 7.5pt 7.5pt 7.5pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'> <td width=1295 valign=top style='width:777.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img width=534 height=129 id="_x0000_i1025" src="files/opal_logo.jpg" border=0><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-size:22.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>Tutorial 5: Sensors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Sensors are not yet implemented <o:p></o:p></span></p> </td> </tr> </table> <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:10.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:#333333'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:8.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>OPAL is Copyright © 2004-2005 Alan Fischer, Andres Reinot, and Tyler Streeter<o:p></o:p></span></p> </div> </body> </html> Index: tutorial2.html =================================================================== RCS file: /cvsroot/opal/web/tutorial2.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tutorial2.html 3 Mar 2005 02:22:48 -0000 1.2 --- tutorial2.html 4 Mar 2005 03:45:32 -0000 1.3 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>122</o:Revision> ! <o:TotalTime>208</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-03T02:10:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>362</o:Words> ! <o:Characters>2064</o:Characters> <o:Company>none</o:Company> ! <o:Lines>17</o:Lines> ! <o:Paragraphs>4</o:Paragraphs> ! <o:CharactersWithSpaces>2422</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>124</o:Revision> ! <o:TotalTime>211</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-04T01:29:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>420</o:Words> ! <o:Characters>2394</o:Characters> <o:Company>none</o:Company> ! <o:Lines>19</o:Lines> ! <o:Paragraphs>5</o:Paragraphs> ! <o:CharactersWithSpaces>2809</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 41,44 **** --- 41,45 ---- <w:WordDocument> <w:Zoom>90</w:Zoom> + <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> *************** *** 107,111 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="54274"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 108,112 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="56322"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 140,143 **** --- 141,152 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>A + Solid is analogous to a physical object in the real world. It can be + static (just a shape, not physically simulated) or dynamic (has a shape, + mass, and is physically simulated). The available Shapes are: boxes, + spheres, capsule, planes, rays, and triangular meshes.<span + style='mso-spacerun:yes'> </span>A Solid contains no moving parts. Complex + objects with moving parts can be built from multiple Solids with Joints.<o:p></o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Create a Solid by asking a Simulator to create one:<o:p></o:p></span></p> *************** *** 166,171 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Once you ! have a Solid, you can set its various parameters.<span style='mso-spacerun:yes'> </span>For example <o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> --- 175,180 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Once ! you have a Solid, you can set its various parameters.<span style='mso-spacerun:yes'> </span>For example <o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> *************** *** 256,262 **** how the spheres offset was changed.<span style='mso-spacerun:yes'> </span>The offset positions the Shape relative to the Solids transform.<span ! style='mso-spacerun:yes'> </span>Shapes are not offset at all by default.<span ! style='mso-spacerun:yes'> </span>Here, we have moved the Sphere away from ! the Solids origin.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Each --- 265,271 ---- how the spheres offset was changed.<span style='mso-spacerun:yes'> </span>The offset positions the Shape relative to the Solids transform.<span ! style='mso-spacerun:yes'> </span>Shapes are not offset at all by ! default.<span style='mso-spacerun:yes'> </span>Here, we have moved the ! Sphere away from the Solids origin.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Each *************** *** 345,350 **** force will be applied to the Solid until its duration expires.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>When ! you are done with a Solid, tell the Simulator to destroy it:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left --- 354,359 ---- force will be applied to the Solid until its duration expires.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>When you ! are done with a Solid, tell the Simulator to destroy it:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left *************** *** 368,374 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If other ! things depends on this Solid, like a Joint, Motor, or Sensor, it will automatically ! be disabled.<o:p></o:p></span></p> </td> </tr> --- 377,383 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If ! other things depends on this Solid, like a Joint, Motor, or Sensor, it will ! automatically be disabled.<o:p></o:p></span></p> </td> </tr> --- NEW FILE: tutorial4.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="tutorial4_files/filelist.xml"> <link rel=Edit-Time-Data href="tutorial4_files/editdata.mso"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <title>OPAL: Open Physics Abstraction Layer</title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> <o:Revision>169</o:Revision> <o:TotalTime>307</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> <o:LastSaved>2005-03-04T03:41:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>593</o:Words> <o:Characters>3381</o:Characters> <o:Company>none</o:Company> <o:Lines>28</o:Lines> <o:Paragraphs>7</o:Paragraphs> <o:CharactersWithSpaces>3967</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>90</w:Zoom> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:Courier; panose-1:2 7 4 9 2 2 5 2 4 4; mso-font-charset:0; mso-generic-font-family:modern; mso-font-format:other; mso-font-pitch:fixed; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:"Book Antiqua"; panose-1:2 4 6 2 5 3 5 3 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:white;} a:link, span.MsoHyperlink {color:#3366FF; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:#000066; text-decoration:underline; text-underline:single;} span.SpellE {mso-style-name:""; mso-spl-e:yes;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="59394"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--> </head> <body bgcolor=white lang=EN-US link="#3366FF" vlink="#000066" style='tab-interval: .5in' alink="#ffcc33"> <div class=Section1> <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="95%" style='width:95.58%;mso-cellspacing:0in;mso-padding-alt:7.5pt 7.5pt 7.5pt 7.5pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'> <td width=1295 valign=top style='width:777.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img width=534 height=129 id="_x0000_i1025" src="files/opal_logo.jpg" border=0><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-size:22.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>Tutorial 4: Motors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>A Motor applies forces/torques to Solids or Joints to achieve some desired effect. There are several types of Motors, including Attractor Motors, Geared Motors, Servo Motors, Spring Motors, and Thruster Motors.<span style='mso-spacerun:yes'> </span>This tutorial will show how to setup each type.<span style='mso-spacerun:yes'> </span>It will also give examples of how each type could be used.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Lets first create all the objects well need (and assume they will be initialized ):<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::Simulator</span></span><span style='font-family:Courier; color:black'>* <span class=SpellE>sim</span> = <span class=SpellE>opal::createSimulator</span>();<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::Solid</span></span><span style='font-family:Courier; color:black'>* solid0 = <span class=SpellE>sim</span>-><span class=SpellE>createSolid</span>();<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::Solid</span></span><span style='font-family:Courier; color:black'>* solid1 = <span class=SpellE>sim</span>-><span class=SpellE>createSolid</span>();<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::Joint</span></span><span style='font-family:Courier; color:black'>* joint = <span class=SpellE>sim</span>-><span class=SpellE>createJoint</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Now well make an Attractor Motor and initialize it:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::AttractorMotorData</span></span><span style='font-family: Courier;color:black'> data;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>data.solid0 = solid0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>data.solid1 = solid1;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.strength</span></span><span style='font-family:Courier; color:black'> = 10.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.exponent</span></span><span style='font-family:Courier; color:black'> = 2.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::AttractorMotor</span></span><span style='font-family: Courier;color:black'>* attractor = <span class=SpellE>sim</span>-><span class=SpellE>createAttractorMotor</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>attractor->init(data);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This Attractor Motor will constantly apply forces to the two Solids to make them gravitate toward one another.<span style='mso-spacerun:yes'> </span>This makes it easy to simulate planetary gravitation or magnetic attraction.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Next, lets make a Geared Motor:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::GearedMotorData</span></span><span style='font-family: Courier;color:black'> data;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.joint</span></span><span style='font-family:Courier; color:black'> = joint;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.jointAxisNum</span></span><span style='font-family:Courier; color:black'> = 0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.maxTorque</span></span><span style='font-family:Courier; color:black'> = 10.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.maxVelocity</span></span><span style='font-family:Courier; color:black'> = 2000.0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal:: <span class=SpellE>GearedMotor</span>* engine = <span class=SpellE>sim</span>-><span class=SpellE>createGearedMotor</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>engine->init(data);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>engine-><span class=SpellE>setThrottle</span>(0.5);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The Geared Motors throttle should now be updated as desired.<span style='mso-spacerun:yes'> </span>The Motor will have more torque available when its angular velocity is low.<span style='mso-spacerun:yes'> </span>As it approaches its max velocity, it will apply less and less torque.<span style='mso-spacerun:yes'> </span>This Motor is great for simulating automobile engines.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The next Motor is a Servo Motor:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::ServoMotorData</span></span><span style='font-family: Courier;color:black'> data;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.joint</span></span><span style='font-family:Courier; color:black'> = joint;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.mode</span></span><span style='font-family:Courier; color:black'> = <span class=SpellE>opal::DESIRED_ANGLE_MODE</span>;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.jointAxisNum</span></span><span style='font-family:Courier; color:black'> = 0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.desiredAngle</span></span><span style='font-family:Courier; color:black'> = 35.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.maxTorque</span></span><span style='font-family:Courier; color:black'> = 4.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.restoreSpeed</span></span><span style='font-family:Courier; color:black'> = 2.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::ServoMotor</span></span><span style='font-family:Courier; color:black'>* servo = <span class=SpellE>sim</span>-><span class=SpellE>createServoMotor</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>servo->init(data);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The Servo will continually use up to its max torque to try to achieve its desired angle.<span style='mso-spacerun:yes'> </span>Servos are extremely stable controllers, similar a PD or PID controllers.<span style='mso-spacerun:yes'> </span>They make automatic adjustments to keep from overshoot their target angle.<span style='mso-spacerun:yes'> </span>Servos are really good for robot simulations: the robot can simply set its desired Joint angles, and the Servo automatically provides enough torque to reach that angle without overshooting.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>A Spring Motor is a simple linear and/or <span class=SpellE>torsional</span> spring with damping that brings a Solid to a desired position and/or orientation:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::SpringMotorData</span></span><span style='font-family: Courier;color:black'> data;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.solid</span></span><span style='font-family:Courier; color:black'> = solid0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.mode</span></span><span style='font-family:Courier; color:black'> = <span class=SpellE>opal::LINEAR_AND_ANGULAR_MODE</span>;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.desiredPos</span></span><span style='font-family:Courier; color:black'> = opal::Point3r(4.0, 0.0, -8.5);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.desiredForward</span></span><span style='font-family: Courier;color:black'> = opal::Vec3r(0.0, 0.0, -1.0);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.desiredUp</span></span><span style='font-family:Courier; color:black'> = opal:: Vec3r (0.0, 1.0, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.desiredRight</span></span><span style='font-family:Courier; color:black'> = opal:: Vec3r (1.0, 0.0, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.linearKd</span></span><span style='font-family:Courier; color:black'> = 2.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.linearKs</span></span><span style='font-family:Courier; color:black'> = 20.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.angularKd</span></span><span style='font-family:Courier; color:black'> = 0.2;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>data.angularKs</span></span><span style='font-family:Courier; color:black'> = 0.6;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::SpringMotor</span></span><span style='font-family:Courier; color:black'>* spring = <span class=SpellE>sim</span>-><span class=SpellE>createSpringMotor</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>spring->init(data);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p clas... [truncated message content] |
|
From: tylerstreeter <tyl...@us...> - 2005-03-03 06:46:57
|
Update of /cvsroot/opal/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16121 Modified Files: documentation.html tutorial2.html Added Files: tutorial3.html Log Message: added joints tutorial --- NEW FILE: tutorial3.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="tutorial3_files/filelist.xml"> <link rel=Edit-Time-Data href="tutorial3_files/editdata.mso"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <title>OPAL: Open Physics Abstraction Layer</title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> <o:Revision>134</o:Revision> <o:TotalTime>254</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> <o:LastSaved>2005-03-03T02:21:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>361</o:Words> <o:Characters>2059</o:Characters> <o:Company>none</o:Company> <o:Lines>17</o:Lines> <o:Paragraphs>4</o:Paragraphs> <o:CharactersWithSpaces>2416</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>90</w:Zoom> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:Courier; panose-1:2 7 4 9 2 2 5 2 4 4; mso-font-charset:0; mso-generic-font-family:modern; mso-font-format:other; mso-font-pitch:fixed; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:"Book Antiqua"; panose-1:2 4 6 2 5 3 5 3 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:white;} a:link, span.MsoHyperlink {color:#3366FF; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:#000066; text-decoration:underline; text-underline:single;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="54274"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--> </head> <body bgcolor=white lang=EN-US link="#3366FF" vlink="#000066" style='tab-interval: .5in' alink="#ffcc33"> <div class=Section1> <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="95%" style='width:95.58%;mso-cellspacing:0in;mso-padding-alt:7.5pt 7.5pt 7.5pt 7.5pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'> <td width=1295 valign=top style='width:777.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img width=534 height=129 id="_x0000_i1025" src="files/opal_logo.jpg" border=0><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-size:22.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>Tutorial 3: Joints<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Joints are created much like Solids:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Simulator* sim = opal::createSimulator();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Joint* joint = sim->createJoint();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Before using the Joint, it must be initialized with a JointData object.<span style='mso-spacerun:yes'> </span>Before it can be initialized, you must create two Solids and position them:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Solid* solid0 = sim->createSolid();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::BoxShapeData boxData;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid0->addShape(boxData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Solid* solid1 = sim->createSolid();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Matrix44r solid1Transform;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1Transform.translate(0.0, 1.5, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1->setTransform(solid1Transform);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::CapsuleShapeData capsuleData;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid1->addShape(capsuleData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::JointData jointData;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.setType(opal::HINGE_JOINT);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid0 = solid0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid1 = solid1;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.anchor = opal::Point3r(0.0, 0.75, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].direction = opal::Vec3r(1.0, 0.0, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>joint->init(jointData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Note that a Joint can connect two Solids, or it can pin a single Solid to the static environment by simply setting the Joints other Solid to NULL.<span style='mso-spacerun:yes'> </span>Joints can have limits for each of their degrees of freedom.<span style='mso-spacerun:yes'> </span>Lets create another Joint with some limits:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::JointData jointData;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.setType(opal::HINGE_JOINT);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid0 = solid0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.solid1 = solid1;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.anchor = opal::Point3r(0.0, 0.75, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].direction = opal::Vec3r(1.0, 0.0, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].limitsEnabled = true;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].limits.low = -45.0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>jointData.axis[0].limits.high = 25.0;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>joint->init(jointData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>By default, Joints are unbreakable: they can withstand unlimited amounts of stress.<span style='mso-spacerun:yes'> </span>Joints can also be setup as breakable Joints.<span style='mso-spacerun:yes'> </span>The following code sets up an existing Joint in threshold break mode (when the combined force and torque on the Joint exceeds some threshold, it breaks):<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.25pt solid windowtext;mso-border-insidev:.25pt solid windowtext'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>joint->setBreakParams(opal::THRESHOLD_MODE, 3.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Another Joint break mode in OPAL is accumulated mode: stress is accumulated until it exceeds a threshold, at which point the Joint breaks.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>When you are done with a Joint, tell the Simulator to destroy it:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.25pt solid windowtext;mso-border-insidev:.25pt solid windowtext'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>sim->destroySolid(joint);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If anything depends on this Joint, like a Motor, it will automatically be disabled.<o:p></o:p></span></p> </td> </tr> </table> <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:10.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:#333333'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:8.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>OPAL is Copyright © 2004-2005 Alan Fischer, Andres Reinot, and Tyler Streeter<o:p></o:p></span></p> </div> </body> </html> Index: documentation.html =================================================================== RCS file: /cvsroot/opal/web/documentation.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** documentation.html 2 Mar 2005 19:31:48 -0000 1.5 --- documentation.html 3 Mar 2005 02:22:48 -0000 1.6 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>91</o:Revision> ! <o:TotalTime>102</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-02T19:31:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>284</o:Words> ! <o:Characters>1619</o:Characters> <o:Company>none</o:Company> ! <o:Lines>13</o:Lines> ! <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1900</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>93</o:Revision> ! <o:TotalTime>103</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-03T02:21:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>307</o:Words> ! <o:Characters>1754</o:Characters> <o:Company>none</o:Company> ! <o:Lines>14</o:Lines> ! <o:Paragraphs>4</o:Paragraphs> ! <o:CharactersWithSpaces>2057</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 41,44 **** --- 41,45 ---- <w:WordDocument> <w:Zoom>90</w:Zoom> + <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> *************** *** 72,75 **** --- 73,79 ---- text-decoration:underline; text-underline:single;} + span.GramE + {mso-style-name:""; + mso-gram-e:yes;} @page Section1 {size:8.5in 11.0in; *************** *** 99,103 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="50178"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 103,107 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="51202"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 178,185 **** color:black'>Documentation<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If you ! are using OPAL for the first time, it is recommended that you read through ! the documentation in the following order: 1) manual, 2) tutorials, 3) API ! reference.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; --- 182,192 ---- color:black'>Documentation<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If ! you are using OPAL for the first time, it is recommended that you read ! through the documentation in the following order: 1) manual, 2) tutorials, 3) ! API reference.<span style='mso-spacerun:yes'> </span>The manual and ! tutorials do not cover everything; they exist to help you learn to use OPAL ! quickly.<span style='mso-spacerun:yes'> </span>Consult the API reference for ! more details.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; *************** *** 231,236 **** style='font-family:"Book Antiqua";color:black'>: a detailed description of everything in OPAL.<span style='mso-spacerun:yes'> </span>If a particular ! concept isnt discussed in the manual or tutorials, check here.</span><span ! style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial;color:black'><o:p> </o:p></span></p> --- 238,244 ---- style='font-family:"Book Antiqua";color:black'>: a detailed description of everything in OPAL.<span style='mso-spacerun:yes'> </span>If a particular ! concept isnt discussed in the manual or <span class=GramE>tutorials,</span> ! check here.</span><span style='font-family:"Book Antiqua";mso-bidi-font-family: ! Arial;color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial;color:black'><o:p> </o:p></span></p> Index: tutorial2.html =================================================================== RCS file: /cvsroot/opal/web/tutorial2.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tutorial2.html 2 Mar 2005 19:25:53 -0000 1.1 --- tutorial2.html 3 Mar 2005 02:22:48 -0000 1.2 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>121</o:Revision> <o:TotalTime>208</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-02T19:04:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>360</o:Words> ! <o:Characters>2055</o:Characters> <o:Company>none</o:Company> <o:Lines>17</o:Lines> <o:Paragraphs>4</o:Paragraphs> ! <o:CharactersWithSpaces>2411</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>122</o:Revision> <o:TotalTime>208</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-03T02:10:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>362</o:Words> ! <o:Characters>2064</o:Characters> <o:Company>none</o:Company> <o:Lines>17</o:Lines> <o:Paragraphs>4</o:Paragraphs> ! <o:CharactersWithSpaces>2422</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 41,46 **** <w:WordDocument> <w:Zoom>90</w:Zoom> - <w:SpellingState>Clean</w:SpellingState> - <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> --- 41,44 ---- *************** *** 82,88 **** text-decoration:underline; text-underline:single;} - span.SpellE - {mso-style-name:""; - mso-spl-e:yes;} @page Section1 {size:8.5in 11.0in; --- 80,83 ---- *************** *** 112,116 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="53250"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 107,111 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="54274"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 158,168 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Simulator</span></span><span style='font-family:Courier; ! color:black'>* <span class=SpellE>sim</span> = <span class=SpellE>opal::createSimulator</span>();<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Solid</span></span><span style='font-family:Courier; ! color:black'>* solid = <span class=SpellE>sim</span>-><span ! class=SpellE>createSolid</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 153,160 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Simulator* ! sim = opal::createSimulator();<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Solid* ! solid = sim->createSolid();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 174,179 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Once ! you have a Solid, you can set its various parameters.<span style='mso-spacerun:yes'> </span>For example <o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> --- 166,171 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Once you ! have a Solid, you can set its various parameters.<span style='mso-spacerun:yes'> </span>For example <o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> *************** *** 188,207 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>setLinearDamping</span>(0.2);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Matrix44r transform;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>transform.translate</span></span><span style='font-family: ! Courier;color:black'>(1.0, 0.0, 5.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>transform.rotate</span></span><span style='font-family:Courier; ! color:black'>(45.0, 0.0, 1.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>setTransform</span>(transform);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>setStatic</span>(true);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 180,194 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->setLinearDamping(0.2);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Matrix44r transform;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>transform.translate(1.0, ! 0.0, 5.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>transform.rotate(45.0, ! 0.0, 1.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->setTransform(transform);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->setStatic(true);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 219,225 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The last ! call makes the Solid static, i.e. it will not be physically simulated but ! still takes part in collision detection.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>An --- 206,212 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The ! last call makes the Solid static, i.e. it will not be physically simulated ! but still takes part in collision detection.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>An *************** *** 240,262 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::BoxShapeData</span></span><span style='font-family:Courier; ! color:black'> <span class=SpellE>boxData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>boxData.dimensions.dimensions.set</span></span><span ! style='font-family:Courier;color:black'>(1.0, 1.0, 2.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>addShape</span>(<span class=SpellE>boxData</span>);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::SphereShapeData</span></span><span style='font-family: ! Courier;color:black'> <span class=SpellE>sphereData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>sphereData.radius</span></span><span style='font-family:Courier; ! color:black'> = 2.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>sphereData.offset.translate</span></span><span ! style='font-family:Courier;color:black'>(4.0, 0.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>addShape</span>(<span class=SpellE>sphereData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 227,242 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::BoxShapeData ! boxData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.dimensions.dimensions.set(1.0, ! 1.0, 2.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->addShape(boxData);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::SphereShapeData ! sphereData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>sphereData.radius ! = 2.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>sphereData.offset.translate(4.0, ! 0.0, 0.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->addShape(sphereData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 274,282 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Notice ! how the spheres offset was changed.<span style='mso-spacerun:yes'> </span>The ! offset positions the Shape relative to the Solids transform.<span ! style='mso-spacerun:yes'> </span>Shapes are not offset at all by ! default.<span style='mso-spacerun:yes'> </span>Here, we have moved the ! Sphere away from the Solids origin.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Each --- 254,262 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Notice ! how the spheres offset was changed.<span style='mso-spacerun:yes'> ! </span>The offset positions the Shape relative to the Solids transform.<span ! style='mso-spacerun:yes'> </span>Shapes are not offset at all by default.<span ! style='mso-spacerun:yes'> </span>Here, we have moved the Sphere away from ! the Solids origin.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Each *************** *** 295,318 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::BoxShapeData</span></span><span style='font-family:Courier; ! color:black'> <span class=SpellE>boxData</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>boxData.dimensions.dimensions.set</span></span><span ! style='font-family:Courier;color:black'>(1.0, 1.0, 2.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>boxData.material.hardness</span></span><span style='font-family: ! Courier;color:black'> = 0.2;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>boxData.material.bounciness</span></span><span ! style='font-family:Courier;color:black'> = 0.6;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>boxData.material.friction</span></span><span style='font-family: ! Courier;color:black'> = 1.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>boxData.material.density</span></span><span style='font-family: ! Courier;color:black'> = 0.4;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>addShape</span>(<span class=SpellE>boxData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 275,291 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::BoxShapeData ! boxData;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.dimensions.dimensions.set(1.0, ! 1.0, 2.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.material.hardness ! = 0.2;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.material.bounciness ! = 0.6;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.material.friction ! = 1.0;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>boxData.material.density ! = 0.4;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->addShape(boxData);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 348,365 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>opal::Force</span></span><span style='font-family:Courier; ! color:black'> f;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>f.type</span></span><span style='font-family:Courier; ! color:black'> = <span class=SpellE>opal::GLOBAL_FORCE</span>;<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>f.vec</span></span><span style='font-family:Courier; ! color:black'> = opal::Vec3r(20.0, 20.0, 40.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>f.duration</span></span><span style='font-family:Courier; ! color:black'> = 0.1;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span ! class=SpellE>addForce</span>(f);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 321,333 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Force ! f;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>f.type = ! opal::GLOBAL_FORCE;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>f.vec = ! opal::Vec3r(20.0, 20.0, 40.0);<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>f.duration ! = 0.1;<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>solid->addForce(f);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 391,397 **** height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; ! color:black'>sim</span></span><span style='font-family:Courier;color:black'>-><span ! class=SpellE>destroySolid</span>(solid);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> --- 359,363 ---- height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:Courier;color:black'>sim->destroySolid(solid);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> *************** *** 402,408 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If ! anything depends on this Solid, like a Joint or Motor, they will ! automatically be disabled.<o:p></o:p></span></p> </td> </tr> --- 368,374 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If other ! things depends on this Solid, like a Joint, Motor, or Sensor, it will automatically ! be disabled.<o:p></o:p></span></p> </td> </tr> |
|
From: tylerstreeter <tyl...@us...> - 2005-03-03 06:31:34
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19074 Modified Files: todo.txt Log Message: minor fixes Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** todo.txt 1 Mar 2005 05:04:24 -0000 1.47 --- todo.txt 3 Mar 2005 02:32:28 -0000 1.48 *************** *** 4,12 **** * look at scons dylib-building problem on os x - * add offset transform to instantiateBlueprint - - * add a "scale" constant to instantiateBlueprint - - applies to shape sizes and transforms - * fix memory allocation across dll boundary - volume collision check results -> put results in a specific class --- 4,7 ---- *************** *** 36,39 **** --- 31,36 ---- ================= + * custom sensors? + * search and replace existing assert() calls - fatal errors print a message and assert |
|
From: tylerstreeter <tyl...@us...> - 2005-03-03 06:30:40
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19074/src Modified Files: BoxShapeData.h CapsuleShapeData.h Defines.h Joint.h PlaneShapeData.h RayShapeData.h SphereShapeData.h Log Message: minor fixes Index: CapsuleShapeData.h =================================================================== RCS file: /cvsroot/opal/opal/src/CapsuleShapeData.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CapsuleShapeData.h 22 Feb 2005 19:46:29 -0000 1.2 --- CapsuleShapeData.h 3 Mar 2005 02:32:28 -0000 1.3 *************** *** 42,47 **** { mType = CAPSULE_SHAPE; ! radius = 0; ! length = 0; } --- 42,47 ---- { mType = CAPSULE_SHAPE; ! radius = defaults::shape::capsuleRadius; ! length = defaults::shape::capsuleLength; } Index: SphereShapeData.h =================================================================== RCS file: /cvsroot/opal/opal/src/SphereShapeData.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SphereShapeData.h 22 Feb 2005 19:46:40 -0000 1.2 --- SphereShapeData.h 3 Mar 2005 02:32:28 -0000 1.3 *************** *** 42,46 **** { mType = SPHERE_SHAPE; ! radius = 0; } --- 42,46 ---- { mType = SPHERE_SHAPE; ! radius = defaults::shape::sphereRadius; } Index: PlaneShapeData.h =================================================================== RCS file: /cvsroot/opal/opal/src/PlaneShapeData.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PlaneShapeData.h 22 Feb 2005 19:46:30 -0000 1.2 --- PlaneShapeData.h 3 Mar 2005 02:32:28 -0000 1.3 *************** *** 45,49 **** for (int i=0; i<4; ++i) { ! abcd[i] = 0; } } --- 45,49 ---- for (int i=0; i<4; ++i) { ! abcd[i] = defaults::shape::planeABCD[i]; } } Index: Joint.h =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.h,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Joint.h 1 Mar 2005 05:04:22 -0000 1.58 --- Joint.h 3 Mar 2005 02:32:28 -0000 1.59 *************** *** 90,94 **** /// at all. virtual void OPAL_CALL setBreakParams(JointBreakMode mode, ! real breakThresh, real accumThresh); /// Restores accumulated damage to breakable Joints in accumulated --- 90,94 ---- /// at all. virtual void OPAL_CALL setBreakParams(JointBreakMode mode, ! real breakThresh, real accumThresh=0); /// Restores accumulated damage to breakable Joints in accumulated Index: Defines.h =================================================================== RCS file: /cvsroot/opal/opal/src/Defines.h,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Defines.h 1 Mar 2005 05:04:22 -0000 1.63 --- Defines.h 3 Mar 2005 02:32:28 -0000 1.64 *************** *** 298,302 **** namespace shape { ! const Material material(opal::globals::woodMaterial); } --- 298,309 ---- namespace shape { ! const Material material = opal::globals::woodMaterial; ! const Vec3r boxDimensions = Vec3r(1, 1, 1); ! const real sphereRadius = 1; ! const real capsuleRadius = 1; ! const real capsuleLength = 1; ! const real planeABCD[4] = {0, 1, 0, 0}; ! const Point3r rayOrigin = Point3r(0, 0, 0); ! const Vec3r rayDir = Vec3r(0, 0, -1); } Index: RayShapeData.h =================================================================== RCS file: /cvsroot/opal/opal/src/RayShapeData.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RayShapeData.h 22 Feb 2005 19:46:30 -0000 1.2 --- RayShapeData.h 3 Mar 2005 02:32:28 -0000 1.3 *************** *** 42,46 **** { mType = RAY_SHAPE; ! // "ray" is already initialized from its constructor. } --- 42,47 ---- { mType = RAY_SHAPE; ! ray.setOrigin(defaults::shape::rayOrigin); ! ray.setDir(defaults::shape::rayDir); } Index: BoxShapeData.h =================================================================== RCS file: /cvsroot/opal/opal/src/BoxShapeData.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BoxShapeData.h 22 Feb 2005 19:46:29 -0000 1.2 --- BoxShapeData.h 3 Mar 2005 02:32:28 -0000 1.3 *************** *** 42,46 **** { mType = BOX_SHAPE; ! // "dimensions" is already initialized from its constructor. } --- 42,46 ---- { mType = BOX_SHAPE; ! dimensions = defaults::shape::boxDimensions; } |
|
From: tylerstreeter <tyl...@us...> - 2005-03-03 04:40:09
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16484/src/ODE Modified Files: ODESimulator.cpp ODESimulator.h Log Message: added the ability to loop through a BlueprintInstance's objects Index: ODESimulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.h,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** ODESimulator.h 1 Mar 2005 05:04:23 -0000 1.57 --- ODESimulator.h 3 Mar 2005 04:39:57 -0000 1.58 *************** *** 74,83 **** virtual Space* OPAL_CALL createSpace(); - //convenience collision check function //virtual void OPAL_CALL collide(const Solid* solid, // std::vector<Solid*>* solids); ! //convenience ray casting function ! virtual RayHit OPAL_CALL shootRay(const Point3r& origin, const Vec3r& dir, real length); --- 74,81 ---- virtual Space* OPAL_CALL createSpace(); //virtual void OPAL_CALL collide(const Solid* solid, // std::vector<Solid*>* solids); ! virtual RaycastResult OPAL_CALL shootRay(const Point3r& origin, const Vec3r& dir, real length); *************** *** 86,91 **** virtual Vec3r OPAL_CALL getGravity()const; - //virtual void OPAL_CALL setDefaultSleepiness(real value); - virtual void OPAL_CALL setSolverAccuracy(SolverAccuracyLevel level); --- 84,87 ---- *************** *** 102,106 **** /// Helper function for ray casting. ! void OPAL_CALL internal_setRayHit(Solid* solid, const Point3r& intersection, const Vec3r& normal, real distance); --- 98,102 ---- /// Helper function for ray casting. ! void OPAL_CALL internal_setRaycastResult(Solid* solid, const Point3r& intersection, const Vec3r& normal, real distance); *************** *** 128,132 **** /// Used for ray casting. ! RayHit mRayHit; private: }; --- 124,128 ---- /// Used for ray casting. ! RaycastResult mRaycastResult; private: }; Index: ODESimulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.cpp,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** ODESimulator.cpp 1 Mar 2005 05:04:23 -0000 1.81 --- ODESimulator.cpp 3 Mar 2005 04:39:57 -0000 1.82 *************** *** 640,644 **** contactArray[0].normal[1], contactArray[0].normal[2]); ! sim->internal_setRayHit(geomData0->solid, intersection, normal, contactArray[0].depth); } --- 640,644 ---- contactArray[0].normal[1], contactArray[0].normal[2]); ! sim->internal_setRaycastResult(geomData0->solid, intersection, normal, contactArray[0].depth); } *************** *** 659,671 **** } ! void ODESimulator::internal_setRayHit(Solid* solid, const Point3r& intersection, const Vec3r& normal, real distance) { ! if (NULL == mRayHit.solid || (distance < mRayHit.distance)) { ! mRayHit.solid = solid; ! mRayHit.intersection = intersection; ! mRayHit.normal = normal; ! mRayHit.distance = distance; } } --- 659,671 ---- } ! void ODESimulator::internal_setRaycastResult(Solid* solid, const Point3r& intersection, const Vec3r& normal, real distance) { ! if (NULL == mRaycastResult.solid || (distance < mRaycastResult.distance)) { ! mRaycastResult.solid = solid; ! mRaycastResult.intersection = intersection; ! mRaycastResult.normal = normal; ! mRaycastResult.distance = distance; } } *************** *** 739,749 **** //} ! RayHit ODESimulator::shootRay(const Point3r& origin, const Vec3r& dir, ! real length) { ! mRayHit.solid = NULL; ! mRayHit.intersection.set(0,0,0); ! mRayHit.normal.set(1,0,0); ! mRayHit.distance = 0; dGeomID rayGeomID = dCreateRay(mRootSpaceID, length); --- 739,749 ---- //} ! RaycastResult ODESimulator::shootRay(const Point3r& origin, ! const Vec3r& dir, real length) { ! mRaycastResult.solid = NULL; ! mRaycastResult.intersection.set(0,0,0); ! mRaycastResult.normal.set(1,0,0); ! mRaycastResult.distance = 0; dGeomID rayGeomID = dCreateRay(mRootSpaceID, length); *************** *** 751,768 **** dir[1], dir[2]); ! //check for collisions; this will fill mRayHit (if a collision occurs) dSpaceCollide2(rayGeomID, (dGeomID)mRootSpaceID, this, &ode_hidden::internal_raycastCollisionCallback); ! RayHit rayHit; ! rayHit.solid = mRayHit.solid; //note that this may remain NULL ! rayHit.intersection = mRayHit.intersection; ! rayHit.normal = mRayHit.normal; ! rayHit.distance = mRayHit.distance; // finished with ray, so destroy it dGeomDestroy(rayGeomID); ! return rayHit; } --- 751,768 ---- dir[1], dir[2]); ! //check for collisions; this will fill mRaycastResult (if a collision occurs) dSpaceCollide2(rayGeomID, (dGeomID)mRootSpaceID, this, &ode_hidden::internal_raycastCollisionCallback); ! RaycastResult result; ! result.solid = mRaycastResult.solid; //note that this may remain NULL ! result.intersection = mRaycastResult.intersection; ! result.normal = mRaycastResult.normal; ! result.distance = mRaycastResult.distance; // finished with ray, so destroy it dGeomDestroy(rayGeomID); ! return result; } |
|
From: tylerstreeter <tyl...@us...> - 2005-03-03 04:40:08
|
Update of /cvsroot/opal/opal/samples/simple_objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16484/samples/simple_objects Modified Files: main.cpp Log Message: added the ability to loop through a BlueprintInstance's objects Index: main.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/simple_objects/main.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** main.cpp 1 Mar 2005 05:04:19 -0000 1.21 --- main.cpp 3 Mar 2005 04:39:54 -0000 1.22 *************** *** 132,169 **** gSimulator->instantiateBlueprint(instance, gRagdollBP); ! // Setup various components of the Blueprint. ! opal::Solid* s = NULL; ! s = instance.getSolid("left foot"); ! setupVisualShapes(s); ! s = instance.getSolid("right foot"); ! setupVisualShapes(s); ! s = instance.getSolid("lower left leg"); ! setupVisualShapes(s); ! s = instance.getSolid("lower right leg"); ! setupVisualShapes(s); ! s = instance.getSolid("upper left leg"); ! setupVisualShapes(s); ! s = instance.getSolid("upper right leg"); ! setupVisualShapes(s); ! s = instance.getSolid("pelvis"); ! setupVisualShapes(s); ! s = instance.getSolid("lower torso"); ! setupVisualShapes(s); ! s = instance.getSolid("upper torso"); ! setupVisualShapes(s); ! s = instance.getSolid("upper left arm"); ! setupVisualShapes(s); ! s = instance.getSolid("lower left arm"); ! setupVisualShapes(s); ! s = instance.getSolid("left hand"); ! setupVisualShapes(s); ! s = instance.getSolid("upper right arm"); ! setupVisualShapes(s); ! s = instance.getSolid("lower right arm"); ! setupVisualShapes(s); ! s = instance.getSolid("right hand"); ! setupVisualShapes(s); ! s = instance.getSolid("head"); ! setupVisualShapes(s); } --- 132,176 ---- gSimulator->instantiateBlueprint(instance, gRagdollBP); ! int i=0; ! for (i=0; i<instance.getNumSolids(); ++i) ! { ! opal::Solid* s = instance.getSolid(i); ! setupVisualShapes(s); ! } ! ! //// Setup various components of the Blueprint. ! //opal::Solid* s = NULL; ! //s = instance.getSolid("left foot"); ! //setupVisualShapes(s); ! //s = instance.getSolid("right foot"); ! //setupVisualShapes(s); ! //s = instance.getSolid("lower left leg"); ! //setupVisualShapes(s); ! //s = instance.getSolid("lower right leg"); ! //setupVisualShapes(s); ! //s = instance.getSolid("upper left leg"); ! //setupVisualShapes(s); ! //s = instance.getSolid("upper right leg"); ! //setupVisualShapes(s); ! //s = instance.getSolid("pelvis"); ! //setupVisualShapes(s); ! //s = instance.getSolid("lower torso"); ! //setupVisualShapes(s); ! //s = instance.getSolid("upper torso"); ! //setupVisualShapes(s); ! //s = instance.getSolid("upper left arm"); ! //setupVisualShapes(s); ! //s = instance.getSolid("lower left arm"); ! //setupVisualShapes(s); ! //s = instance.getSolid("left hand"); ! //setupVisualShapes(s); ! //s = instance.getSolid("upper right arm"); ! //setupVisualShapes(s); ! //s = instance.getSolid("lower right arm"); ! //setupVisualShapes(s); ! //s = instance.getSolid("right hand"); ! //setupVisualShapes(s); ! //s = instance.getSolid("head"); ! //setupVisualShapes(s); } |
|
From: tylerstreeter <tyl...@us...> - 2005-03-03 04:40:08
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16484/src Modified Files: BlueprintInstance.cpp BlueprintInstance.h Simulator.cpp Simulator.h Log Message: added the ability to loop through a BlueprintInstance's objects Index: BlueprintInstance.h =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintInstance.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BlueprintInstance.h 26 Feb 2005 10:22:23 -0000 1.2 --- BlueprintInstance.h 3 Mar 2005 04:39:55 -0000 1.3 *************** *** 39,45 **** /// After instantiating a Blueprint, this container class holds ! /// pointers to the objects in the Blueprint with names; objects ! /// without names cannot be added. Pointers to specific objects ! /// can then be requested by name. class BlueprintInstance { --- 39,46 ---- /// After instantiating a Blueprint, this container class holds ! /// pointers to the objects in the Blueprint with names. Pointers ! /// to specific objects can then be requested in two ways: 1) by name, ! /// which is useful for finding a specific object, or 2) by index, ! /// which is useful for interating through every object. class BlueprintInstance { *************** *** 69,86 **** const std::string& name)const; ! /// Adds a new Solid pointer. If the pointer is NULL or the ! /// object's name is an empty string, this will do nothing. OPAL_DECL virtual void OPAL_CALL internal_addSolid(Solid* s); ! /// Adds a new Joint pointer. If the pointer is NULL or the ! /// object's name is an empty string, this will do nothing. OPAL_DECL virtual void OPAL_CALL internal_addJoint(Joint* j); ! /// Adds a new Motor pointer. If the pointer is NULL or the ! /// object's name is an empty string, this will do nothing. OPAL_DECL virtual void OPAL_CALL internal_addMotor(Motor* m); ! /// Adds a new Sensor pointer. If the pointer is NULL or the ! /// object's name is an empty string, this will do nothing. OPAL_DECL virtual void OPAL_CALL internal_addSensor(Sensor* s); --- 70,115 ---- const std::string& name)const; ! /// Returns the number of Solids in this BlueprintInstance. ! OPAL_DECL virtual int OPAL_CALL getNumSolids()const; ! ! /// Returns the number of Joints in this BlueprintInstance. ! OPAL_DECL virtual int OPAL_CALL getNumJoints()const; ! ! /// Returns the number of Motors in this BlueprintInstance. ! OPAL_DECL virtual int OPAL_CALL getNumMotors()const; ! ! /// Returns the number of Sensors in this BlueprintInstance. ! OPAL_DECL virtual int OPAL_CALL getNumSensors()const; ! ! /// Finds a Solid by index and returns its pointer. ! OPAL_DECL virtual Solid* OPAL_CALL getSolid(unsigned int i)const; ! ! /// Finds a Joint by index and returns its pointer. ! OPAL_DECL virtual Joint* OPAL_CALL getJoint(unsigned int i)const; ! ! /// Finds a Motor by index and returns its pointer. ! OPAL_DECL virtual Motor* OPAL_CALL getMotor(unsigned int i)const; ! ! /// Finds a Sensor by index and returns its pointer. ! OPAL_DECL virtual Sensor* OPAL_CALL getSensor(unsigned int i)const; ! ! /// Adds a new Solid pointer to the list. If the pointer is ! /// non-NULL and the object's name is not an empty string, this ! /// also adds the pointer to the Solid map. OPAL_DECL virtual void OPAL_CALL internal_addSolid(Solid* s); ! /// Adds a new Joint pointer. If the pointer is ! /// non-NULL and the object's name is not an empty string, this ! /// also adds the pointer to the Joint map. OPAL_DECL virtual void OPAL_CALL internal_addJoint(Joint* j); ! /// Adds a new Motor pointer. If the pointer is ! /// non-NULL and the object's name is not an empty string, this ! /// also adds the pointer to the Motor map. OPAL_DECL virtual void OPAL_CALL internal_addMotor(Motor* m); ! /// Adds a new Sensor pointer. If the pointer is ! /// non-NULL and the object's name is not an empty string, this ! /// also adds the pointer to the Sensor map. OPAL_DECL virtual void OPAL_CALL internal_addSensor(Sensor* s); *************** *** 97,100 **** --- 126,141 ---- /// Map of Sensor names to Sensor pointers. std::map<std::string, Sensor*> mSensorMap; + + /// List of Solid pointers. + std::vector<Solid*> mSolidList; + + /// List of Joint pointers. + std::vector<Joint*> mJointList; + + /// List of Motor pointers. + std::vector<Motor*> mMotorList; + + /// List of Sensor pointers. + std::vector<Sensor*> mSensorList; }; } Index: Simulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** Simulator.cpp 2 Mar 2005 05:30:32 -0000 1.40 --- Simulator.cpp 3 Mar 2005 04:39:55 -0000 1.41 *************** *** 377,384 **** solidList.push_back(s); ! if (!s->getName().empty()) ! { ! instance.internal_addSolid(s); ! } } --- 377,382 ---- solidList.push_back(s); ! // Add the Solid to the BlueprintInstance. ! instance.internal_addSolid(s); } *************** *** 412,419 **** jointList.push_back(j); ! if (!j->getName().empty()) ! { ! instance.internal_addJoint(j); ! } } --- 410,415 ---- jointList.push_back(j); ! // Add the Joint to the BlueprintInstance. ! instance.internal_addJoint(j); } *************** *** 492,499 **** } ! if (!m->getName().empty()) ! { ! instance.internal_addMotor(m); ! } } --- 488,493 ---- } ! // Add the Motor to the BlueprintInstance. ! instance.internal_addMotor(m); } *************** *** 516,523 **** // } ! // if (!s->getName().empty()) ! // { ! // instance.internal_addSensor(s); ! // } //} --- 510,515 ---- // } ! // // Add the Sensor to the BlueprintInstance. ! // instance.internal_addSensor(s); //} Index: BlueprintInstance.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/BlueprintInstance.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BlueprintInstance.cpp 26 Feb 2005 10:22:23 -0000 1.2 --- BlueprintInstance.cpp 3 Mar 2005 04:39:55 -0000 1.3 *************** *** 44,47 **** --- 44,52 ---- mMotorMap.clear(); mSensorMap.clear(); + + mSolidList.clear(); + mJointList.clear(); + mMotorList.clear(); + mSensorList.clear(); } *************** *** 102,107 **** --- 107,154 ---- } + int BlueprintInstance::getNumSolids()const + { + return (int)(mSolidList.size()); + } + + int BlueprintInstance::getNumJoints()const + { + return (int)(mJointList.size()); + } + + int BlueprintInstance::getNumMotors()const + { + return (int)(mMotorList.size()); + } + + int BlueprintInstance::getNumSensors()const + { + return (int)(mSensorList.size()); + } + + Solid* BlueprintInstance::getSolid(unsigned int i)const + { + return mSolidList.at(i); + } + + Joint* BlueprintInstance::getJoint(unsigned int i)const + { + return mJointList.at(i); + } + + Motor* BlueprintInstance::getMotor(unsigned int i)const + { + return mMotorList.at(i); + } + + Sensor* BlueprintInstance::getSensor(unsigned int i)const + { + return mSensorList.at(i); + } + void BlueprintInstance::internal_addSolid(Solid* s) { + mSolidList.push_back(s); + if (NULL == s) { *************** *** 121,124 **** --- 168,173 ---- void BlueprintInstance::internal_addJoint(Joint* j) { + mJointList.push_back(j); + if (NULL == j) { *************** *** 138,141 **** --- 187,192 ---- void BlueprintInstance::internal_addMotor(Motor* m) { + mMotorList.push_back(m); + if (NULL == m) { *************** *** 155,158 **** --- 206,211 ---- void BlueprintInstance::internal_addSensor(Sensor* s) { + mSensorList.push_back(s); + if (NULL == s) { Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** Simulator.h 2 Mar 2005 05:30:32 -0000 1.76 --- Simulator.h 3 Mar 2005 04:39:56 -0000 1.77 *************** *** 48,52 **** /// A data structure containing information about a specific /// intersection from a ray cast. ! struct RayHit { /// The first Solid hit by the ray. --- 48,52 ---- /// A data structure containing information about a specific /// intersection from a ray cast. ! struct RaycastResult { /// The first Solid hit by the ray. *************** *** 107,111 **** /// A convenient ray casting function. TODO: replace with a /// Sensor. ! virtual RayHit OPAL_CALL shootRay(const Point3r& origin, const Vec3r& dir, real length) = 0; --- 107,111 ---- /// A convenient ray casting function. TODO: replace with a /// Sensor. ! virtual RaycastResult OPAL_CALL shootRay(const Point3r& origin, const Vec3r& dir, real length) = 0; |
|
From: tylerstreeter <tyl...@us...> - 2005-03-02 19:32:01
|
Update of /cvsroot/opal/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11194 Modified Files: documentation.html Log Message: fixed documentation links Index: documentation.html =================================================================== RCS file: /cvsroot/opal/web/documentation.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** documentation.html 2 Mar 2005 19:25:53 -0000 1.4 --- documentation.html 2 Mar 2005 19:31:48 -0000 1.5 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>90</o:Revision> ! <o:TotalTime>100</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-02T18:58:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>285</o:Words> ! <o:Characters>1630</o:Characters> <o:Company>none</o:Company> <o:Lines>13</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1912</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>91</o:Revision> ! <o:TotalTime>102</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-02T19:31:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>284</o:Words> ! <o:Characters>1619</o:Characters> <o:Company>none</o:Company> <o:Lines>13</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1900</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 99,103 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="49154"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 99,103 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="50178"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 178,183 **** color:black'>Documentation<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If ! you are using OPAL for the first time, it is recommended that you read through the documentation in the following order: 1) manual, 2) tutorials, 3) API reference.<o:p></o:p></span></p> --- 178,183 ---- color:black'>Documentation<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If you ! are using OPAL for the first time, it is recommended that you read through the documentation in the following order: 1) manual, 2) tutorials, 3) API reference.<o:p></o:p></span></p> *************** *** 193,218 **** <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial1.html">Tutorial 2</a></span><span style='font-family:"Book Antiqua";color:black'>: Solids, Shapes, and Materials<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial2.html">Tutorial 3</a></span><span style='font-family:"Book Antiqua";color:black'>: Joints<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial3.html">Tutorial 4</a></span><span style='font-family:"Book Antiqua";color:black'>: Motors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial4.html">Tutorial 5</a></span><span style='font-family:"Book Antiqua";color:black'>: Sensors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial5.html">Tutorial 6</a></span><span style='font-family:"Book Antiqua";color:black'>: Using Data Objects<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial6.html">Tutorial 7</a></span><span style='font-family:"Book Antiqua";color:black'>: OPAL XML Saving and Loading<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> --- 193,218 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial2.html">Tutorial 2</a></span><span style='font-family:"Book Antiqua";color:black'>: Solids, Shapes, and Materials<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial3.html">Tutorial 3</a></span><span style='font-family:"Book Antiqua";color:black'>: Joints<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial4.html">Tutorial 4</a></span><span style='font-family:"Book Antiqua";color:black'>: Motors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial5.html">Tutorial 5</a></span><span style='font-family:"Book Antiqua";color:black'>: Sensors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial6.html">Tutorial 6</a></span><span style='font-family:"Book Antiqua";color:black'>: Using Data Objects<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial7.html">Tutorial 7</a></span><span style='font-family:"Book Antiqua";color:black'>: OPAL XML Saving and Loading<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> *************** *** 230,235 **** color:black'><a href="api/index.html">API Documentation</a></span><span style='font-family:"Book Antiqua";color:black'>: a detailed description of ! everything in OPAL.<span style='mso-spacerun:yes'> </span>If a particular concept ! isnt discussed in the manual or tutorials, check here.</span><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: --- 230,235 ---- color:black'><a href="api/index.html">API Documentation</a></span><span style='font-family:"Book Antiqua";color:black'>: a detailed description of ! everything in OPAL.<span style='mso-spacerun:yes'> </span>If a particular ! concept isnt discussed in the manual or tutorials, check here.</span><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: *************** *** 245,250 **** <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:8.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; ! color:black'>OPAL is Copyright © 2004-2005 Alan Fischer, Andres Reinot, and Tyler ! Streeter<o:p></o:p></span></p> </div> --- 245,250 ---- <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:8.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; ! color:black'>OPAL is Copyright © 2004-2005 Alan Fischer, Andres Reinot, and ! Tyler Streeter<o:p></o:p></span></p> </div> |
|
From: tylerstreeter <tyl...@us...> - 2005-03-02 19:26:05
|
Update of /cvsroot/opal/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8456 Modified Files: contact.html documentation.html todo.txt Added Files: tutorial1.html tutorial2.html Log Message: added first two tutorials Index: documentation.html =================================================================== RCS file: /cvsroot/opal/web/documentation.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** documentation.html 1 Mar 2005 05:06:34 -0000 1.3 --- documentation.html 2 Mar 2005 19:25:53 -0000 1.4 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>87</o:Revision> ! <o:TotalTime>95</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-01T05:05:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>239</o:Words> ! <o:Characters>1367</o:Characters> <o:Company>none</o:Company> ! <o:Lines>11</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1603</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>90</o:Revision> ! <o:TotalTime>100</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-02T18:58:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>285</o:Words> ! <o:Characters>1630</o:Characters> <o:Company>none</o:Company> ! <o:Lines>13</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1912</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 99,103 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="46082"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 99,103 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="49154"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 178,215 **** color:black'>Documentation<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="manual.html">OPAL Manual</a>: a short, high-level overview of the major ! components and how they work together.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="tutorial1.html">Tutorial 1</a>: Simulators, Solids, and Shapes<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="tutorial2.html">Tutorial 2</a>: Joints<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="tutorial3.html">Tutorial 3</a>: Motors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="tutorial4.html">Tutorial 4</a>: Sensors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="tutorial5.html">Tutorial 5</a>: Using Data Objects<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="tutorial6.html">Tutorial 6</a>: OPAL XML Saving and Loading<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="files/example.xml">Sample OPAL XML</a>: file containing examples of every object type and parameter.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="files/ragdoll.xml">Ragdoll OPAL XML</a>: file containing a ragdoll blueprint.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a ! href="api/index.html">API Documentation</a>: a detailed description of ! everything in OPAL.</span><span style='font-family:"Book Antiqua";mso-bidi-font-family: ! Arial;color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial;color:black'><o:p> </o:p></span></p> --- 178,236 ---- color:black'>Documentation<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If ! you are using OPAL for the first time, it is recommended that you read through ! the documentation in the following order: 1) manual, 2) tutorials, 3) API ! reference.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="manual.html">OPAL Manual</a></span><span ! style='font-family:"Book Antiqua";color:black'>: a short, high-level overview ! of the major components and how they work together.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial1.html">Tutorial 1</a></span><span ! style='font-family:"Book Antiqua";color:black'>: The Simulator<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial1.html">Tutorial 2</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Solids, Shapes, and ! Materials<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial2.html">Tutorial 3</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Joints<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial3.html">Tutorial 4</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Motors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial4.html">Tutorial 5</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Sensors<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial5.html">Tutorial 6</a></span><span ! style='font-family:"Book Antiqua";color:black'>: Using Data Objects<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="tutorial6.html">Tutorial 7</a></span><span ! style='font-family:"Book Antiqua";color:black'>: OPAL XML Saving and Loading<o:p></o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="files/example.xml">Sample OPAL XML</a></span><span ! style='font-family:"Book Antiqua";color:black'>: file containing examples of every object type and parameter.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="files/ragdoll.xml">Ragdoll OPAL XML</a></span><span ! style='font-family:"Book Antiqua";color:black'>: file containing a ragdoll blueprint.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'><a href="api/index.html">API Documentation</a></span><span ! style='font-family:"Book Antiqua";color:black'>: a detailed description of ! everything in OPAL.<span style='mso-spacerun:yes'> </span>If a particular concept ! isnt discussed in the manual or tutorials, check here.</span><span ! style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial;color:black'><o:p> </o:p></span></p> *************** *** 224,229 **** <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:8.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; ! color:black'>OPAL is Copyright © 2004-2005 Alan Fischer, Andres Reinot, and ! Tyler Streeter<o:p></o:p></span></p> </div> --- 245,250 ---- <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:8.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; ! color:black'>OPAL is Copyright © 2004-2005 Alan Fischer, Andres Reinot, and Tyler ! Streeter<o:p></o:p></span></p> </div> Index: todo.txt =================================================================== RCS file: /cvsroot/opal/web/todo.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** todo.txt 1 Mar 2005 22:40:25 -0000 1.2 --- todo.txt 2 Mar 2005 19:25:53 -0000 1.3 *************** *** 66,69 **** --- 66,73 ---- =================== + * all objects are created with default parameters + + * OPAL contains several math classes + * write a "tutorial 0" or "tutorial intro" containing these notes, or just integrate them into the tutorials --- NEW FILE: tutorial2.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="tutorial2_files/filelist.xml"> <link rel=Edit-Time-Data href="tutorial2_files/editdata.mso"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <title>OPAL: Open Physics Abstraction Layer</title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> <o:Revision>121</o:Revision> <o:TotalTime>208</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> <o:LastSaved>2005-03-02T19:04:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>360</o:Words> <o:Characters>2055</o:Characters> <o:Company>none</o:Company> <o:Lines>17</o:Lines> <o:Paragraphs>4</o:Paragraphs> <o:CharactersWithSpaces>2411</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>90</w:Zoom> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:Courier; panose-1:2 7 4 9 2 2 5 2 4 4; mso-font-charset:0; mso-generic-font-family:modern; mso-font-format:other; mso-font-pitch:fixed; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:"Book Antiqua"; panose-1:2 4 6 2 5 3 5 3 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:white;} a:link, span.MsoHyperlink {color:#3366FF; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:#000066; text-decoration:underline; text-underline:single;} span.SpellE {mso-style-name:""; mso-spl-e:yes;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="53250"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--> </head> <body bgcolor=white lang=EN-US link="#3366FF" vlink="#000066" style='tab-interval: .5in' alink="#ffcc33"> <div class=Section1> <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="95%" style='width:95.58%;mso-cellspacing:0in;mso-padding-alt:7.5pt 7.5pt 7.5pt 7.5pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'> <td width=1295 valign=top style='width:777.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img width=534 height=129 id="_x0000_i1025" src="files/opal_logo.jpg" border=0><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-size:22.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>Tutorial 2: Solids, Shapes, and Materials<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Create a Solid by asking a Simulator to create one:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::Simulator</span></span><span style='font-family:Courier; color:black'>* <span class=SpellE>sim</span> = <span class=SpellE>opal::createSimulator</span>();<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::Solid</span></span><span style='font-family:Courier; color:black'>* solid = <span class=SpellE>sim</span>-><span class=SpellE>createSolid</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Once you have a Solid, you can set its various parameters.<span style='mso-spacerun:yes'> </span>For example <o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span class=SpellE>setLinearDamping</span>(0.2);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Matrix44r transform;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>transform.translate</span></span><span style='font-family: Courier;color:black'>(1.0, 0.0, 5.0);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>transform.rotate</span></span><span style='font-family:Courier; color:black'>(45.0, 0.0, 1.0, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span class=SpellE>setTransform</span>(transform);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span class=SpellE>setStatic</span>(true);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>The last call makes the Solid static, i.e. it will not be physically simulated but still takes part in collision detection.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>An important part of creating a Solid is giving it Shapes.<span style='mso-spacerun:yes'> </span>A Solid can contain any number of Shapes.<span style='mso-spacerun:yes'> </span>To add box and sphere Shapes to the Solid, do the following:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.25pt solid windowtext;mso-border-insidev:.25pt solid windowtext'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::BoxShapeData</span></span><span style='font-family:Courier; color:black'> <span class=SpellE>boxData</span>;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>boxData.dimensions.dimensions.set</span></span><span style='font-family:Courier;color:black'>(1.0, 1.0, 2.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span class=SpellE>addShape</span>(<span class=SpellE>boxData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::SphereShapeData</span></span><span style='font-family: Courier;color:black'> <span class=SpellE>sphereData</span>;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>sphereData.radius</span></span><span style='font-family:Courier; color:black'> = 2.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>sphereData.offset.translate</span></span><span style='font-family:Courier;color:black'>(4.0, 0.0, 0.0);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span class=SpellE>addShape</span>(<span class=SpellE>sphereData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Notice how the spheres offset was changed.<span style='mso-spacerun:yes'> </span>The offset positions the Shape relative to the Solids transform.<span style='mso-spacerun:yes'> </span>Shapes are not offset at all by default.<span style='mso-spacerun:yes'> </span>Here, we have moved the Sphere away from the Solids origin.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Each Shape can have different Material properties.<span style='mso-spacerun:yes'> </span>Now for a demonstration of using a custom Material:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.25pt solid windowtext;mso-border-insidev:.25pt solid windowtext'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::BoxShapeData</span></span><span style='font-family:Courier; color:black'> <span class=SpellE>boxData</span>;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>boxData.dimensions.dimensions.set</span></span><span style='font-family:Courier;color:black'>(1.0, 1.0, 2.0);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>boxData.material.hardness</span></span><span style='font-family: Courier;color:black'> = 0.2;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>boxData.material.bounciness</span></span><span style='font-family:Courier;color:black'> = 0.6;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>boxData.material.friction</span></span><span style='font-family: Courier;color:black'> = 1.0;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>boxData.material.density</span></span><span style='font-family: Courier;color:black'> = 0.4;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span class=SpellE>addShape</span>(<span class=SpellE>boxData</span>);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Note that Material density affects a Solids mass (calculated from each Shapes density and volume).<span style='mso-spacerun:yes'> </span>The rest of the Material properties are described in the API reference.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>You can apply forces and torques to a Solid like this:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.25pt solid windowtext;mso-border-insidev:.25pt solid windowtext'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::Force</span></span><span style='font-family:Courier; color:black'> f;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>f.type</span></span><span style='font-family:Courier; color:black'> = <span class=SpellE>opal::GLOBAL_FORCE</span>;<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>f.vec</span></span><span style='font-family:Courier; color:black'> = opal::Vec3r(20.0, 20.0, 40.0);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>f.duration</span></span><span style='font-family:Courier; color:black'> = 0.1;<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>solid-><span class=SpellE>addForce</span>(f);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This force will be applied to the Solid until its duration expires.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>When you are done with a Solid, tell the Simulator to destroy it:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.25pt solid windowtext;mso-border-insidev:.25pt solid windowtext'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>sim</span></span><span style='font-family:Courier;color:black'>-><span class=SpellE>destroySolid</span>(solid);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>If anything depends on this Solid, like a Joint or Motor, they will automatically be disabled.<o:p></o:p></span></p> </td> </tr> </table> <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:10.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:#333333'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:8.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>OPAL is Copyright © 2004-2005 Alan Fischer, Andres Reinot, and Tyler Streeter<o:p></o:p></span></p> </div> </body> </html> Index: contact.html =================================================================== RCS file: /cvsroot/opal/web/contact.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** contact.html 1 Mar 2005 22:40:25 -0000 1.2 --- contact.html 2 Mar 2005 19:25:43 -0000 1.3 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>85</o:Revision> ! <o:TotalTime>182</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-01T21:24:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>286</o:Words> ! <o:Characters>1631</o:Characters> <o:Company>none</o:Company> ! <o:Lines>13</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1914</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> --- 25,39 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>86</o:Revision> ! <o:TotalTime>183</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-02T19:01:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>297</o:Words> ! <o:Characters>1694</o:Characters> <o:Company>none</o:Company> ! <o:Lines>14</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1988</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> *************** *** 99,103 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="47106"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 99,103 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="48130"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 178,181 **** --- 178,184 ---- color:black'>Contact<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Let + us know if you have any comments or suggestions on any part of OPAL.<o:p></o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span style='font-size:14.0pt;font-family:"Book Antiqua";color:black'>Alan Fischer</span></b><span --- NEW FILE: tutorial1.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="tutorial1_files/filelist.xml"> <link rel=Edit-Time-Data href="tutorial1_files/editdata.mso"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <title>OPAL: Open Physics Abstraction Layer</title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> <o:Revision>113</o:Revision> <o:TotalTime>202</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> <o:LastSaved>2005-03-02T19:24:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>132</o:Words> <o:Characters>753</o:Characters> <o:Company>none</o:Company> <o:Lines>6</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>884</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>90</w:Zoom> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:Courier; panose-1:2 7 4 9 2 2 5 2 4 4; mso-font-charset:0; mso-generic-font-family:modern; mso-font-format:other; mso-font-pitch:fixed; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:"Book Antiqua"; panose-1:2 4 6 2 5 3 5 3 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; color:white;} a:link, span.MsoHyperlink {color:#3366FF; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:#000066; text-decoration:underline; text-underline:single;} span.SpellE {mso-style-name:""; mso-spl-e:yes;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="53250"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--> </head> <body bgcolor=white lang=EN-US link="#3366FF" vlink="#000066" style='tab-interval: .5in' alink="#ffcc33"> <div class=Section1> <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="95%" style='width:95.58%;mso-cellspacing:0in;mso-padding-alt:7.5pt 7.5pt 7.5pt 7.5pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'> <td width=1295 valign=top style='width:777.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img width=534 height=129 id="_x0000_i1025" src="files/opal_logo.jpg" border=0><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-size:22.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>Tutorial 1: The Simulator<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>To create a Simulator, do the following:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>opal::Simulator</span></span><span style='font-family:Courier; color:black'>* <span class=SpellE>sim</span> = <span class=SpellE>opal::createSimulator</span>();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This allocates and returns a pointer to a Simulator.<span style='mso-spacerun:yes'> </span>You will want to maintain a pointer to the Simulator until you are totally done with the simulation.<span style='mso-spacerun:yes'> </span>Note that it is possible to use multiple Simulators concurrently, each representing completely different simulations.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Simulators have a few changeable parameters.<span style='mso-spacerun:yes'> </span>One of them is gravity:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>opal::Vec3r g(0, -9.81, 0);<o:p></o:p></span></p> <p class=MsoNormal><span class=SpellE><span style='font-family:Courier; color:black'>sim</span></span><span style='font-family:Courier;color:black'>-><span class=SpellE>setGravity</span>(g);<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>When you are finished, be sure to destroy the Simulator:<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 align=left style='background:silver;border-collapse:collapse;border:none;mso-border-alt: solid windowtext .25pt;mso-table-lspace:9.0pt;margin-left:.1in;mso-table-rspace: 9.0pt;margin-right:.1in;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal: page;mso-table-left:7.35pt;mso-table-top:12.7pt;mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.25pt solid windowtext;mso-border-insidev:.25pt solid windowtext'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:22.95pt'> <td width=974 valign=top style='width:584.6pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .25pt;padding:0in 5.4pt 0in 5.4pt; height:22.95pt'> <p class=MsoNormal><span style='font-family:Courier;color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:Courier;color:black'>sim->destroy();<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> </td> </tr> </table> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This will <span class=SpellE>deallocate</span> the Simulator and everything contained within it.<o:p></o:p></span></p> </td> </tr> </table> <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:10.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:#333333'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='margin-bottom:12.0pt;text-align:center'><span style='font-size:8.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>OPAL is Copyright © 2004-2005 Alan Fischer, Andres Reinot, and Tyler Streeter<o:p></o:p></span></p> </div> </body> </html> |
|
From: tylerstreeter <tyl...@us...> - 2005-03-02 05:31:03
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21640/src Modified Files: Matrix44r.h Simulator.cpp Simulator.h Log Message: added offset matrix and scaling factor to blueprint instantiation; fixed matrix bug in rotation functions where axis wasn't getting normalized Index: Simulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** Simulator.cpp 28 Feb 2005 03:27:57 -0000 1.39 --- Simulator.cpp 2 Mar 2005 05:30:32 -0000 1.40 *************** *** 28,31 **** --- 28,36 ---- #include "Simulator.h" #include "BlueprintInstance.h" + #include "BoxShapeData.h" + #include "SphereShapeData.h" + #include "CapsuleShapeData.h" + #include "PlaneShapeData.h" + #include "RayShapeData.h" namespace opal *************** *** 238,243 **** void Simulator::instantiateBlueprint( ! BlueprintInstance& instance, const Blueprint& bp) { if (!bp.isFinalized()) { --- 243,251 ---- void Simulator::instantiateBlueprint( ! BlueprintInstance& instance, const Blueprint& bp, ! const Matrix44r& offset, real scale) { + assert(scale > 0); + if (!bp.isFinalized()) { *************** *** 249,252 **** --- 257,274 ---- } + bool useOffset = false; + if (Matrix44r() != offset) + { + useOffset = true; + } + + bool useScale = false; + Matrix44r scaleMat; + if (1 != scale) + { + useScale = true; + scaleMat.makeScale(scale); + } + // For each object created here, only the ones with names get added // to the BlueprintInstance. *************** *** 260,264 **** // Joints, Motors, and Sensors), use the stored indices to // find pointers in the appropriate array. ! // Create these temporary arrays of pointers. Other objects // will use these to find pointers to their dependencies. --- 282,286 ---- // Joints, Motors, and Sensors), use the stored indices to // find pointers in the appropriate array. ! // Create these temporary arrays of pointers. Other objects // will use these to find pointers to their dependencies. *************** *** 271,276 **** { Solid* s = createSolid(); ! s->init(*bp.getSolidData(i)); solidList.push_back(s); --- 293,378 ---- { Solid* s = createSolid(); ! SolidData sd = *bp.getSolidData(i); ! ! if (useOffset) ! { ! // Offset the Solid's transform. ! sd.transform = offset * sd.transform; ! } ! ! if (useScale) ! { ! // Scale the Solid's transform. ! sd.transform[12] *= scale; ! sd.transform[13] *= scale; ! sd.transform[14] *= scale; ! ! // Scale the Solid's Shape's offsets and dimensions. ! int i=0; ! for (i=0; i<sd.getNumShapes(); ++i) ! { ! ShapeData* shapeData = sd.getShapeData(i); ! shapeData->offset[12] *= scale; ! shapeData->offset[13] *= scale; ! shapeData->offset[14] *= scale; ! ! switch(shapeData->getType()) ! { ! case BOX_SHAPE: ! { ! BoxShapeData* boxData = ! (BoxShapeData*)shapeData; ! boxData->dimensions = ! scale * boxData->dimensions; ! break; ! } ! case SPHERE_SHAPE: ! { ! SphereShapeData* sphereData = ! (SphereShapeData*)shapeData; ! sphereData->radius = ! scale * sphereData->radius; ! break; ! } ! case CAPSULE_SHAPE: ! { ! CapsuleShapeData* capsuleData = ! (CapsuleShapeData*)shapeData; ! capsuleData->radius = ! scale * capsuleData->radius; ! capsuleData->length = ! scale * capsuleData->length; ! break; ! } ! case PLANE_SHAPE: ! { ! PlaneShapeData* planeData = ! (PlaneShapeData*)shapeData; ! planeData->abcd[3] = ! scale * planeData->abcd[3]; ! break; ! } ! case RAY_SHAPE: ! { ! RayShapeData* rayData = ! (RayShapeData*)shapeData; ! Point3r origin = rayData->ray.getOrigin(); ! origin = scale * origin; ! rayData->ray.setOrigin(origin); ! break; ! } ! case MESH_SHAPE: ! { ! // Not implemented. Scaling the Mesh data ! // should be handled elsewhere. ! break; ! } ! default: ! assert(false); ! } ! } ! } + s->init(sd); solidList.push_back(s); *************** *** 290,295 **** Joint* j = createJoint(); ! j->init(*data); jointList.push_back(j); --- 392,413 ---- Joint* j = createJoint(); ! JointData jd = *data; + if (useOffset) + { + // Offset the Joint's anchor and axes. + jd.anchor = offset * jd.anchor; + jd.axis[0].direction = offset * jd.axis[0].direction; + jd.axis[1].direction = offset * jd.axis[1].direction; + jd.axis[2].direction = offset * jd.axis[2].direction; + } + + if (useScale) + { + // Scale the Joint's anchor. + jd.anchor = scale * jd.anchor; + } + + j->init(jd); jointList.push_back(j); Index: Matrix44r.h =================================================================== RCS file: /cvsroot/opal/opal/src/Matrix44r.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Matrix44r.h 26 Feb 2005 07:17:09 -0000 1.27 --- Matrix44r.h 2 Mar 2005 05:30:32 -0000 1.28 *************** *** 190,193 **** --- 190,199 ---- inline void makeRotation(real theta, real x, real y, real z) { + Vec3r axis(x, y, z); + axis.normalize(); + x = axis[0]; + y = axis[1]; + z = axis[2]; + // source: http://www.euclideanspace.com/maths/geometry/rotations/ // conversions/angleToMatrix/ Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** Simulator.h 25 Feb 2005 06:40:26 -0000 1.75 --- Simulator.h 2 Mar 2005 05:30:32 -0000 1.76 *************** *** 89,95 **** /// Creates instances of all objects in a Blueprint and fills the ! /// given BlueprintInstance with pointers of the named objects. virtual void OPAL_CALL instantiateBlueprint( ! BlueprintInstance& instance, const Blueprint& bp); /// A convenient volume collision check function. TODO: replace --- 89,99 ---- /// Creates instances of all objects in a Blueprint and fills the ! /// given BlueprintInstance with pointers of the named objects. The ! /// offset transform and scale factor can be used to affect ! /// all instantiated objects at once. The scale factor must be ! /// greater than zero. virtual void OPAL_CALL instantiateBlueprint( ! BlueprintInstance& instance, const Blueprint& bp, ! const Matrix44r& offset=Matrix44r(), real scale=1); /// A convenient volume collision check function. TODO: replace |
|
From: tylerstreeter <tyl...@us...> - 2005-03-01 22:41:06
|
Update of /cvsroot/opal/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22654 Modified Files: contact.html manual.html todo.txt users.html Log Message: added more info to contact page; added the main info to the manual page Index: todo.txt =================================================================== RCS file: /cvsroot/opal/web/todo.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** todo.txt 1 Mar 2005 05:06:34 -0000 1.1 --- todo.txt 1 Mar 2005 22:40:25 -0000 1.2 *************** *** 1,8 **** For Version 0.3.0 ================= ! * add a faq to docs page/manual ! - Q: which physics engines will be supported in the future? ! - A: The focus is on cross-platform, Open Source physics engines. Currently there are not a lot of options available besides ODE, but if other fully-featured engines of this type come along, OPAL will be ready to integrate them. * post api notes --- 1,8 ---- For Version 0.3.0 ================= + * manual + - add diagrams ! * tutorials (move XML samples into xml tutorial; maybe remove example.xml and just describe every xml element/attribute somewhere) * post api notes *************** *** 10,23 **** For Version 0.4.0 ================= - Website Contents - ================ - * change log somewhere? - - * contact - - add bios? - Preliminary Manual Notes ======================== --- 10,19 ---- For Version 0.4.0 ================= + * add a faq to docs page/manual + - Q: which physics engines will be supported in the future? + - A: The focus is on cross-platform, Open Source physics engines. Currently there are not a lot of options available besides ODE, but if other fully-featured engines of this type come along, OPAL will be ready to integrate them. Preliminary Manual Notes ======================== *************** *** 67,80 **** - Joint limit ! Document ! ======== ! * specific object type properties ! - memory management: user managed vs. OPAL managed ! - initially enabled or disabled ! - user-created classes ! - ContactSensor ! - JointBreakSensor ! - custom Motors * Most objects can be created in two ways --- 63,77 ---- - Joint limit ! Miscellaneous Notes ! =================== ! * write a "tutorial 0" or "tutorial intro" containing these notes, or just integrate them into the tutorials ! ! * user-derived classes ! - ContactSensor ! - JointBreakSensor ! - custom Motors ! ! * for derived classes (custom motors, event handlers), put OPAL_CALL in front of public function names * Most objects can be created in two ways *************** *** 89,93 **** * custom motors cannot be saved to/loaded from an XML file - * for derived classes (custom motors, event handlers), put OPAL_CALL in front of public function names * most objects are created and destroyed by the Simulator, but some are user-managed --- 86,89 ---- *************** *** 102,106 **** - use the same precision for OPAL reals and ODE dReals ! * two ways to create objects 1.) have the simulator create the object with default settings, then set its parameters manually Solid* s = sim->createSolid(); --- 98,102 ---- - use the same precision for OPAL reals and ODE dReals ! * two ways to create most objects 1.) have the simulator create the object with default settings, then set its parameters manually Solid* s = sim->createSolid(); Index: manual.html =================================================================== RCS file: /cvsroot/opal/web/manual.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** manual.html 25 Feb 2005 19:56:17 -0000 1.1 --- manual.html 1 Mar 2005 22:40:25 -0000 1.2 *************** *** 25,44 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>80</o:Revision> ! <o:TotalTime>78</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-02-25T19:49:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>33</o:Words> ! <o:Characters>193</o:Characters> <o:Company>none</o:Company> ! <o:Lines>1</o:Lines> ! <o:Paragraphs>1</o:Paragraphs> ! <o:CharactersWithSpaces>225</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>BestFit</w:Zoom> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> --- 25,44 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>97</o:Revision> ! <o:TotalTime>164</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-01T22:38:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>417</o:Words> ! <o:Characters>2378</o:Characters> <o:Company>none</o:Company> ! <o:Lines>19</o:Lines> ! <o:Paragraphs>5</o:Paragraphs> ! <o:CharactersWithSpaces>2790</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>90</w:Zoom> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> *************** *** 50,53 **** --- 50,60 ---- /* Font Definitions */ @font-face + {font-family:Wingdings; + panose-1:5 0 0 0 0 0 0 0 0 0; + mso-font-charset:2; + mso-generic-font-family:auto; + mso-font-pitch:variable; + mso-font-signature:0 268435456 0 0 -2147483648 0;} + @font-face {font-family:"Book Antiqua"; panose-1:2 4 6 2 5 3 5 3 3 4; *************** *** 74,77 **** --- 81,90 ---- text-decoration:underline; text-underline:single;} + span.SpellE + {mso-style-name:""; + mso-spl-e:yes;} + span.GramE + {mso-style-name:""; + mso-gram-e:yes;} @page Section1 {size:8.5in 11.0in; *************** *** 82,85 **** --- 95,125 ---- div.Section1 {page:Section1;} + /* List Definitions */ + @list l0 + {mso-list-id:482813319; + mso-list-type:hybrid; + mso-list-template-ids:-413384936 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} + @list l0:level1 + {mso-level-number-format:bullet; + mso-level-text:o; + mso-level-tab-stop:.5in; + mso-level-number-position:left; + text-indent:-.25in; + font-family:"Courier New";} + @list l1 + {mso-list-id:1377509408; + mso-list-type:hybrid; + mso-list-template-ids:986361314 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} + @list l1:level1 + {mso-level-number-format:bullet; + mso-level-text:o; + mso-level-tab-stop:.5in; + mso-level-number-position:left; + text-indent:-.25in; + font-family:"Courier New";} + ol + {margin-bottom:0in;} + ul + {margin-bottom:0in;} --> </style> *************** *** 101,105 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="44034"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 141,145 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="46082"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 130,140 **** style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span - style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> - <p class=MsoNormal align=center style='text-align:center'><span style='font-size:22.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>OPAL 0.3.0 Manual<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial;color:black'><o:p> </o:p></span></p> </td> </tr> --- 170,299 ---- style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-size:22.0pt;font-family:"Book Antiqua";mso-bidi-font-family:Arial; color:black'>OPAL 0.3.0 Manual<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span + style='font-size:20.0pt;font-family:"Book Antiqua";color:black'>Introduction<o:p></o:p></span></b></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>This + manual is a short, simple overview of <span class=SpellE>OPALs</span> + components.<span style='mso-spacerun:yes'> </span>It is meant to give you a + general understanding of how the different objects work together.<span + style='mso-spacerun:yes'> </span>It will first cover the most important OPAL + objects, <span class=GramE>then</span> describe a few others that arent as + critical to understanding how the system works.<span + style='mso-spacerun:yes'> </span>More specific instructions for creating and + managing these objects can be found in the tutorials.<span + style='mso-spacerun:yes'> </span>Additionally, the API reference contains more + details about every OPAL class, <span class=SpellE>struct</span>, function, + variable, etc.<o:p></o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span + style='font-size:20.0pt;font-family:"Book Antiqua";color:black'>Main Objects<o:p></o:p></span></b></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <ul style='margin-top:0in' type=circle> + <li class=MsoNormal style='color:black;mso-list:l1 level1 lfo1;tab-stops: + list .5in'><b style='mso-bidi-font-weight:normal'><span + style='font-size:14.0pt;font-family:"Book Antiqua"'>Simulators</span></b><span + style='font-family:"Book Antiqua"'>: Simulators are factories that + create, maintain, and destroy most other objects.<span + style='mso-spacerun:yes'> </span>They encapsulate all collision + detection and physics simulation.<o:p></o:p></span></li> + </ul> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <ul style='margin-top:0in' type=circle> + <li class=MsoNormal style='color:black;mso-list:l1 level1 lfo1;tab-stops: + list .5in'><b style='mso-bidi-font-weight:normal'><span + style='font-size:14.0pt;font-family:"Book Antiqua"'>Solids</span></b><span + style='font-family:"Book Antiqua"'>: A Solid is analogous to a physical + object in the real world.<span style='mso-spacerun:yes'> </span>It can + be static (just a shape, not physically simulated) or dynamic (has a + shape and mass, is physically simulated).<span + style='mso-spacerun:yes'> </span>It contains no moving parts.<span + style='mso-spacerun:yes'> </span>Complex objects with moving parts are + built from multiple Solids with Joints.<o:p></o:p></span></li> + </ul> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <ul style='margin-top:0in' type=circle> + <li class=MsoNormal style='color:black;mso-list:l1 level1 lfo1;tab-stops: + list .5in'><b style='mso-bidi-font-weight:normal'><span + style='font-size:14.0pt;font-family:"Book Antiqua"'>Joints</span></b><span + style='font-family:"Book Antiqua"'>: Joints connect two Solids, + constraining their relative motion.<span style='mso-spacerun:yes'> + </span>There are several types of Joints, each constraining motion in + different ways.<o:p></o:p></span></li> + </ul> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <ul style='margin-top:0in' type=circle> + <li class=MsoNormal style='color:black;mso-list:l1 level1 lfo1;tab-stops: + list .5in'><b style='mso-bidi-font-weight:normal'><span + style='font-size:14.0pt;font-family:"Book Antiqua"'>Motors</span></b><span + style='font-family:"Book Antiqua"'>: A Motor applies forces/torques to + Solids or Joints to achieve some desired effect.<span + style='mso-spacerun:yes'> </span>There are several types of + Motors.<span style='mso-spacerun:yes'> </span><o:p></o:p></span></li> + </ul> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <ul style='margin-top:0in' type=circle> + <li class=MsoNormal style='color:black;mso-list:l1 level1 lfo1;tab-stops: + list .5in'><b style='mso-bidi-font-weight:normal'><span + style='font-size:14.0pt;font-family:"Book Antiqua"'>Sensors</span></b><span + style='font-family:"Book Antiqua"'>: Sensors acquire data from a + simulation.<span style='mso-spacerun:yes'> </span>There are several + types of Sensors.<span style='mso-spacerun:yes'> </span>Some can be + attached to Solids, some can be set to a static position in the + environment, and some can work either way.<o:p></o:p></span></li> + </ul> <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: Arial;color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";mso-bidi-font-family: + Arial;color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span + style='font-size:20.0pt;font-family:"Book Antiqua";color:black'>Other Objects<o:p></o:p></span></b></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <ul style='margin-top:0in' type=circle> + <li class=MsoNormal style='color:black;mso-list:l0 level1 lfo2;tab-stops: + list .5in'><b style='mso-bidi-font-weight:normal'><span + style='font-size:14.0pt;font-family:"Book Antiqua"'>Shapes</span></b><span + style='font-family:"Book Antiqua"'>: Shapes are used for collision + detection.<span style='mso-spacerun:yes'> </span>They are added to Solids; + if a Solid doesnt contain any Shapes, it cannot collide with anything.<span + style='mso-spacerun:yes'> </span>There are several types of Shapes.<span + style='mso-spacerun:yes'> </span>Each Shape can use a different + Material<o:p></o:p></span></li> + </ul> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <ul style='margin-top:0in' type=circle> + <li class=MsoNormal style='color:black;mso-list:l0 level1 lfo2;tab-stops: + list .5in'><b style='mso-bidi-font-weight:normal'><span + style='font-size:14.0pt;font-family:"Book Antiqua";mso-bidi-font-family: + Arial'>Materials</span></b><span style='font-family:"Book Antiqua"; + mso-bidi-font-family:Arial'>: Materials define what happens when two + Solids (or, more specifically, two Shapes) collide.<span + style='mso-spacerun:yes'> </span>Materials consist of several + properties, including friction, bounciness, density, etc.</span><span + style='font-family:"Book Antiqua"'><o:p></o:p></span></li> + </ul> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <ul style='margin-top:0in' type=circle> + <li class=MsoNormal style='color:black;mso-list:l0 level1 lfo2;tab-stops: + list .5in'><b style='mso-bidi-font-weight:normal'><span + style='font-size:14.0pt;font-family:"Book Antiqua"'>Data objects and + Blueprints</span></b><span style='font-family:"Book Antiqua"'>: Each of + the main OPAL objects stores an internal data structure describing the + object in detail.<span style='mso-spacerun:yes'> </span>These data + structures can be built from scratch and used to generate several identical + objects.<span style='mso-spacerun:yes'> </span>They can be retrieved + from an existing object and used to make clones.<span + style='mso-spacerun:yes'> </span>They can also be used to construct + OPAL Blueprints.<span style='mso-spacerun:yes'> </span>Blueprints are + collections of complex systems involving Solids, Joints, Motors, and/or + Sensors.<span style='mso-spacerun:yes'> </span>They can be constructed from + a set of manually-designed data structures or from data structures pulled + out of a set of existing objects.<span style='mso-spacerun:yes'> + </span>They can be saved to and loaded from <span class=SpellE>OPALs</span> + XML-based file format.<o:p></o:p></span></li> + </ul> </td> </tr> Index: contact.html =================================================================== RCS file: /cvsroot/opal/web/contact.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** contact.html 25 Feb 2005 19:56:17 -0000 1.1 --- contact.html 1 Mar 2005 22:40:25 -0000 1.2 *************** *** 25,44 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>83</o:Revision> ! <o:TotalTime>79</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-02-25T19:45:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>178</o:Words> ! <o:Characters>1015</o:Characters> <o:Company>none</o:Company> ! <o:Lines>8</o:Lines> ! <o:Paragraphs>2</o:Paragraphs> ! <o:CharactersWithSpaces>1191</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>BestFit</w:Zoom> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> --- 25,44 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>85</o:Revision> ! <o:TotalTime>182</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-01T21:24:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>286</o:Words> ! <o:Characters>1631</o:Characters> <o:Company>none</o:Company> ! <o:Lines>13</o:Lines> ! <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1914</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>90</w:Zoom> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> *************** *** 99,103 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="45058"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 99,103 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="47106"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 152,156 **** Arial;color:#333333'><a href="http://sourceforge.net/projects/opal"><span style='color:#333333;text-decoration:none;text-underline:none'><img border=0 ! width=88 height=31 id="_x0000_i1027" src="files/sf_logo.png"></span></a><o:p></o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; mso-bidi-font-family:Arial;color:#333333'><o:p> </o:p></span></p> --- 152,156 ---- Arial;color:#333333'><a href="http://sourceforge.net/projects/opal"><span style='color:#333333;text-decoration:none;text-underline:none'><img border=0 ! width=88 height=31 id="_x0000_i1025" src="files/sf_logo.png"></span></a><o:p></o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; mso-bidi-font-family:Arial;color:#333333'><o:p> </o:p></span></p> *************** *** 158,162 **** Arial;color:#333333'><a href="http://www.opensource.org/"><span style='color:#333333;text-decoration:none;text-underline:none'><img border=0 ! width=75 height=65 id="_x0000_i1025" src="files/opensource_logo.png"></span></a><o:p></o:p></span></p> </td> <td width=1145 valign=top style='width:687.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> --- 158,162 ---- Arial;color:#333333'><a href="http://www.opensource.org/"><span style='color:#333333;text-decoration:none;text-underline:none'><img border=0 ! width=75 height=65 id="_x0000_i1026" src="files/opensource_logo.png"></span></a><o:p></o:p></span></p> </td> <td width=1145 valign=top style='width:687.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> *************** *** 167,171 **** <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img ! border=0 width=534 height=129 id="_x0000_i1026" src="files/opal_logo.jpg"><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> --- 167,171 ---- <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img ! border=0 width=534 height=129 id="_x0000_i1027" src="files/opal_logo.jpg"><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> *************** *** 178,183 **** color:black'>Contact<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Alan ! Fischer<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Email: alan dot fischer at gmail dot com<o:p></o:p></span></p> --- 178,187 ---- color:black'>Contact<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:14.0pt;font-family:"Book Antiqua";color:black'>Alan Fischer</span></b><span ! style='font-family:"Book Antiqua";color:black'>: currently finishing a ! masters degree in <a href="http://www.ece.iastate.edu/">Computer Engineering</a> ! at <a href="http://www.iastate.edu/">Iowa State University</a>, <a ! href="http://www.vrac.iastate.edu/">VRAC</a> researcher<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Email: alan dot fischer at gmail dot com<o:p></o:p></span></p> *************** *** 185,190 **** <a href="http://www.vrac.iastate.edu/~pallindo">www.vrac.iastate.edu/~pallindo</a><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Andres ! Reinot<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Email: andres at reinot dot com<o:p></o:p></span></p> --- 189,198 ---- <a href="http://www.vrac.iastate.edu/~pallindo">www.vrac.iastate.edu/~pallindo</a><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:14.0pt;font-family:"Book Antiqua";color:black'>Andres Reinot</span></b><span ! style='font-family:"Book Antiqua";color:black'>: currently finishing a ! bachelors degree in <a href="http://www.cs.iastate.edu/">Computer Science</a> ! at <a href="http://www.iastate.edu/">Iowa State University</a>, <a ! href="http://www.vrac.iastate.edu/">VRAC</a> researcher<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Email: andres at reinot dot com<o:p></o:p></span></p> *************** *** 192,197 **** <a href="http://www.reinot.com/">www.reinot.com</a><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Tyler ! Streeter<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Email: tylerstreeter at gmail dot com<o:p></o:p></span></p> --- 200,211 ---- <a href="http://www.reinot.com/">www.reinot.com</a><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:14.0pt;font-family:"Book Antiqua";color:black'>Tyler ! Streeter</span></b><span style='font-size:14.0pt;font-family:"Book Antiqua"; ! color:black'>: </span><span style='font-family:"Book Antiqua";color:black'>currently ! finishing a masters degree in <a href="http://www.hci.iastate.edu/">Human ! Computer Interaction</a> at <a href="http://www.iastate.edu/">Iowa State ! University</a>, <a href="http://www.vrac.iastate.edu/">VRAC</a> researcher</span><span ! style='font-size:14.0pt;font-family:"Book Antiqua";color:black'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'>Email: tylerstreeter at gmail dot com<o:p></o:p></span></p> Index: users.html =================================================================== RCS file: /cvsroot/opal/web/users.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** users.html 25 Feb 2005 19:56:17 -0000 1.1 --- users.html 1 Mar 2005 22:40:25 -0000 1.2 *************** *** 25,44 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>85</o:Revision> ! <o:TotalTime>93</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-02-25T19:46:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>260</o:Words> ! <o:Characters>1482</o:Characters> <o:Company>none</o:Company> <o:Lines>12</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1739</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>BestFit</w:Zoom> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> --- 25,44 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>86</o:Revision> ! <o:TotalTime>94</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-01T21:25:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>262</o:Words> ! <o:Characters>1499</o:Characters> <o:Company>none</o:Company> <o:Lines>12</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1758</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>90</w:Zoom> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> *************** *** 99,103 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="45058"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 99,103 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="46082"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 152,156 **** Arial;color:#333333'><a href="http://sourceforge.net/projects/opal"><span style='color:#333333;text-decoration:none;text-underline:none'><img border=0 ! width=88 height=31 id="_x0000_i1027" src="files/sf_logo.png"></span></a><o:p></o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; mso-bidi-font-family:Arial;color:#333333'><o:p> </o:p></span></p> --- 152,156 ---- Arial;color:#333333'><a href="http://sourceforge.net/projects/opal"><span style='color:#333333;text-decoration:none;text-underline:none'><img border=0 ! width=88 height=31 id="_x0000_i1025" src="files/sf_logo.png"></span></a><o:p></o:p></span></p> <p class=MsoNormal><span style='font-size:14.0pt;font-family:"Book Antiqua"; mso-bidi-font-family:Arial;color:#333333'><o:p> </o:p></span></p> *************** *** 158,162 **** Arial;color:#333333'><a href="http://www.opensource.org/"><span style='color:#333333;text-decoration:none;text-underline:none'><img border=0 ! width=75 height=65 id="_x0000_i1025" src="files/opensource_logo.png"></span></a><o:p></o:p></span></p> </td> <td width=1145 valign=top style='width:687.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> --- 158,162 ---- Arial;color:#333333'><a href="http://www.opensource.org/"><span style='color:#333333;text-decoration:none;text-underline:none'><img border=0 ! width=75 height=65 id="_x0000_i1026" src="files/opensource_logo.png"></span></a><o:p></o:p></span></p> </td> <td width=1145 valign=top style='width:687.0pt;padding:7.5pt 7.5pt 7.5pt 7.5pt'> *************** *** 167,171 **** <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img ! border=0 width=534 height=129 id="_x0000_i1026" src="files/opal_logo.jpg"><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> --- 167,171 ---- <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:#333333'><img ! border=0 width=534 height=129 id="_x0000_i1027" src="files/opal_logo.jpg"><o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-family:"Book Antiqua";mso-bidi-font-family:Arial;color:black'><o:p> </o:p></span></p> *************** *** 178,192 **** color:black'>Users<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:16.0pt;font-family:"Book Antiqua"; ! color:black'><a href="http://www.vrac.iastate.edu/~streeter/cabin/cabin.html">Cabin</a></span><span style='font-family:"Book Antiqua";color:black'>: a physically-simulated cabin built from separate wooden boards that can be destroyed with fire.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:16.0pt;font-family:"Book Antiqua"; ! color:black'>Radius</span><span style='font-family:"Book Antiqua";color:black'>: ! an arcade-style 2D space shooter.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:16.0pt;font-family:"Book Antiqua"; ! color:black'><a href="http://www.annexlabs.com/rhino">Rhino</a></span><span style='font-family:"Book Antiqua";color:black'>: You are a space station maintenance worker assigned the task of asteroid duty. Maneuver your ship --- 178,195 ---- color:black'>Users<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:14.0pt;font-family:"Book Antiqua";color:black'><a ! href="http://www.vrac.iastate.edu/~streeter/cabin/cabin.html">Cabin</a></span></b><span style='font-family:"Book Antiqua";color:black'>: a physically-simulated cabin built from separate wooden boards that can be destroyed with fire.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:14.0pt;font-family:"Book Antiqua";color:black'>Radius</span></b><span ! style='font-family:"Book Antiqua";color:black'>: an arcade-style 2D space ! shooter.<o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:14.0pt;font-family:"Book Antiqua";color:black'><a ! href="http://www.annexlabs.com/rhino">Rhino</a></span></b><span style='font-family:"Book Antiqua";color:black'>: You are a space station maintenance worker assigned the task of asteroid duty. Maneuver your ship *************** *** 196,203 **** its a living. <o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><span style='font-size:16.0pt;font-family:"Book Antiqua"; ! color:black'>Application Switcher</span><span style='font-family:"Book Antiqua"; ! color:black'> for <a href="http://www.iastate.edu/">Iowa State Universitys</a> ! <a href="http://www.vrac.iastate.edu/">Virtual Reality Applications Center</a>: essentially a 3D GUI for a virtual reality environment that allows users to switch into and out of various virtual reality applications solely from --- 199,207 ---- its a living. <o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> ! <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span ! style='font-size:14.0pt;font-family:"Book Antiqua";color:black'>Application ! Switcher</span></b><span style='font-family:"Book Antiqua";color:black'> for <a ! href="http://www.iastate.edu/">Iowa State Universitys</a> <a ! href="http://www.vrac.iastate.edu/">Virtual Reality Applications Center</a>: essentially a 3D GUI for a virtual reality environment that allows users to switch into and out of various virtual reality applications solely from |
|
From: tylerstreeter <tyl...@us...> - 2005-03-01 05:06:45
|
Update of /cvsroot/opal/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21943 Modified Files: documentation.html index.html Added Files: todo.txt Log Message: added ragdoll sample xml file to documentation Index: documentation.html =================================================================== RCS file: /cvsroot/opal/web/documentation.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** documentation.html 25 Feb 2005 23:07:09 -0000 1.2 --- documentation.html 1 Mar 2005 05:06:34 -0000 1.3 *************** *** 25,44 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>85</o:Revision> ! <o:TotalTime>94</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-02-25T23:06:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>226</o:Words> ! <o:Characters>1291</o:Characters> <o:Company>none</o:Company> ! <o:Lines>10</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1514</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>BestFit</w:Zoom> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> --- 25,44 ---- <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>87</o:Revision> ! <o:TotalTime>95</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-03-01T05:05:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>239</o:Words> ! <o:Characters>1367</o:Characters> <o:Company>none</o:Company> ! <o:Lines>11</o:Lines> <o:Paragraphs>3</o:Paragraphs> ! <o:CharactersWithSpaces>1603</o:CharactersWithSpaces> <o:Version>10.6714</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> ! <w:Zoom>90</w:Zoom> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> *************** *** 99,103 **** </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="45058"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> --- 99,103 ---- </style> <![endif]--><!--[if gte mso 9]><xml> ! <o:shapedefaults v:ext="edit" spidmax="46082"> <o:colormenu v:ext="edit" fillcolor="white"/> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> *************** *** 205,208 **** --- 205,212 ---- <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a + href="files/ragdoll.xml">Ragdoll OPAL XML</a>: file containing a ragdoll + blueprint.<o:p></o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><o:p> </o:p></span></p> + <p class=MsoNormal><span style='font-family:"Book Antiqua";color:black'><a href="api/index.html">API Documentation</a>: a detailed description of everything in OPAL.</span><span style='font-family:"Book Antiqua";mso-bidi-font-family: --- NEW FILE: todo.txt --- For Version 0.3.0 ================= * add a faq to docs page/manual - Q: which physics engines will be supported in the future? - A: The focus is on cross-platform, Open Source physics engines. Currently there are not a lot of options available besides ODE, but if other fully-featured engines of this type come along, OPAL will be ready to integrate them. * post api notes For Version 0.4.0 ================= Website Contents ================ * change log somewhere? * contact - add bios? Preliminary Manual Notes ======================== * Describe 5 primary objects, using diagrams. - Simulator: object factory; handles collision detection and physics simulation - Solid: physical objects; contains various shapes used for collision detection; can be static or dynamic; in a visual 3D application, Solids are usually the objects to render - Joint: connects two Solids and constrains their relative motion - Motor: applies forces/torques to Solids or Joints to achieve some desired effect - Sensor: acquires data from a simulation * Describe secondary objects: - Shapes - Materials - Blueprints * Other miscellaneous objects: described elsewhere - Force - RaycastResult - ProximityResult - CollisionEvent The main objects in OPAL are: simulators, solids, joints, and motors. Create a simulator, have the simulator create solids for you, add shapes to the solids, and add forces to the solids. Solids can take an initial matrix transform. Shapes added to a solid can take a matrix transform as an offset from the solid's center. A solid can return its transform matrix for drawing purposes (if a solid has multiple shapes, be sure to save their offset matrices for drawing later). Solids can be static, meaning that they don't move around in the simulation. Objects - classes - Simulator - Solid - Joint - Motor - Sensor - Blueprint - Data objects - SolidData - ShapeData (many different sub-types) - Shape type - JointData - MotorData (many different sub-types) - SensorData (many different sub-types) - Blueprint: contains lots of Data objects - other structs - Material - RayHit - collision event - Force - Joint axis - Joint limit Document ======== * specific object type properties - memory management: user managed vs. OPAL managed - initially enabled or disabled - user-created classes - ContactSensor - JointBreakSensor - custom Motors * Most objects can be created in two ways - create the object (automatically uses default values); change specific parameters - setup a Data object and pass it into the object's init function - some objects (e.g. Joints) must have init called before using them * Shapes can be added to solids in two ways - add a ShapeBP to a SolidBP, then create the Solid - create a Solid, then add a shape by passing it a ShapeBP * custom motors cannot be saved to/loaded from an XML file * for derived classes (custom motors, event handlers), put OPAL_CALL in front of public function names * most objects are created and destroyed by the Simulator, but some are user-managed - examples of user-managed: - most structs - custom motors - event handlers * all angles are in degrees * be aware of floating point accuracy issues - use the same precision for OPAL reals and ODE dReals * two ways to create objects 1.) have the simulator create the object with default settings, then set its parameters manually Solid* s = sim->createSolid(); s->setStatic(true); s->setTransform(Matrix44r()); 2.) have the simulator create the object by passing in a blueprint Index: index.html =================================================================== RCS file: /cvsroot/opal/web/index.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.html 26 Feb 2005 03:27:48 -0000 1.3 --- index.html 1 Mar 2005 05:06:34 -0000 1.4 *************** *** 25,39 **** <o:Author>Tyler Streeter</o:Author> <o:LastAuthor>Tyler Streeter</o:LastAuthor> ! <o:Revision>92</o:Revision> <o:TotalTime>185</o:TotalTime> <o:Created>2004-06-05T15:20:00Z</o:Created> ! <o:LastSaved>2005-02-26T03:27:00Z</o:LastSaved> <o:Pages>1</o:Pages> ! <o:Words>348</o:Words> ! <o:Characters>1990</o:Characters> <o:Company>none</o:Company> [...977 lines suppressed...] color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> --- 682,686 ---- mso-bidi-font-family:Arial;color:black'>Velocity sensors<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l6 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> *************** *** 688,692 **** mso-bidi-font-family:Arial;color:black'>Acceleration sensors<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l8 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> --- 688,692 ---- mso-bidi-font-family:Arial;color:black'>Acceleration sensors<o:p></o:p></span></p> <p class=MsoNormal style='margin-left:68.3pt;text-indent:-.25in;mso-list: ! l6 level3 lfo8;tab-stops:list 68.3pt 1.5in'><![if !supportLists]><span style='font-family:"Courier New";mso-fareast-font-family:"Courier New"; color:black'><span style='mso-list:Ignore'>o<span style='font:7.0pt "Times New Roman"'> |
|
From: tylerstreeter <tyl...@us...> - 2005-03-01 05:06:45
|
Update of /cvsroot/opal/web/files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21943/files Added Files: ragdoll.xml Log Message: added ragdoll sample xml file to documentation --- NEW FILE: ragdoll.xml --- <?xml version="1.0" ?> <OpalBlueprint> <Solid> <Name value="head"/> <Offset> <Transform type="translate" x="0.0" y="1.02" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.065" length="0.02"/> </Shape> </Solid> <Joint> <Name value="neck"/> <Type value="hinge"/> <References solid0="upper torso" solid1="head"/> <Anchor x="0.0" y="0.95" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-45.0"/> <LimitHigh value="45.0"/> </Axis> </Joint> <Solid> <Name value="upper torso"/> <Offset> <Transform type="translate" x="0.0" y="0.9" z="0.0"/> <Transform type="rotate" angle="90.0" x="0.0" y="1.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.045" length="0.25"/> </Shape> </Solid> <Joint> <Name value="left shoulder"/> <Type value="universal"/> <References solid0="upper left arm" solid1="upper torso"/> <Anchor x="0.16" y="0.9" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-160.0"/> <LimitHigh value="80.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-45.0"/> <LimitHigh value="170.0"/> </Axis> </Joint> <Solid> <Name value="upper left arm"/> <Offset> <Transform type="translate" x="0.16" y="0.8" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.03" length="0.2"/> </Shape> </Solid> <Joint> <Name value="left elbow"/> <Type value="hinge"/> <References solid0="lower left arm" solid1="upper left arm"/> <Anchor x="0.16" y="0.7" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-120.0"/> <LimitHigh value="0.0"/> </Axis> </Joint> <Solid> <Name value="lower left arm"/> <Offset> <Transform type="translate" x="0.16" y="0.6" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.027" length="0.2"/> </Shape> </Solid> <Joint> <Name value="left wrist"/> <Type value="hinge"/> <References solid0="left hand" solid1="lower left arm"/> <Anchor x="0.16" y="0.5" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-85.0"/> <LimitHigh value="85.0"/> </Axis> </Joint> <Solid> <Name value="left hand"/> <Offset> <Transform type="translate" x="0.16" y="0.45" z="0.0"/> </Offset> <Shape type="box"> <Dimensions x="0.02" y="0.09" z="0.06"/> </Shape> </Solid> <Joint> <Name value="right shoulder"/> <Type value="universal"/> <References solid0="upper right arm" solid1="upper torso"/> <Anchor x="-0.16" y="0.9" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-160.0"/> <LimitHigh value="80.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-170.0"/> <LimitHigh value="45.0"/> </Axis> </Joint> <Solid> <Name value="upper right arm"/> <Offset> <Transform type="translate" x="-0.16" y="0.8" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.03" length="0.2"/> </Shape> </Solid> <Joint> <Name value="right elbow"/> <Type value="hinge"/> <References solid0="lower right arm" solid1="upper right arm"/> <Anchor x="-0.16" y="0.7" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-120.0"/> <LimitHigh value="0.0"/> </Axis> </Joint> <Solid> <Name value="lower right arm"/> <Offset> <Transform type="translate" x="-0.16" y="0.6" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.027" length="0.2"/> </Shape> </Solid> <Joint> <Name value="right wrist"/> <Type value="hinge"/> <References solid0="right hand" solid1="lower right arm"/> <Anchor x="-0.16" y="0.5" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-85.0"/> <LimitHigh value="85.0"/> </Axis> </Joint> <Solid> <Name value="right hand"/> <Offset> <Transform type="translate" x="-0.16" y="0.45" z="0.0"/> </Offset> <Shape type="box"> <Dimensions x="0.02" y="0.09" z="0.06"/> </Shape> </Solid> <Joint> <Name value="chest joint"/> <Type value="universal"/> <References solid0="lower torso" solid1="upper torso"/> <Anchor x="0.0" y="0.86" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-15.0"/> <LimitHigh value="15.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="1.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-15.0"/> <LimitHigh value="15.0"/> </Axis> </Joint> <Solid> <Name value="lower torso"/> <Offset> <Transform type="translate" x="0.0" y="0.75" z="0.0"/> </Offset> <Shape type="box"> <Dimensions x="0.18" y="0.27" z="0.04"/> </Shape> </Solid> <Joint> <Name value="waist joint"/> <Type value="hinge"/> <References solid0="pelvis" solid1="lower torso"/> <Anchor x="0.0" y="0.58" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="0.0" y="1.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-20.0"/> <LimitHigh value="20.0"/> </Axis> </Joint> <Solid> <Name value="pelvis"/> <Offset> <Transform type="translate" x="0.0" y="0.58" z="0.0"/> <Transform type="rotate" angle="90.0" x="0.0" y="1.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.05" length="0.15"/> </Shape> </Solid> <Joint> <Name value="left hip"/> <Type value="universal"/> <References solid0="upper left leg" solid1="pelvis"/> <Anchor x="0.08" y="0.58" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-135.0"/> <LimitHigh value="45.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-30.0"/> <LimitHigh value="30.0"/> </Axis> </Joint> <Solid> <Name value="upper left leg"/> <Offset> <Transform type="translate" x="0.08" y="0.43" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.04" length="0.26"/> </Shape> </Solid> <Joint> <Name value="right hip"/> <Type value="universal"/> <References solid0="upper right leg" solid1="pelvis"/> <Anchor x="-0.08" y="0.58" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-135.0"/> <LimitHigh value="45.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-30.0"/> <LimitHigh value="30.0"/> </Axis> </Joint> <Solid> <Name value="upper right leg"/> <Offset> <Transform type="translate" x="-0.08" y="0.43" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.04" length="0.26"/> </Shape> </Solid> <Joint> <Name value="left knee"/> <Type value="hinge"/> <References solid0="lower left leg" solid1="upper left leg"/> <Anchor x="0.08" y="0.3" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="0.0"/> <LimitHigh value="165.0"/> </Axis> </Joint> <Solid> <Name value="lower left leg"/> <Offset> <Transform type="translate" x="0.08" y="0.17" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.03" length="0.26"/> </Shape> </Solid> <Joint> <Name value="right knee"/> <Type value="hinge"/> <References solid0="lower right leg" solid1="upper right leg"/> <Anchor x="-0.08" y="0.3" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="0.0"/> <LimitHigh value="165.0"/> </Axis> </Joint> <Solid> <Name value="lower right leg"/> <Offset> <Transform type="translate" x="-0.08" y="0.17" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.03" length="0.26"/> </Shape> </Solid> <Joint> <Name value="left ankle"/> <Type value="hinge"/> <References solid0="left foot" solid1="lower left leg"/> <Anchor x="0.08" y="0.04" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-45.0"/> <LimitHigh value="60.0"/> </Axis> </Joint> <Solid> <Name value="left foot"/> <Offset> <Transform type="translate" x="0.08" y="0.02" z="0.045"/> </Offset> <Shape type="box"> <Dimensions x="0.075" y="0.04" z="0.15"/> </Shape> </Solid> <Joint> <Name value="right ankle"/> <Type value="hinge"/> <References solid0="right foot" solid1="lower right leg"/> <Anchor x="-0.08" y="0.04" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-45.0"/> <LimitHigh value="60.0"/> </Axis> </Joint> <Solid> <Name value="right foot"/> <Offset> <Transform type="translate" x="-0.08" y="0.02" z="0.045"/> </Offset> <Shape type="box"> <Dimensions x="0.075" y="0.04" z="0.15"/> </Shape> </Solid> </OpalBlueprint> |
|
From: tylerstreeter <tyl...@us...> - 2005-03-01 05:05:01
|
Update of /cvsroot/opal/opal/samples/simple_objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21242/samples/simple_objects Modified Files: main.cpp simple_objects.vcproj Added Files: ragdoll.xml Log Message: fixed bugs in xml blueprint loading; added ragdoll xml file to sample app Index: main.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/simple_objects/main.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** main.cpp 26 Feb 2005 10:22:22 -0000 1.20 --- main.cpp 1 Mar 2005 05:04:19 -0000 1.21 *************** *** 10,13 **** --- 10,14 ---- #include "../src/BoxObject.h" #include "../src/SphereObject.h" + #include "../src/CapsuleObject.h" #include "../src/CarObject.h" #include "../src/Timer.h" *************** *** 32,36 **** Timer gTimer; opal::Solid* gGround=NULL; ! opal::real gGroundParams[4] = {0.0, 1.0, 0.0, -5.0}; // Output stats every gPerfOutputPeriod seconds. --- 33,38 ---- Timer gTimer; opal::Solid* gGround=NULL; ! opal::real gGroundParams[4] = {0.0, 1.0, 0.0, -0.5}; ! opal::Blueprint gRagdollBP; // Output stats every gPerfOutputPeriod seconds. *************** *** 62,65 **** --- 64,69 ---- void InitializeVariables(); void MainLoop(); + void setupVisualShapes(opal::Solid* s); + void makeRagdoll(); int main(int argc, char **argv) *************** *** 68,76 **** gCameraRotX = 0; gCameraRotY = 0; ! gCameraZoom = -20; gCameraYPos = 0; gSimulator = opal::createSimulator(); gSimulator->setGravity(opal::Vec3r(0, (opal::real)-9.81, 0)); ! //gSimulator->setAccuracy(opal::ACCURACY_VERY_HIGH); //gSimulator->setDefaultLinearDamping(0.5); //gSimulator->setDefaultAngularDamping(0.5); --- 72,80 ---- gCameraRotX = 0; gCameraRotY = 0; ! gCameraZoom = -10; gCameraYPos = 0; gSimulator = opal::createSimulator(); gSimulator->setGravity(opal::Vec3r(0, (opal::real)-9.81, 0)); ! //gSimulator->setSolverAccuracy(opal::SOLVER_ACCURACY_HIGH); //gSimulator->setDefaultLinearDamping(0.5); //gSimulator->setDefaultAngularDamping(0.5); *************** *** 104,111 **** //std::cout << "Current ground material is wood" << std::endl; ! opal::Blueprint bp; ! opal::loadFile(bp, "example.xml"); ! opal::BlueprintInstance instance; ! gSimulator->instantiateBlueprint(instance, bp); InitSDL(); --- 108,113 ---- //std::cout << "Current ground material is wood" << std::endl; ! // Load the ragdoll Blueprint. ! opal::loadFile(gRagdollBP, "ragdoll.xml"); InitSDL(); *************** *** 124,127 **** --- 126,227 ---- } + void makeRagdoll() + { + // Instantiate the Blueprint. + opal::BlueprintInstance instance; + gSimulator->instantiateBlueprint(instance, gRagdollBP); + + // Setup various components of the Blueprint. + opal::Solid* s = NULL; + s = instance.getSolid("left foot"); + setupVisualShapes(s); + s = instance.getSolid("right foot"); + setupVisualShapes(s); + s = instance.getSolid("lower left leg"); + setupVisualShapes(s); + s = instance.getSolid("lower right leg"); + setupVisualShapes(s); + s = instance.getSolid("upper left leg"); + setupVisualShapes(s); + s = instance.getSolid("upper right leg"); + setupVisualShapes(s); + s = instance.getSolid("pelvis"); + setupVisualShapes(s); + s = instance.getSolid("lower torso"); + setupVisualShapes(s); + s = instance.getSolid("upper torso"); + setupVisualShapes(s); + s = instance.getSolid("upper left arm"); + setupVisualShapes(s); + s = instance.getSolid("lower left arm"); + setupVisualShapes(s); + s = instance.getSolid("left hand"); + setupVisualShapes(s); + s = instance.getSolid("upper right arm"); + setupVisualShapes(s); + s = instance.getSolid("lower right arm"); + setupVisualShapes(s); + s = instance.getSolid("right hand"); + setupVisualShapes(s); + s = instance.getSolid("head"); + setupVisualShapes(s); + } + + void setupVisualShapes(opal::Solid* s) + { + const opal::SolidData& data = s->getData(); + int i=0; + for (i=0; i<data.getNumShapes(); ++i) + { + opal::ShapeData* shapeData = data.getShapeData(i); + Base3DObject* newObject = NULL; + + switch(shapeData->getType()) + { + case opal::BOX_SHAPE: + { + opal::Vec3r dim = ((opal::BoxShapeData*)shapeData)->dimensions; + newObject = new BoxObject(gSimulator, s, dim); + break; + } + case opal::SPHERE_SHAPE: + { + opal::real rad = ((opal::SphereShapeData*)shapeData)->radius; + newObject = new SphereObject(gSimulator, s, rad); + break; + } + case opal::CAPSULE_SHAPE: + { + opal::real rad = ((opal::CapsuleShapeData*)shapeData)->radius; + opal::real len = ((opal::CapsuleShapeData*)shapeData)->length; + newObject = new CapsuleObject(gSimulator, s, rad, len); + break; + } + case opal::PLANE_SHAPE: + { + // Not implemented; + break; + } + case opal::RAY_SHAPE: + { + // Not implemented; + break; + } + case opal::MESH_SHAPE: + { + // Not implemented; + break; + } + default: + assert(false); + } + + if (newObject) + { + gObjects.push_back(newObject); + } + } + } + void InitializeVariables() { *************** *** 401,407 **** case SDLK_1: { ! BoxObject* newBox = new BoxObject(gSimulator, false, ! opal::Vec3r((opal::real)0.1, (opal::real)0.1, (opal::real)0.1), ! gObjectMaterial); gObjects.push_back(newBox); break; --- 501,515 ---- case SDLK_1: { ! // Create and setup the Solid. ! opal::Solid* s = gSimulator->createSolid(); ! ! // Add a Box Shape to the Solid. ! opal::BoxShapeData boxData; ! boxData.material = gObjectMaterial; ! boxData.dimensions = opal::Vec3r((opal::real)0.05, ! (opal::real)0.05, (opal::real)0.05); ! s->addShape(boxData); ! BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; *************** *** 409,415 **** case SDLK_2: { ! BoxObject* newBox = new BoxObject(gSimulator, false, ! opal::Vec3r((opal::real)0.4, (opal::real)0.4, (opal::real)0.4), ! gObjectMaterial); gObjects.push_back(newBox); break; --- 517,531 ---- case SDLK_2: { ! // Create and setup the Solid. ! opal::Solid* s = gSimulator->createSolid(); ! ! // Add a Box Shape to the Solid. ! opal::BoxShapeData boxData; ! boxData.material = gObjectMaterial; ! boxData.dimensions = opal::Vec3r((opal::real)0.1, ! (opal::real)0.1, (opal::real)0.1); ! s->addShape(boxData); ! BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; *************** *** 417,423 **** case SDLK_3: { ! BoxObject* newBox = new BoxObject(gSimulator, false, ! opal::Vec3r((opal::real)1.5, (opal::real)1.5, (opal::real)1.5), ! gObjectMaterial); gObjects.push_back(newBox); break; --- 533,547 ---- case SDLK_3: { ! // Create and setup the Solid. ! opal::Solid* s = gSimulator->createSolid(); ! ! // Add a Box Shape to the Solid. ! opal::BoxShapeData boxData; ! boxData.material = gObjectMaterial; ! boxData.dimensions = opal::Vec3r((opal::real)0.4, ! (opal::real)0.4, (opal::real)0.4); ! s->addShape(boxData); ! BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; *************** *** 425,430 **** case SDLK_4: { ! BoxObject* newBox = new BoxObject(gSimulator, false, ! opal::Vec3r(5, 1, 1), gObjectMaterial); gObjects.push_back(newBox); break; --- 549,563 ---- case SDLK_4: { ! // Create and setup the Solid. ! opal::Solid* s = gSimulator->createSolid(); ! ! // Add a Box Shape to the Solid. ! opal::BoxShapeData boxData; ! boxData.material = gObjectMaterial; ! boxData.dimensions = opal::Vec3r((opal::real)5, ! (opal::real)1, (opal::real)1); ! s->addShape(boxData); ! BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; *************** *** 432,438 **** case SDLK_5: { ! BoxObject* newBox = new BoxObject(gSimulator, false, ! opal::Vec3r(5, (opal::real)0.05, 5), ! gObjectMaterial); gObjects.push_back(newBox); break; --- 565,579 ---- case SDLK_5: { ! // Create and setup the Solid. ! opal::Solid* s = gSimulator->createSolid(); ! ! // Add a Box Shape to the Solid. ! opal::BoxShapeData boxData; ! boxData.material = gObjectMaterial; ! boxData.dimensions = opal::Vec3r((opal::real)5, ! (opal::real)0.05, (opal::real)5); ! s->addShape(boxData); ! BoxObject* newBox = new BoxObject(gSimulator, s, ! boxData.dimensions); gObjects.push_back(newBox); break; *************** *** 440,445 **** case SDLK_6: { ! SphereObject* newSphere = new SphereObject(gSimulator, false, ! (opal::real)0.1, gObjectMaterial); gObjects.push_back(newSphere); break; --- 581,594 ---- case SDLK_6: { ! // Create and setup the Solid. ! opal::Solid* s = gSimulator->createSolid(); ! ! // Add a Sphere Shape to the Solid. ! opal::SphereShapeData sphereData; ! sphereData.material = gObjectMaterial; ! sphereData.radius = (opal::real)0.1; ! s->addShape(sphereData); ! SphereObject* newSphere = new SphereObject(gSimulator, s, ! sphereData.radius); gObjects.push_back(newSphere); break; *************** *** 447,452 **** case SDLK_7: { ! SphereObject* newSphere = new SphereObject(gSimulator, false, ! (opal::real)0.4, gObjectMaterial); gObjects.push_back(newSphere); break; --- 596,609 ---- case SDLK_7: { ! // Create and setup the Solid. ! opal::Solid* s = gSimulator->createSolid(); ! ! // Add a Sphere Shape to the Solid. ! opal::SphereShapeData sphereData; ! sphereData.material = gObjectMaterial; ! sphereData.radius = (opal::real)0.4; ! s->addShape(sphereData); ! SphereObject* newSphere = new SphereObject(gSimulator, s, ! sphereData.radius); gObjects.push_back(newSphere); break; *************** *** 454,465 **** case SDLK_8: { ! SphereObject* newSphere = new SphereObject(gSimulator, false, ! (opal::real)0.8, gObjectMaterial); ! gObjects.push_back(newSphere); break; } case SDLK_9: { ! CarObject* newCar = new CarObject(gSimulator, (opal::real)1.0); gObjects.push_back(newCar); break; --- 611,621 ---- case SDLK_8: { ! makeRagdoll(); break; } case SDLK_9: { ! CarObject* newCar = ! new CarObject(gSimulator, (opal::real)1.0); gObjects.push_back(newCar); break; *************** *** 481,485 **** gAspectRatio = (float)gWindowWidth/(float)gWindowHeight; ! SDL_SetVideoMode(gWindowWidth, gWindowHeight, 0, SDL_OPENGL|SDL_RESIZABLE); InitOpenGL(); --- 637,642 ---- gAspectRatio = (float)gWindowWidth/(float)gWindowHeight; ! SDL_SetVideoMode(gWindowWidth, gWindowHeight, ! 0, SDL_OPENGL|SDL_RESIZABLE); InitOpenGL(); Index: simple_objects.vcproj =================================================================== RCS file: /cvsroot/opal/opal/samples/simple_objects/simple_objects.vcproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** simple_objects.vcproj 9 Feb 2005 07:12:45 -0000 1.9 --- simple_objects.vcproj 1 Mar 2005 05:04:20 -0000 1.10 *************** *** 126,129 **** --- 126,132 ---- </File> <File + RelativePath="..\src\CapsuleObject.cpp"> + </File> + <File RelativePath="..\src\CarObject.cpp"> </File> *************** *** 149,152 **** --- 152,158 ---- </File> <File + RelativePath="..\src\CapsuleObject.h"> + </File> + <File RelativePath="..\src\CarObject.h"> </File> --- NEW FILE: ragdoll.xml --- <?xml version="1.0" ?> <OpalBlueprint> <Solid> <Name value="head"/> <Offset> <Transform type="translate" x="0.0" y="1.02" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.065" length="0.02"/> </Shape> </Solid> <Joint> <Name value="neck"/> <Type value="hinge"/> <References solid0="upper torso" solid1="head"/> <Anchor x="0.0" y="0.95" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-45.0"/> <LimitHigh value="45.0"/> </Axis> </Joint> <Solid> <Name value="upper torso"/> <Offset> <Transform type="translate" x="0.0" y="0.9" z="0.0"/> <Transform type="rotate" angle="90.0" x="0.0" y="1.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.045" length="0.25"/> </Shape> </Solid> <Joint> <Name value="left shoulder"/> <Type value="universal"/> <References solid0="upper left arm" solid1="upper torso"/> <Anchor x="0.16" y="0.9" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-160.0"/> <LimitHigh value="80.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-45.0"/> <LimitHigh value="170.0"/> </Axis> </Joint> <Solid> <Name value="upper left arm"/> <Offset> <Transform type="translate" x="0.16" y="0.8" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.03" length="0.2"/> </Shape> </Solid> <Joint> <Name value="left elbow"/> <Type value="hinge"/> <References solid0="lower left arm" solid1="upper left arm"/> <Anchor x="0.16" y="0.7" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-120.0"/> <LimitHigh value="0.0"/> </Axis> </Joint> <Solid> <Name value="lower left arm"/> <Offset> <Transform type="translate" x="0.16" y="0.6" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.027" length="0.2"/> </Shape> </Solid> <Joint> <Name value="left wrist"/> <Type value="hinge"/> <References solid0="left hand" solid1="lower left arm"/> <Anchor x="0.16" y="0.5" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-85.0"/> <LimitHigh value="85.0"/> </Axis> </Joint> <Solid> <Name value="left hand"/> <Offset> <Transform type="translate" x="0.16" y="0.45" z="0.0"/> </Offset> <Shape type="box"> <Dimensions x="0.02" y="0.09" z="0.06"/> </Shape> </Solid> <Joint> <Name value="right shoulder"/> <Type value="universal"/> <References solid0="upper right arm" solid1="upper torso"/> <Anchor x="-0.16" y="0.9" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-160.0"/> <LimitHigh value="80.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-170.0"/> <LimitHigh value="45.0"/> </Axis> </Joint> <Solid> <Name value="upper right arm"/> <Offset> <Transform type="translate" x="-0.16" y="0.8" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.03" length="0.2"/> </Shape> </Solid> <Joint> <Name value="right elbow"/> <Type value="hinge"/> <References solid0="lower right arm" solid1="upper right arm"/> <Anchor x="-0.16" y="0.7" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-120.0"/> <LimitHigh value="0.0"/> </Axis> </Joint> <Solid> <Name value="lower right arm"/> <Offset> <Transform type="translate" x="-0.16" y="0.6" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.027" length="0.2"/> </Shape> </Solid> <Joint> <Name value="right wrist"/> <Type value="hinge"/> <References solid0="right hand" solid1="lower right arm"/> <Anchor x="-0.16" y="0.5" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-85.0"/> <LimitHigh value="85.0"/> </Axis> </Joint> <Solid> <Name value="right hand"/> <Offset> <Transform type="translate" x="-0.16" y="0.45" z="0.0"/> </Offset> <Shape type="box"> <Dimensions x="0.02" y="0.09" z="0.06"/> </Shape> </Solid> <Joint> <Name value="chest joint"/> <Type value="universal"/> <References solid0="lower torso" solid1="upper torso"/> <Anchor x="0.0" y="0.86" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-15.0"/> <LimitHigh value="15.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="1.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-15.0"/> <LimitHigh value="15.0"/> </Axis> </Joint> <Solid> <Name value="lower torso"/> <Offset> <Transform type="translate" x="0.0" y="0.75" z="0.0"/> </Offset> <Shape type="box"> <Dimensions x="0.18" y="0.27" z="0.04"/> </Shape> </Solid> <Joint> <Name value="waist joint"/> <Type value="hinge"/> <References solid0="pelvis" solid1="lower torso"/> <Anchor x="0.0" y="0.58" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="0.0" y="1.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-20.0"/> <LimitHigh value="20.0"/> </Axis> </Joint> <Solid> <Name value="pelvis"/> <Offset> <Transform type="translate" x="0.0" y="0.58" z="0.0"/> <Transform type="rotate" angle="90.0" x="0.0" y="1.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.05" length="0.15"/> </Shape> </Solid> <Joint> <Name value="left hip"/> <Type value="universal"/> <References solid0="upper left leg" solid1="pelvis"/> <Anchor x="0.08" y="0.58" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-135.0"/> <LimitHigh value="45.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-30.0"/> <LimitHigh value="30.0"/> </Axis> </Joint> <Solid> <Name value="upper left leg"/> <Offset> <Transform type="translate" x="0.08" y="0.43" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.04" length="0.26"/> </Shape> </Solid> <Joint> <Name value="right hip"/> <Type value="universal"/> <References solid0="upper right leg" solid1="pelvis"/> <Anchor x="-0.08" y="0.58" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-135.0"/> <LimitHigh value="45.0"/> </Axis> <Axis> <AxisNum value="1"/> <Direction x="0.0" y="0.0" z="1.0"/> <LimitsEnabled value="true"/> <LimitLow value="-30.0"/> <LimitHigh value="30.0"/> </Axis> </Joint> <Solid> <Name value="upper right leg"/> <Offset> <Transform type="translate" x="-0.08" y="0.43" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.04" length="0.26"/> </Shape> </Solid> <Joint> <Name value="left knee"/> <Type value="hinge"/> <References solid0="lower left leg" solid1="upper left leg"/> <Anchor x="0.08" y="0.3" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="0.0"/> <LimitHigh value="165.0"/> </Axis> </Joint> <Solid> <Name value="lower left leg"/> <Offset> <Transform type="translate" x="0.08" y="0.17" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.03" length="0.26"/> </Shape> </Solid> <Joint> <Name value="right knee"/> <Type value="hinge"/> <References solid0="lower right leg" solid1="upper right leg"/> <Anchor x="-0.08" y="0.3" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="0.0"/> <LimitHigh value="165.0"/> </Axis> </Joint> <Solid> <Name value="lower right leg"/> <Offset> <Transform type="translate" x="-0.08" y="0.17" z="0.0"/> <Transform type="rotate" angle="90.0" x="1.0" y="0.0" z="0.0"/> </Offset> <Shape type="capsule"> <Dimensions radius="0.03" length="0.26"/> </Shape> </Solid> <Joint> <Name value="left ankle"/> <Type value="hinge"/> <References solid0="left foot" solid1="lower left leg"/> <Anchor x="0.08" y="0.04" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-45.0"/> <LimitHigh value="60.0"/> </Axis> </Joint> <Solid> <Name value="left foot"/> <Offset> <Transform type="translate" x="0.08" y="0.02" z="0.045"/> </Offset> <Shape type="box"> <Dimensions x="0.075" y="0.04" z="0.15"/> </Shape> </Solid> <Joint> <Name value="right ankle"/> <Type value="hinge"/> <References solid0="right foot" solid1="lower right leg"/> <Anchor x="-0.08" y="0.04" z="0.0"/> <Axis> <AxisNum value="0"/> <Direction x="1.0" y="0.0" z="0.0"/> <LimitsEnabled value="true"/> <LimitLow value="-45.0"/> <LimitHigh value="60.0"/> </Axis> </Joint> <Solid> <Name value="right foot"/> <Offset> <Transform type="translate" x="-0.08" y="0.02" z="0.045"/> </Offset> <Shape type="box"> <Dimensions x="0.075" y="0.04" z="0.15"/> </Shape> </Solid> </OpalBlueprint> |
Update of /cvsroot/opal/opal/samples/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21242/samples/src Modified Files: Base3DObject.h BoxObject.cpp BoxObject.h CarObject.cpp CarObject.h SphereObject.cpp SphereObject.h Added Files: CapsuleObject.cpp CapsuleObject.h Log Message: fixed bugs in xml blueprint loading; added ragdoll xml file to sample app --- NEW FILE: CapsuleObject.h --- #ifndef OPAL_SAMPLES_CAPSULE_OBJECT_H #define OPAL_SAMPLES_CAPSULE_OBJECT_H #include "Base3DObject.h" class CapsuleObject : public Base3DObject { public: CapsuleObject(opal::Simulator* sim, opal::Solid* s, opal::real radius, opal::real length); ~CapsuleObject(); virtual void Draw(); virtual opal::Solid* getSolid(); private: opal::real mRadius; opal::real mLength; opal::Solid* mSolid; opal::Simulator* mSim; }; #endif Index: Base3DObject.h =================================================================== RCS file: /cvsroot/opal/opal/samples/src/Base3DObject.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Base3DObject.h 9 Feb 2005 07:12:45 -0000 1.7 --- Base3DObject.h 1 Mar 2005 05:04:20 -0000 1.8 *************** *** 1,4 **** ! #ifndef __BASE_3D_OBJECT_H__ ! #define __BASE_3D_OBJECT_H__ #include <math.h> --- 1,4 ---- ! #ifndef OPAL_SAMPLES_BASE_3D_OBJECT_H ! #define OPAL_SAMPLES_BASE_3D_OBJECT_H #include <math.h> Index: BoxObject.h =================================================================== RCS file: /cvsroot/opal/opal/samples/src/BoxObject.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BoxObject.h 9 Feb 2005 07:12:45 -0000 1.3 --- BoxObject.h 1 Mar 2005 05:04:20 -0000 1.4 *************** *** 1,4 **** ! #ifndef __BOXOBJECT_H__ ! #define __BOXOBJECT_H__ #include "Base3DObject.h" --- 1,4 ---- ! #ifndef OPAL_SAMPLES_BOX_OBJECT_H ! #define OPAL_SAMPLES_BOX_OBJECT_H #include "Base3DObject.h" *************** *** 7,13 **** { public: ! BoxObject(opal::Simulator* sim, bool isStatic, opal::Vec3r size, ! opal::Material material=opal::defaults::material, ! opal::Matrix44r transform=opal::Matrix44r()); ~BoxObject(); --- 7,11 ---- { public: ! BoxObject(opal::Simulator* sim, opal::Solid* s, opal::Vec3r size); ~BoxObject(); *************** *** 15,20 **** virtual void Draw(); - virtual void setSleeping(bool sleeping); - virtual opal::Solid* getSolid(); --- 13,16 ---- Index: CarObject.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/src/CarObject.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** CarObject.cpp 26 Feb 2005 10:22:23 -0000 1.22 --- CarObject.cpp 1 Mar 2005 05:04:20 -0000 1.23 *************** *** 8,17 **** mSim = sim; - //opal::Space* space = sim->createSpace(); // Create a Solid for the car body. mBody = sim->createSolid(); mBody->setTransform(transform); - //mBody->internal_updateEngineTransform(); // Calculate body dimensions. --- 8,15 ---- Index: SphereObject.h =================================================================== RCS file: /cvsroot/opal/opal/samples/src/SphereObject.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SphereObject.h 9 Feb 2005 07:12:45 -0000 1.3 --- SphereObject.h 1 Mar 2005 05:04:21 -0000 1.4 *************** *** 1,4 **** ! #ifndef __SPHEREOBJECT_H__ ! #define __SPHEREOBJECT_H__ #include "Base3DObject.h" --- 1,4 ---- ! #ifndef OPAL_SAMPLES_SPHERE_OBJECT_H ! #define OPAL_SAMPLES_SPHERE_OBJECT_H #include "Base3DObject.h" *************** *** 7,13 **** { public: ! SphereObject(opal::Simulator* sim, bool isStatic, opal::real radius, ! opal::Material material=opal::defaults::material, ! opal::Matrix44r transform=opal::Matrix44r()); ~SphereObject(); --- 7,11 ---- { public: ! SphereObject(opal::Simulator* sim, opal::Solid* s, opal::real radius); ~SphereObject(); Index: SphereObject.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/src/SphereObject.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SphereObject.cpp 22 Feb 2005 19:46:29 -0000 1.6 --- SphereObject.cpp 1 Mar 2005 05:04:21 -0000 1.7 *************** *** 1,21 **** #include "SphereObject.h" ! SphereObject::SphereObject(opal::Simulator* sim, bool isStatic, ! opal::real radius, opal::Material material, opal::Matrix44r transform) : Base3DObject() { ! mSim = sim; mRadius = radius; ! // Create and setup the Solid. ! mSolid = sim->createSolid(); ! mSolid->setStatic(isStatic); ! mSolid->setTransform(transform); ! // Add a sphere Shape to the Solid. ! opal::SphereShapeData sphereData; ! sphereData.material = material; ! sphereData.radius = radius; ! mSolid->addShape(sphereData); } --- 1,22 ---- #include "SphereObject.h" ! SphereObject::SphereObject(opal::Simulator* sim, opal::Solid* s, ! opal::real radius) : Base3DObject() { ! mSolid = s; mRadius = radius; + mSim = sim; ! //// Create and setup the Solid. ! //mSolid = sim->createSolid(); ! //mSolid->setStatic(isStatic); ! //mSolid->setTransform(transform); ! //// Add a Sphere Shape to the Solid. ! //opal::SphereShapeData sphereData; ! //sphereData.material = material; ! //sphereData.radius = radius; ! //mSolid->addShape(sphereData); } --- NEW FILE: CapsuleObject.cpp --- #include "CapsuleObject.h" CapsuleObject::CapsuleObject(opal::Simulator* sim, opal::Solid* s, opal::real radius, opal::real length) : Base3DObject() { mSolid = s; mRadius = radius; mLength = length; mSim = sim; } CapsuleObject::~CapsuleObject() { mSim->destroySolid(mSolid); } void CapsuleObject::Draw() { float matAmbientAndDiffuse[4] = {(float).6, (float).1, (float).1, (float)1}; if (mSolid->isSleeping()) { matAmbientAndDiffuse[0] = (float)0.3; matAmbientAndDiffuse[1] = (float)0.3; matAmbientAndDiffuse[2] = (float)0.9; matAmbientAndDiffuse[3] = (float)1.0; } glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, matAmbientAndDiffuse); glPushMatrix(); glMultMatrixf(mSolid->getTransform().getData()); glPushMatrix(); glTranslatef(0.0, 0.0, -mLength * (opal::real)0.5); gluCylinder(mQuadric, mRadius, mRadius, mLength, 20, 20); glPopMatrix(); glPushMatrix(); glTranslatef(0.0, 0.0, mLength * (opal::real)0.5); gluSphere(mQuadric, mRadius, 20, 20); glPopMatrix(); glPushMatrix(); glTranslatef(0.0, 0.0, -mLength * (opal::real)0.5); gluSphere(mQuadric, mRadius, 20, 20); glPopMatrix(); glPopMatrix(); } opal::Solid* CapsuleObject::getSolid() { return mSolid; } Index: CarObject.h =================================================================== RCS file: /cvsroot/opal/opal/samples/src/CarObject.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CarObject.h 16 Feb 2005 21:22:36 -0000 1.12 --- CarObject.h 1 Mar 2005 05:04:21 -0000 1.13 *************** *** 1,4 **** ! #ifndef __CAROBJECT_H__ ! #define __CAROBJECT_H__ #include "Base3DObject.h" --- 1,4 ---- ! #ifndef OPAL_SAMPLES_CAR_OBJECT_H ! #define OPAL_SAMPLES_CAR_OBJECT_H #include "Base3DObject.h" Index: BoxObject.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/src/BoxObject.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BoxObject.cpp 22 Feb 2005 19:46:23 -0000 1.7 --- BoxObject.cpp 1 Mar 2005 05:04:20 -0000 1.8 *************** *** 1,21 **** #include "BoxObject.h" ! BoxObject::BoxObject(opal::Simulator* sim, bool isStatic, opal::Vec3r size, ! opal::Material material, opal::Matrix44r transform) : Base3DObject() { mSim = sim; - mDimensions = size; - - // Create and setup the Solid. - mSolid = sim->createSolid(); - mSolid->setStatic(isStatic); - mSolid->setTransform(transform); - - // Add a sphere Shape to the Solid. - opal::BoxShapeData boxData; - boxData.material = material; - boxData.dimensions = size; - mSolid->addShape(boxData); } --- 1,11 ---- #include "BoxObject.h" ! BoxObject::BoxObject(opal::Simulator* sim, opal::Solid* s, ! opal::Vec3r dimensions) : Base3DObject() { + mSolid = s; + mDimensions = dimensions; mSim = sim; } *************** *** 45,53 **** } - void BoxObject::setSleeping(bool sleeping) - { - mSolid->setSleeping(sleeping); - } - opal::Solid* BoxObject::getSolid() { --- 35,38 ---- |
|
From: tylerstreeter <tyl...@us...> - 2005-03-01 05:05:00
|
Update of /cvsroot/opal/opal/samples/car In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21242/samples/car Modified Files: main.cpp Log Message: fixed bugs in xml blueprint loading; added ragdoll xml file to sample app Index: main.cpp =================================================================== RCS file: /cvsroot/opal/opal/samples/car/main.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** main.cpp 26 Feb 2005 10:22:22 -0000 1.22 --- main.cpp 1 Mar 2005 05:04:19 -0000 1.23 *************** *** 87,96 **** gGround->addShape(planeData); ! //create ramp opal::Matrix44r rampTransform; rampTransform.translate(0.0, 0.0, -60.0); rampTransform.rotate(-78.0, 1.0, 0.0, 0.0); ! BoxObject* box = new BoxObject(gSimulator, true, opal::Vec3r(6.0, 65.0, 1.0), ! opal::defaults::material, rampTransform); gObjects.push_back(box); --- 87,101 ---- gGround->addShape(planeData); ! // Create a ramp. ! opal::Solid* s = gSimulator->createSolid(); ! s->setStatic(true); opal::Matrix44r rampTransform; rampTransform.translate(0.0, 0.0, -60.0); rampTransform.rotate(-78.0, 1.0, 0.0, 0.0); ! s->setTransform(rampTransform); ! opal::BoxShapeData boxData; ! boxData.dimensions = opal::Vec3r(6, 65, 1); ! s->addShape(boxData); ! BoxObject* box = new BoxObject(gSimulator, s, boxData.dimensions); gObjects.push_back(box); *************** *** 164,171 **** } ! void BuildWall(const opal::Matrix44r& transform, const opal::Vec3r& blockSize, int length, int height) { opal::Matrix44r M; - //opal::Space* space = gSimulator->createSpace(); for (int l=0; l<length; ++l) --- 169,176 ---- } ! void BuildWall(const opal::Matrix44r& transform, const opal::Vec3r& blockSize, ! int length, int height) { opal::Matrix44r M; for (int l=0; l<length; ++l) *************** *** 179,231 **** } - //M.makeTranslation(pos[0], pos[1], pos[2]); //base wall transform M = transform; ! M.translate(l*blockSize[0] + 0.5*blockSize[0] - 0.5*length*blockSize[0] + offset, h*blockSize[1] + 0.5*blockSize[1], 0.0); ! //if (randbit()) ! if (1) ! { ! //normal size ! BoxObject* newBox = new BoxObject(gSimulator, false, blockSize, ! opal::globals::metalMaterial, M); ! newBox->setSleeping(true); ! gObjects.push_back(newBox); ! } ! else ! { ! //break it up into smaller blocks ! opal::Vec3r newSize = blockSize; ! newSize[0] *= 0.5; ! newSize[1] *= 0.5; ! ! //block 1 - lower left ! M.translate(-0.25*blockSize[0], -0.25*blockSize[1], 0.0); ! BoxObject* newBox = new BoxObject(gSimulator, false, newSize, ! opal::globals::metalMaterial, M); ! newBox->setSleeping(true); ! gObjects.push_back(newBox); ! ! //block 2 - lower right ! M.translate(0.5*blockSize[0], 0.0, 0.0); ! newBox = new BoxObject(gSimulator, false, newSize, ! opal::globals::metalMaterial, M); ! newBox->setSleeping(true); ! gObjects.push_back(newBox); ! ! //block 3 - upper right ! M.translate(0.0, 0.5*blockSize[1], 0.0); ! newBox = new BoxObject(gSimulator, false, newSize, ! opal::globals::metalMaterial, M); ! newBox->setSleeping(true); ! gObjects.push_back(newBox); ! ! //block 4 - upper left ! M.translate(-0.5*blockSize[0], 0.0, 0.0); ! newBox = new BoxObject(gSimulator, false, newSize, ! opal::globals::metalMaterial, M); ! newBox->setSleeping(true); ! gObjects.push_back(newBox); ! } } } --- 184,200 ---- } M = transform; ! M.translate(l*blockSize[0] + 0.5*blockSize[0] - ! 0.5*length*blockSize[0] + offset, h*blockSize[1] + 0.5*blockSize[1], 0.0); ! opal::Solid* s = gSimulator->createSolid(); ! s->setTransform(M); ! s->setSleeping(true); ! opal::BoxShapeData boxData; ! boxData.dimensions = blockSize; ! s->addShape(boxData); ! BoxObject* box = new BoxObject(gSimulator, s, boxData.dimensions); ! gObjects.push_back(box); } } *************** *** 493,505 **** case SDLK_SPACE: { opal::Matrix44r M = gCar->getTransform(); M.translate(0.0, 1.0, -3.0); ! SphereObject* projectile = new SphereObject(gSimulator, false, ! 0.6, opal::defaults::material, M); opal::Force f; f.vec = opal::Vec3r(0, 300, -1200); f.type = opal::LOCAL_FORCE; f.duration = (opal::real)0.01; ! projectile->getSolid()->addForce(f); gObjects.push_back(projectile); break; --- 462,485 ---- case SDLK_SPACE: { + // Figure out where to create the projectile. opal::Matrix44r M = gCar->getTransform(); M.translate(0.0, 1.0, -3.0); ! ! // Create a projectile. ! opal::Solid* s = gSimulator->createSolid(); ! s->setTransform(M); ! opal::SphereShapeData sphereData; ! sphereData.radius = (opal::real)0.6; ! s->addShape(sphereData); ! SphereObject* projectile = new SphereObject(gSimulator, s, ! sphereData.radius); ! ! // Apply a force to the projectile. opal::Force f; f.vec = opal::Vec3r(0, 300, -1200); f.type = opal::LOCAL_FORCE; f.duration = (opal::real)0.01; ! s->addForce(f); ! gObjects.push_back(projectile); break; |
|
From: tylerstreeter <tyl...@us...> - 2005-03-01 05:04:38
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21242/src Modified Files: AttractorMotor.cpp AttractorMotor.h Defines.h GearedMotor.cpp GearedMotor.h Joint.cpp Joint.h ServoMotor.cpp ServoMotor.h ShapeData.h Solid.cpp Solid.h SolidData.cpp SpringMotor.cpp SpringMotor.h ThrusterMotor.cpp ThrusterMotor.h Log Message: fixed bugs in xml blueprint loading; added ragdoll xml file to sample app Index: Joint.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Joint.cpp 26 Feb 2005 10:22:23 -0000 1.22 --- Joint.cpp 1 Mar 2005 05:04:22 -0000 1.23 *************** *** 52,56 **** } ! const JointData& Joint::getJointData()const { return mData; --- 52,56 ---- } ! const JointData& Joint::getData()const { return mData; Index: ShapeData.h =================================================================== RCS file: /cvsroot/opal/opal/src/ShapeData.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ShapeData.h 23 Feb 2005 03:58:23 -0000 1.3 --- ShapeData.h 1 Mar 2005 05:04:22 -0000 1.4 *************** *** 55,59 **** mType = SPHERE_SHAPE; // Leave the offset as an identity matrix. ! material = defaults::material; } --- 55,59 ---- mType = SPHERE_SHAPE; // Leave the offset as an identity matrix. ! material = defaults::shape::material; } Index: GearedMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/GearedMotor.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GearedMotor.cpp 26 Feb 2005 10:22:23 -0000 1.8 --- GearedMotor.cpp 1 Mar 2005 05:04:22 -0000 1.9 *************** *** 57,61 **** } ! const GearedMotorData& GearedMotor::getMotorData()const { return mData; --- 57,61 ---- } ! const GearedMotorData& GearedMotor::getData()const { return mData; Index: ServoMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/ServoMotor.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ServoMotor.h 26 Feb 2005 10:22:23 -0000 1.22 --- ServoMotor.h 1 Mar 2005 05:04:22 -0000 1.23 *************** *** 59,63 **** /// Returns all data describing the Motor. ! virtual const ServoMotorData& OPAL_CALL getMotorData()const; virtual void OPAL_CALL setName(const std::string& name); --- 59,63 ---- /// Returns all data describing the Motor. ! virtual const ServoMotorData& OPAL_CALL getData()const; virtual void OPAL_CALL setName(const std::string& name); Index: AttractorMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/AttractorMotor.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** AttractorMotor.h 26 Feb 2005 10:22:23 -0000 1.24 --- AttractorMotor.h 1 Mar 2005 05:04:22 -0000 1.25 *************** *** 58,62 **** /// Returns all data describing the Motor. ! virtual const AttractorMotorData& OPAL_CALL getMotorData()const; virtual void OPAL_CALL setName(const std::string& name); --- 58,62 ---- /// Returns all data describing the Motor. ! virtual const AttractorMotorData& OPAL_CALL getData()const; virtual void OPAL_CALL setName(const std::string& name); Index: ThrusterMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ThrusterMotor.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ThrusterMotor.cpp 26 Feb 2005 10:22:23 -0000 1.7 --- ThrusterMotor.cpp 1 Mar 2005 05:04:23 -0000 1.8 *************** *** 55,59 **** } ! const ThrusterMotorData& ThrusterMotor::getMotorData()const { return mData; --- 55,59 ---- } ! const ThrusterMotorData& ThrusterMotor::getData()const { return mData; Index: GearedMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/GearedMotor.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GearedMotor.h 26 Feb 2005 10:22:23 -0000 1.8 --- GearedMotor.h 1 Mar 2005 05:04:22 -0000 1.9 *************** *** 63,67 **** /// Returns all data describing the Motor. ! virtual const GearedMotorData& OPAL_CALL getMotorData()const; virtual void OPAL_CALL setName(const std::string& name); --- 63,67 ---- /// Returns all data describing the Motor. ! virtual const GearedMotorData& OPAL_CALL getData()const; virtual void OPAL_CALL setName(const std::string& name); Index: SolidData.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/SolidData.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SolidData.cpp 25 Feb 2005 06:40:26 -0000 1.1 --- SolidData.cpp 1 Mar 2005 05:04:22 -0000 1.2 *************** *** 46,51 **** // "globalLinearVel" is already initialized in its constructor. // "globalAngularVel" is already initialized in its constructor. ! linearDamping = defaults::linearDamping; ! angularDamping = defaults::angularDamping; // The Shape list doesn't need to be initialized. } --- 46,51 ---- // "globalLinearVel" is already initialized in its constructor. // "globalAngularVel" is already initialized in its constructor. ! linearDamping = defaults::solid::linearDamping; ! angularDamping = defaults::solid::angularDamping; // The Shape list doesn't need to be initialized. } Index: Solid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Solid.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Solid.cpp 26 Feb 2005 10:22:23 -0000 1.24 --- Solid.cpp 1 Mar 2005 05:04:22 -0000 1.25 *************** *** 42,46 **** } ! const SolidData& Solid::getSolidData()const { return mData; --- 42,46 ---- } ! const SolidData& Solid::getData()const { return mData; Index: Defines.h =================================================================== RCS file: /cvsroot/opal/opal/src/Defines.h,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Defines.h 28 Feb 2005 03:27:56 -0000 1.62 --- Defines.h 1 Mar 2005 05:04:22 -0000 1.63 *************** *** 109,113 **** ForceType type; ! /// Specifies how long to apply to force. This will be ignored /// if "singleStep" is true. real duration; --- 109,114 ---- ForceType type; ! /// Specifies how long to apply to force. This makes it easy to ! /// apply forces independent of the step size. This will be ignored /// if "singleStep" is true. real duration; *************** *** 275,287 **** namespace defaults { ! const real stepSize = (real)0.0167; // ~60 Hz physics rate const Vec3r gravity(0, 0, 0); const real bounceThreshold = (real)1.0; - const Material material(opal::globals::woodMaterial); const SolverAccuracyLevel solverAccuracy = SOLVER_ACCURACY_MEDIUM; //const bool allowPartialFrames=true; //const int maxStepsPerFrame=10; - const real linearDamping = (real)0.15; - const real angularDamping = (real)0.15; const real maxLinearVel = (real)10000.0; const real maxAngularVel = (real)1000.0; --- 276,285 ---- namespace defaults { ! const real stepSize = (real)0.0167; // ~60 Hz physics update rate. const Vec3r gravity(0, 0, 0); const real bounceThreshold = (real)1.0; const SolverAccuracyLevel solverAccuracy = SOLVER_ACCURACY_MEDIUM; //const bool allowPartialFrames=true; //const int maxStepsPerFrame=10; const real maxLinearVel = (real)10000.0; const real maxAngularVel = (real)1000.0; *************** *** 294,297 **** --- 292,302 ---- const real sleepiness = (real)0.5; const bool isStatic = false; + const real linearDamping = (real)0.15; + const real angularDamping = (real)0.15; + } + + namespace shape + { + const Material material(opal::globals::woodMaterial); } *************** *** 373,377 **** const real autoDisableTimeMin=0; const real autoDisableTimeMax=(real)0.4; ! const int maxContactPoints=(int)32; const real minMassRatio=(real)0.001; --- 378,382 ---- const real autoDisableTimeMin=0; const real autoDisableTimeMax=(real)0.4; ! const int maxContactPoints=(int)24; const real minMassRatio=(real)0.001; *************** *** 380,384 **** const real minERP=(real)0.1; const real maxERP=(real)0.9; ! const real globalCFM=(real)1e-6; const real jointFudgeFactor=(real)0.001; const real maxFriction=(real)1000.0; --- 385,389 ---- const real minERP=(real)0.1; const real maxERP=(real)0.9; ! const real globalCFM=(real)1e-3; const real jointFudgeFactor=(real)0.001; const real maxFriction=(real)1000.0; Index: Solid.h =================================================================== RCS file: /cvsroot/opal/opal/src/Solid.h,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** Solid.h 26 Feb 2005 10:22:23 -0000 1.78 --- Solid.h 1 Mar 2005 05:04:22 -0000 1.79 *************** *** 39,219 **** class ShapeData; - /// TODO: replace with SolidData struct - //struct BodyState - //{ - // Matrix44r transform; - // Vec3r globalLinearVel; - // Vec3r globalAngularVel; - //}; - - ///// TODO: replace with SolidData - //struct SolidDescription - //{ - // ~SolidDescription() - // { - // shapeList.clear(); - // userProperties.clear(); - // } - - // std::string name; - // Matrix44r transform; - // bool isStatic; - // real linearDamping; - // real angularDamping; - // std::vector<ShapeDescription> shapeList; - // std::vector<UserProperty> userProperties; - //}; - - // Old data structure... - //struct SolidData - //{ - // ~SolidData() - // { - // userProperties.clear(); - // } - - // std::string getUserProperty(std::string name) - // { - // std::map<std::string, std::string>::iterator iter = - // userProperties.find(name); - // if (userProperties.end() != iter) - // { - // return (*iter).second; - // } - // else - // { - // return ""; - // } - // } - - // Solid* solidPtr; - // std::map<std::string, std::string> userProperties; - //} - - //namespace globals - //{ - // /// The number of floats needed to describe the dimensions of - // /// any Shape. - // const int numShapeDimensions=7; - //} - - ///// A data structure containing all essential parameters that describe - ///// a Shape. Note that there is no class associated with Shapes, just - ///// this data structure. - //struct ShapeData - //{ - // ShapeData() - // { - // type = SPHERE_SHAPE; - // // Leave the offset as an identity matrix. - // material = defaults::material; - - // for (int i=0; i<globals::numShapeDimensions; ++i) - // { - // dimensions[i] = 0; - // } - // } - - // /// Copy constructor. - // ShapeData(const ShapeData& data) - // { - // (*this) = sd; - // } - - // /// Makes a deep copy. - // void operator=(const ShapeData& data) - // { - // type = data.type; - // offset = data.offset; - // material = data.material; - - // for (int i=0; i<globals::numShapeDimensions; ++i) - // { - // dimensions[i] = data.dimensions[i]; - // } - // } - - // /// The Shape type. - // ShapeType type; - - // /// The offset transform from a Solid's transform. - // Matrix44r offset; - - // /// The Shape's material. - // Material material; - - // /// Dimensions for all Shape types are stored in the "dimensions" - // /// array. - // /// Boxes: elements 0, 1, 2 are the box dimensions. - // /// Spheres: element 0 is radius. - // /// Planes: elements 0, 1, 2, 3 are the plane normal and - // /// distance from the origin (i.e. they define the plane equation - // /// ax + by + cz = d). - // /// Capped cylinders: elements 0 and 1 are radius and length. - // /// Rays: elements 0, 1, 2 are the origin, 3, 4, 5 are direction, - // /// and 6 is length. - // real dimensions[globals::numShapeDimensions]; - //}; - - ///// A data structure containing all essential parameters that describe - ///// a Solid. - //struct SolidData - //{ - // SolidData() - // { - // enabled = defaults::solid::enabled; - // sleeping = defaults::solid::sleeping; - // isStatic = defaults::solid::isStatic; - // // Leave the transform as an identity matrix. - // globalLinearVel = 0; - // globalAngularVel = 0; - // linearDamping = defaults::linearDamping; - // angularDamping = defaults::angularDamping; - // // The Shape list doesn't need to be initialized. - // } - - // /// Copy constructor. - // SolidData(const SolidData& data) - // { - // (*this) = data; - // } - - // /// This is necessary because SolidData uses a dynamically-allocated - // /// list of Shapes. - // ~SolidData() - // { - // shapes.clear(); - // } - - // /// Makes a deep copy. - // void operator=(const SolidData& data) - // { - // enabled = sd.enabled; - // sleeping = sd.sleeping; - // isStatic = sd.isStatic; - // transform = sd.transform; - // globalLinearVel = sd.globalLinearVel; - // globalAngularVel = sd.globalAngularVel; - // linearDamping = sd.linearDamping; - // angularDamping = sd.angularDamping; - - // shapes.clear(); - // for (unsigned int i=0; i<sd.shapes.size(); ++i) - // { - // shapes.push_back(sd.shapes[i]); - // } - // } - - // bool enabled; - // bool sleeping; - // bool isStatic; - // Matrix44r transform; - // Vec3r globalLinearVel; - // Vec3r globalAngularVel; - // real linearDamping; - // real angularDamping; - // std::vector<ShapeData> shapes; - //}; - /// Solids are the physical objects in the simulation. Solids can be /// static or dynamic. Static Solids are simple collision shapes; --- 39,42 ---- *************** *** 235,239 **** /// Returns all data describing the Solid. ! virtual const SolidData& OPAL_CALL getSolidData()const; /// Sets the Solid's name. --- 58,62 ---- /// Returns all data describing the Solid. ! virtual const SolidData& OPAL_CALL getData()const; /// Sets the Solid's name. Index: ServoMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ServoMotor.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ServoMotor.cpp 26 Feb 2005 10:22:23 -0000 1.12 --- ServoMotor.cpp 1 Mar 2005 05:04:22 -0000 1.13 *************** *** 38,44 **** ServoMotor::~ServoMotor() { ! // This will automatically set the Joint's desired vel and max ! // force to 0. ! setEnabled(false); } --- 38,49 ---- ServoMotor::~ServoMotor() { ! // We must set the Joint's desired vel and max force to 0 since ! // this Motor won't apply to it anymore. This is only necessary ! // if this Motor is enabled. ! if (mData.enabled && mData.joint) ! { ! mData.joint->internal_setDesiredVel(mData.jointAxisNum, 0); ! mData.joint->internal_setMaxTorque(mData.jointAxisNum, 0); ! } } *************** *** 80,84 **** } ! const ServoMotorData& ServoMotor::getMotorData()const { return mData; --- 85,89 ---- } ! const ServoMotorData& ServoMotor::getData()const { return mData; Index: SpringMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/SpringMotor.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SpringMotor.h 26 Feb 2005 10:22:23 -0000 1.8 --- SpringMotor.h 1 Mar 2005 05:04:22 -0000 1.9 *************** *** 57,61 **** /// Returns all data describing the Motor. ! virtual const SpringMotorData& OPAL_CALL getMotorData()const; virtual void OPAL_CALL setName(const std::string& name); --- 57,61 ---- /// Returns all data describing the Motor. ! virtual const SpringMotorData& OPAL_CALL getData()const; virtual void OPAL_CALL setName(const std::string& name); Index: SpringMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/SpringMotor.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SpringMotor.cpp 26 Feb 2005 10:22:23 -0000 1.7 --- SpringMotor.cpp 1 Mar 2005 05:04:22 -0000 1.8 *************** *** 55,59 **** } ! const SpringMotorData& SpringMotor::getMotorData()const { return mData; --- 55,59 ---- } ! const SpringMotorData& SpringMotor::getData()const { return mData; Index: Joint.h =================================================================== RCS file: /cvsroot/opal/opal/src/Joint.h,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Joint.h 26 Feb 2005 10:22:23 -0000 1.57 --- Joint.h 1 Mar 2005 05:04:22 -0000 1.58 *************** *** 76,80 **** /// Returns all data describing the Joint. ! virtual const JointData& OPAL_CALL getJointData()const; /// Sets the Joint's name. --- 76,80 ---- /// Returns all data describing the Joint. ! virtual const JointData& OPAL_CALL getData()const; /// Sets the Joint's name. Index: ThrusterMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/ThrusterMotor.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ThrusterMotor.h 26 Feb 2005 10:22:23 -0000 1.8 --- ThrusterMotor.h 1 Mar 2005 05:04:23 -0000 1.9 *************** *** 56,60 **** /// Returns all data describing the Motor. ! virtual const ThrusterMotorData& OPAL_CALL getMotorData()const; virtual void OPAL_CALL setName(const std::string& name); --- 56,60 ---- /// Returns all data describing the Motor. ! virtual const ThrusterMotorData& OPAL_CALL getData()const; virtual void OPAL_CALL setName(const std::string& name); Index: AttractorMotor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/AttractorMotor.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AttractorMotor.cpp 26 Feb 2005 10:22:23 -0000 1.17 --- AttractorMotor.cpp 1 Mar 2005 05:04:22 -0000 1.18 *************** *** 68,72 **** } ! const AttractorMotorData& AttractorMotor::getMotorData()const { return mData; --- 68,72 ---- } ! const AttractorMotorData& AttractorMotor::getData()const { return mData; |
|
From: tylerstreeter <tyl...@us...> - 2005-03-01 05:04:35
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21242 Modified Files: todo.txt Log Message: fixed bugs in xml blueprint loading; added ragdoll xml file to sample app Index: todo.txt =================================================================== RCS file: /cvsroot/opal/opal/todo.txt,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** todo.txt 26 Feb 2005 10:22:22 -0000 1.46 --- todo.txt 1 Mar 2005 05:04:24 -0000 1.47 *************** *** 2,20 **** ================= - * fix crashing problem when instantiate ball joint from example.xml - * look at scons dylib-building problem on os x * add offset transform to instantiateBlueprint * fix memory allocation across dll boundary - - Blueprint - - BlueprintInstance - volume collision check results -> put results in a specific class ! * certain function calls (e.g. setStatic) during collision events crash the system - solution: create an event queue and call the functions at a safe time - per step, or per frame? - replace 'garbage' system with delayed destroy events * Add a boolean to Solid that determines if it generates contacts at all (the docking volume shouldn't collide with anything but should generate collision events still). --- 2,25 ---- ================= * look at scons dylib-building problem on os x * add offset transform to instantiateBlueprint + * add a "scale" constant to instantiateBlueprint + - applies to shape sizes and transforms + * fix memory allocation across dll boundary - volume collision check results -> put results in a specific class ! * certain function calls during collision events crash the system ! - definitely bad: ! - setStatic, setPosition, setTransform, setVelocity, setSpace, addShape, setSleeping, simulator::destroySolid/Joint, etc. ! - maybe bad: ! - setEnabled, translateMass - solution: create an event queue and call the functions at a safe time + - don't use events when it's already "safe" (i.e. not in collision detection mode), just apply them instantly; i.e. have a "safe" boolean that's set to false only when in collision detection - per step, or per frame? - replace 'garbage' system with delayed destroy events + - alternative solution: just make collision callback calls happen at the end of the step; but this could be a problem because sometimes you might want to ignore contacts... but maybe it wouldn't matter if we don't return the boolean from the collision events and used some other contact-generation flag system (i.e. the "category/collide" bits); how should we handle this? * Add a boolean to Solid that determines if it generates contacts at all (the docking volume shouldn't collide with anything but should generate collision events still). *************** *** 23,26 **** --- 28,35 ---- * reenable collision detection for static-static, static-sleeping cases (or have an option) + * make trimeshes work + + * get rid of custom motors? + - for one thing, we can't use them in xml For Version 0.4.0 *************** *** 31,43 **** - non-fatal errors just print a warning - * add 'web' and 'doc' modules to repos - - maybe just add 'web' module that contains docs - - post either zipped docs or hyperlinked pdf of docs - * implement sensors ! - RayCastSensor (i.e. "PSD (position sensitive detector)" or "rangefinder"): measures distance from sensor to first intersection (attach to a solid [be sure to ignore collisions with the attached solid] or nothing) - not updated regularly; must be updated manually by user ! - VolumeSensor (i.e. "proximity sensor?"): similar to RayCastSensor, but for a volume; finds all Solids colliding with a given (attached) Solid - not updated regularly; must be updated manually by user - ContactSensor - hold a queue of contact events (attach to a solid, to a single shape, or to nothing?) --- 40,49 ---- - non-fatal errors just print a warning * implement sensors ! - RaycastSensor (i.e. "PSD (position sensitive detector)" or "rangefinder"): measures distance from sensor to first intersection (attach to a solid [be sure to ignore collisions with the attached solid] or nothing) - not updated regularly; must be updated manually by user ! - VolumeSensor (i.e. "proximity sensor?"): similar to RaycastSensor, but for a volume; finds all Solids colliding with a given (attached) Solid - not updated regularly; must be updated manually by user + - should this be combined with trigger solids? probably not: ProximitySensors are one-time, triggers are always updated (triggers are actually just solids with a ContactSensor and don't generate contact joints) - ContactSensor - hold a queue of contact events (attach to a solid, to a single shape, or to nothing?) *************** *** 49,52 **** --- 55,62 ---- - InclineSensor (i.e. "inclinometer"): measures angle between initial and current orientation + * dynamic number of contact joints? + - depends on types of objects + - contact filtering? + * event handling/callbacks - collisions *************** *** 59,63 **** * should all modes with multiple options (e.g. spring motor, accel sensor) take bit flags? ! * separate Joint into separate subclasses? * separate Motors with different modes into separate types? --- 69,73 ---- * should all modes with multiple options (e.g. spring motor, accel sensor) take bit flags? ! * separate Joint back into separate subclasses? * separate Motors with different modes into separate types? *************** *** 109,115 **** - shapes simply use a material name - * try to fix weird inheritance with Joint, ODEJoint, HingeJoint, ODEHingeJoint, etc. - - possible solution: remove ODEJoint; make common ODE Joint functions global functions in a hidden namespace - * handle blown frame cases: - desired frame rate (max dt)? ask ace... --- 119,122 ---- *************** *** 134,140 **** --- 141,149 ---- - ragdoll (launched out of a canon?) - + * search code for TODOs * blueprints could have a single boolean space parameter like "insert the whole bp into a space or not" + - this could even just be a bool passed to the instantiate function Long-term Ideas *************** *** 161,261 **** - doesn't need to be updated every step (maybe once per second) - Website Contents - ================ - * change log somewhere? - - * documentation - - manual - - general description of main objects - - tutorials - - basic tutorial showing all types of object creation - - user-derived classes - - doxygen source docs - * user projects - - rhino - - radius - - cabin - - switcher - * contact - - our names, bios, email addresses? - - Preliminary Manual Notes - ======================== - OPAL is a high-level abstract interface for physics engines in games and other real-time 3D applications. It simplifies common physics tasks and provides a physics engine-independent API that can be extended to support new physics engines. - - ------------------------------------ - - The main objects in OPAL are: simulators, solids, joints, and motors. Create a simulator, have the simulator create solids for you, add shapes to the solids, and add forces to the solids. Solids can take an initial matrix transform. Shapes added to a solid can take a matrix transform as an offset from the solid's center. A solid can return its transform matrix for drawing purposes (if a solid has multiple shapes, be sure to save their offset matrices for drawing later). Solids can be static, meaning that they don't move around in the simulation. - - Objects - - classes - - Simulator - - Solid - - Joint - - Motor - - Sensor - - Blueprint - - Data objects - - SolidData - - ShapeData (many different sub-types) - - Shape type - - JointData - - MotorData (many different sub-types) - - SensorData (many different sub-types) - - Blueprint: contains lots of Data objects - - other structs - - Material - - RayHit - - collision event - - Force - - Joint axis - - Joint limit - - Document - ======== - * doxygen - - put manual, etc. on main page - - document all namespaces - - use multi-line comments? (single-line appears in short description) - - finish documenting all functions, data members - - post on website - - * specific object type properties - - memory management: user managed vs. OPAL managed - - initially enabled or disabled - - user-created classes - - ContactSensor - - JointBreakSensor - - custom Motors - - * Most objects can be created in two ways - - create the object (automatically uses default values); change specific parameters - - setup a Data object and pass it into the object's init function - - some objects (e.g. Joints) must have init called before using them - - * Shapes can be added to solids in two ways - - add a ShapeBP to a SolidBP, then create the Solid - - create a Solid, then add a shape by passing it a ShapeBP - - * custom motors cannot be saved to/loaded from an XML file - - * for derived classes (custom motors, event handlers), put OPAL_CALL in front of public function names - - * most objects are created and destroyed by the Simulator, but some are user-managed - - examples of user-managed: - - most structs - - custom motors - - event handlers - - * all angles are in degrees - - * be aware of floating point accuracy issues - - use the same precision for OPAL reals and ODE dReals - - * two ways to create objects - 1.) have the simulator create the object with default settings, then set its parameters manually - Solid* s = sim->createSolid(); - s->setStatic(true); - s->setTransform(Matrix44r()); - 2.) have the simulator create the object by passing in a blueprint --- 170,172 ---- |