Update of /cvsroot/opal/opal/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27467/src
Modified Files:
Defines.h Joint.h SensorData.h Solid.h SolidData.h
Log Message:
added Solid init function; fixed sample apps
Index: SolidData.h
===================================================================
RCS file: /cvsroot/opal/opal/src/SolidData.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SolidData.h 23 Feb 2005 03:58:23 -0000 1.3
--- SolidData.h 23 Feb 2005 04:56:49 -0000 1.4
***************
*** 51,59 ****
}
! /// Copy constructor.
! SolidData(const SolidData& data)
! {
! (*this) = data;
! }
virtual ~SolidData()
--- 51,59 ----
}
! ///// Copy constructor.
! //SolidData(const SolidData& data)
! //{
! // (*this) = data;
! //}
virtual ~SolidData()
***************
*** 66,87 ****
}
! /// Makes a deep copy.
! virtual void OPAL_CALL operator=(const SolidData& data)
! {
! enabled = data.enabled;
! sleeping = data.sleeping;
! isStatic = data.isStatic;
! transform = data.transform;
! globalLinearVel = data.globalLinearVel;
! globalAngularVel = data.globalAngularVel;
! linearDamping = data.linearDamping;
! angularDamping = data.angularDamping;
! shapes.clear();
! for (unsigned int i=0; i<data.shapes.size(); ++i)
! {
! shapes.push_back(data.shapes[i]);
! }
! }
bool enabled;
--- 66,89 ----
}
! ///// Makes a deep copy.
! //virtual void OPAL_CALL operator=(const SolidData& data)
! //{
! // enabled = data.enabled;
! // sleeping = data.sleeping;
! // isStatic = data.isStatic;
! // transform = data.transform;
! // globalLinearVel = data.globalLinearVel;
! // globalAngularVel = data.globalAngularVel;
! // linearDamping = data.linearDamping;
! // angularDamping = data.angularDamping;
! // shapes.clear();
! // for (unsigned int i=0; i<data.shapes.size(); ++i)
! // {
! // // TODO: need an actual ShapeData allocated here, but it
! // // must be the right type.
! // shapes.push_back(data.shapes[i]);
! // }
! //}
bool enabled;
Index: SensorData.h
===================================================================
RCS file: /cvsroot/opal/opal/src/SensorData.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SensorData.h 23 Feb 2005 03:58:23 -0000 1.1
--- SensorData.h 23 Feb 2005 04:56:49 -0000 1.2
***************
*** 56,60 ****
/// Returns the Sensor's type.
! virtual SensorData OPAL_CALL getType()const
{
return mType;
--- 56,60 ----
/// Returns the Sensor's type.
! virtual SensorType OPAL_CALL getType()const
{
return mType;
Index: Defines.h
===================================================================
RCS file: /cvsroot/opal/opal/src/Defines.h,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** Defines.h 23 Feb 2005 03:58:23 -0000 1.58
--- Defines.h 23 Feb 2005 04:56:49 -0000 1.59
***************
*** 293,297 ****
{
const JointType type = HINGE_JOINT;
! const bool enabled = false;
const real lowLimit = 0;
const real highLimit = 0;
--- 293,297 ----
{
const JointType type = HINGE_JOINT;
! const bool enabled = true;
const real lowLimit = 0;
const real highLimit = 0;
***************
*** 312,316 ****
namespace motor
{
! const bool enabled = false;
/// Default parameters used in AttractorMotor creation.
--- 312,316 ----
namespace motor
{
! const bool enabled = true;
/// Default parameters used in AttractorMotor creation.
Index: Solid.h
===================================================================
RCS file: /cvsroot/opal/opal/src/Solid.h,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** Solid.h 23 Feb 2005 03:58:23 -0000 1.75
--- Solid.h 23 Feb 2005 04:56:49 -0000 1.76
***************
*** 229,232 ****
--- 229,237 ----
virtual ~Solid();
+ /// Initializes the Solid with the given data structure. Calling
+ /// this more than once will automatically destroy all the old
+ /// Shapes before adding new ones.
+ virtual void OPAL_CALL init(const SolidData& data) = 0;
+
/// Returns all data describing the Solid.
virtual const SolidData& OPAL_CALL getSolidData();
Index: Joint.h
===================================================================
RCS file: /cvsroot/opal/opal/src/Joint.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** Joint.h 23 Feb 2005 03:58:23 -0000 1.54
--- Joint.h 23 Feb 2005 04:56:49 -0000 1.55
***************
*** 70,76 ****
// const JointAxis& axis2=JointAxis()) = 0;
! /// Initializes the Joint from a Joint blueprint. Calling this
! /// more than once will automatically detach the Joint from its
! /// old Solids first.
virtual void OPAL_CALL init(const JointData& data);
--- 70,76 ----
// const JointAxis& axis2=JointAxis()) = 0;
! /// Initializes the Joint with the given data structure. Calling
! /// this more than once will automatically detach the Joint from
! /// its old Solids first.
virtual void OPAL_CALL init(const JointData& data);
|