[Opal-commits] opal/src AttractorMotor.cpp,1.18,1.19 BlueprintManager.cpp,1.28,1.29 Defines.h,1.64,1
Status: Inactive
Brought to you by:
tylerstreeter
|
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 ---- |