opal-commits Mailing List for Open Physics Abstraction Layer (Page 7)
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: Olex <ole...@us...> - 2005-12-01 02:05:03
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9152/src/ODE Modified Files: ODESolid.cpp ODESolid.h Log Message: Implemented Solid::setMass, added unit tests to test it. Added missing Point3r implementation file. Index: ODESolid.h =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESolid.h,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** ODESolid.h 6 Nov 2005 03:20:01 -0000 1.72 --- ODESolid.h 1 Dec 2005 02:04:54 -0000 1.73 *************** *** 107,110 **** --- 107,112 ---- virtual Vec3r OPAL_CALL getGlobalAngularVel()const; + virtual void OPAL_CALL setMass( const Mass & newmass, const Matrix44r & offset ); + virtual void OPAL_CALL translateMass(const Vec3r& offset); Index: ODESolid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESolid.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** ODESolid.cpp 19 Nov 2005 18:09:01 -0000 1.92 --- ODESolid.cpp 1 Dec 2005 02:04:54 -0000 1.93 *************** *** 1,30 **** /************************************************************************* ! * * ! * Open Physics Abstraction Layer * ! * Copyright (C) 2004-2005 * ! * Alan Fischer ala...@gm... * ! * Andres Reinot an...@re... * ! * Tyler Streeter tyl...@gm... * ! * All rights reserved. * ! * Web: opal.sourceforge.net * ! * * [...2272 lines suppressed...] ! } ! ! void ODESolid::internal_setFreelySpinning( bool fs ) ! { ! mIsFreelySpinning = fs; ! } ! ! bool ODESolid::isInertiaNonSymmetric( const dMass& mass ) const ! { ! if ( !areEqual( ( real ) mass.I[ 0 ], ( real ) mass.I[ 5 ] ) ! || !areEqual( ( real ) mass.I[ 5 ], ( real ) mass.I[ 10 ] ) ) ! { ! return true; ! } ! else ! { ! return false; ! } ! } } |
|
From: Olex <ole...@us...> - 2005-11-30 06:28:20
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18063/src Modified Files: Defines.h Makefile.am Makefile.in Matrix44r.h OpalMath.h Point3r.h SConscript SensorData.h ShapeData.h SpringMotor.h Vec3r.h Added Files: Vec3r.cpp testPoint3r.cpp testVec3r.cpp Log Message: Vec3r and Point3r refactored and fixed with unit tests. Index: ShapeData.h =================================================================== RCS file: /cvsroot/opal/opal/src/ShapeData.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ShapeData.h 21 Jul 2005 15:59:01 -0000 1.9 --- ShapeData.h 30 Nov 2005 06:28:12 -0000 1.10 *************** *** 29,33 **** --- 29,35 ---- #define OPAL_SHAPE_DATA_H + // project headers #include "Defines.h" + #include "Matrix44r.h" namespace opal *************** *** 44,48 **** }; ! /// A data structure describing a Shape. Note that there is no other /// class associated with Shapes besides this one. class ShapeData --- 46,50 ---- }; ! /// A data structure describing a Shape. Note that there is no other /// class associated with Shapes besides this one. class ShapeData *************** *** 51,55 **** OPAL_DECL ShapeData() { ! // The initial type doesn't matter since the abstract base // class will never be instantiated. mType = SPHERE_SHAPE; --- 53,57 ---- OPAL_DECL ShapeData() { ! // The initial type doesn't matter since the abstract base // class will never be instantiated. mType = SPHERE_SHAPE; *************** *** 69,74 **** } ! /// Returns the axis-aligned bounding box of the ShapeData relative ! /// to its center. The 'aabb' array stores data in the following /// order: min x, max x, min y, max y, min z, max z. OPAL_DECL virtual void OPAL_CALL getLocalAABB(real aabb[6]) = 0; --- 71,76 ---- } ! /// Returns the axis-aligned bounding box of the ShapeData relative ! /// to its center. The 'aabb' array stores data in the following /// order: min x, max x, min y, max y, min z, max z. OPAL_DECL virtual void OPAL_CALL getLocalAABB(real aabb[6]) = 0; *************** *** 80,84 **** Material material; ! /// The Shape's contact group. If this exceeds 31, bad things /// might happen since there are only 32 groups. unsigned int contactGroup; --- 82,86 ---- Material material; ! /// The Shape's contact group. If this exceeds 31, bad things /// might happen since there are only 32 groups. unsigned int contactGroup; Index: SensorData.h =================================================================== RCS file: /cvsroot/opal/opal/src/SensorData.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SensorData.h 29 Mar 2005 03:05:46 -0000 1.11 --- SensorData.h 30 Nov 2005 06:28:12 -0000 1.12 *************** *** 29,33 **** --- 29,35 ---- #define OPAL_SENSOR_DATA_H + // project headers #include "Defines.h" + #include "Matrix44r.h" namespace opal *************** *** 48,52 **** OPAL_DECL SensorData() { ! // The initial type doesn't matter since the abstract base // class will never be instantiated. mType = ACCELERATION_SENSOR; --- 50,54 ---- OPAL_DECL SensorData() { ! // The initial type doesn't matter since the abstract base // class will never be instantiated. mType = ACCELERATION_SENSOR; *************** *** 72,80 **** bool enabled; ! /// An identifier for the Sensor. std::string name; ! /// Pointer to the Solid to which this Sensor is attached. This ! /// will be NULL if the Sensor is not attached to a Solid (i.e. /// it is just positioned somewhere within the environment). Solid* solid; --- 74,82 ---- bool enabled; ! /// An identifier for the Sensor. std::string name; ! /// Pointer to the Solid to which this Sensor is attached. This ! /// will be NULL if the Sensor is not attached to a Solid (i.e. /// it is just positioned somewhere within the environment). Solid* solid; *************** *** 86,91 **** std::string solidBlueprintRefName; ! /// If the Sensor is attached to a Solid, this transform is the global ! /// offset from that Solid's transform. Otherwise, it is just the /// Sensor's global transform. Matrix44r transform; --- 88,93 ---- std::string solidBlueprintRefName; ! /// If the Sensor is attached to a Solid, this transform is the global ! /// offset from that Solid's transform. Otherwise, it is just the /// Sensor's global transform. Matrix44r transform; Index: Makefile.am =================================================================== RCS file: /cvsroot/opal/opal/src/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 21 Nov 2005 13:59:16 -0000 1.3 --- Makefile.am 30 Nov 2005 06:28:12 -0000 1.4 *************** *** 8,20 **** SUBDIRS = external ODE noinst_LIBRARIES = libopalode.a ! libopalode_a_SOURCES = AccelerationSensor.cpp AttractorMotor.cpp Blueprint.cpp\ ! BlueprintInstance.cpp BlueprintManager.cpp CollisionEventHandler.cpp\ ! GearedMotor.cpp InclineSensor.cpp Joint.cpp Logger.cpp Motor.cpp\ ! RaycastSensor.cpp Sensor.cpp ServoMotor.cpp Simulator.cpp Solid.cpp\ ! SolidData.cpp Space.cpp SpringMotor.cpp ThrusterMotor.cpp\ ! VolumeSensor.cpp bin_PROGRAMS = test_opal test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode --- 8,20 ---- SUBDIRS = external ODE noinst_LIBRARIES = libopalode.a ! libopalode_a_SOURCES = AccelerationSensor.cpp AttractorMotor.cpp Blueprint.cpp \ ! BlueprintInstance.cpp BlueprintManager.cpp CollisionEventHandler.cpp GearedMotor.cpp \ ! InclineSensor.cpp Joint.cpp Logger.cpp Motor.cpp RaycastSensor.cpp Sensor.cpp \ ! ServoMotor.cpp Simulator.cpp Solid.cpp SolidData.cpp Space.cpp SpringMotor.cpp \ ! ThrusterMotor.cpp VolumeSensor.cpp Vec3r.cpp bin_PROGRAMS = test_opal test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp testVec3r.cpp testPoint3r.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode + noinst_HEADERS = Mass.h Matrix33r.h Index: Vec3r.h =================================================================== RCS file: /cvsroot/opal/opal/src/Vec3r.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Vec3r.h 27 Apr 2005 02:28:18 -0000 1.17 --- Vec3r.h 30 Nov 2005 06:28:12 -0000 1.18 *************** *** 1,317 **** /************************************************************************* ! * * ! * Open Physics Abstraction Layer * ! * Copyright (C) 2004-2005 * ! * Alan Fischer ala...@gm... * ! * Andres Reinot an...@re... * ! * Tyler Streeter tyl...@gm... * ! * All rights reserved. * ! * Web: opal.sourceforge.net * ! * * ! * This library is free software; you can redistribute it and/or * ! * modify it under the terms of EITHER: * ! * (1) The GNU Lesser General Public License as published by the Free * ! * Software Foundation; either version 2.1 of the License, or (at * ! * your option) any later version. The text of the GNU Lesser * ! * General Public License is included with this library in the * ! * file license-LGPL.txt. * ! * (2) The BSD-style license that is included with this library in * ! * the file license-BSD.txt. * ! * * ! * This library is distributed in the hope that it will be useful, * ! * but WITHOUT ANY WARRANTY; without even the implied warranty of * ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * ! * license-LGPL.txt and license-BSD.txt for more details. * ! * * ! *************************************************************************/ #ifndef OPAL_VEC3R_H #define OPAL_VEC3R_H #include "OpalMath.h" namespace opal { ! class Vec3r; ! inline Vec3r operator+(const Vec3r &u, const Vec3r &v); ! inline Vec3r operator-(const Vec3r &u, const Vec3r &v); ! inline Vec3r operator*(const Vec3r &v, real scalar); ! inline Vec3r operator*(real scalar, const Vec3r &v); ! inline Vec3r operator/(const Vec3r &v, real scalar); ! inline Vec3r operator%(const Vec3r & a, const Vec3r & b); ! inline Vec3r operator-(const Vec3r &v); ! inline real dot(const Vec3r & u, const Vec3r & v); ! inline Vec3r cross(const Vec3r & u, const Vec3r& v); ! /// Returns the projection of 'v' onto 'u'. ! inline Vec3r project(const Vec3r& u, const Vec3r& v); ! /// Given that the vector 'u' is already a unit vector, returns the ! /// projection of v onto u. ! inline Vec3r projectPreNorm(const Vec3r& u, const Vec3r& v); ! /// Returns a positive angle between 0 and 180 degrees. ! inline real angleBetween(const Vec3r& u, const Vec3r& v); ! /// Given that the vectors 'u' and 'v' are already normalized, returns ! /// a positive angle between 0 and 180 degrees. ! inline real angleBetweenPreNorm(const Vec3r& u, const Vec3r& v); ! /// Returns true if the two vectors are roughly collinear. ! inline bool areCollinear(const Vec3r& u, const Vec3r& v); ! /// Prints the Vec3r to the given output stream. ! inline std::ostream& operator<<(std::ostream& o, const Vec3r& v); ! class Vec3r ! { ! private: ! real mData[3]; ! public: ! Vec3r() ! { ! mData[0] = 0; ! mData[1] = 0; ! mData[2] = 0; ! } ! Vec3r(const Vec3r & src) ! { ! mData[0] = src.mData[0]; ! mData[1] = src.mData[1]; ! mData[2] = src.mData[2]; ! } ! Vec3r(real x, real y, real z) ! { ! mData[0] = x; ! mData[1] = y; ! mData[2] = z; ! } ! Vec3r(const real * data) ! { ! mData[0] = data[0]; ! mData[1] = data[1]; ! mData[2] = data[2]; ! } ! inline void set(real x, real y, real z) ! { ! mData[0] = x; ! mData[1] = y; ! mData[2] = z; ! } ! ! inline void set(real * data) ! { ! mData[0] = data[0]; ! mData[1] = data[1]; ! mData[2] = data[2]; ! } ! inline real * getData() ! { ! return mData; ! } ! inline const real * getData()const ! { ! return mData; ! } ! inline real & operator[](unsigned int i) ! { ! assert(i < 3); ! return mData[i]; ! } ! inline const real & operator[](unsigned int i)const ! { ! assert(i < 3); ! return mData[i]; ! } ! inline real lengthSquared()const ! { ! return dot(*this, *this); ! } ! inline real length()const ! { ! return sqrt(dot(*this, *this)); ! } ! inline void normalize() ! { ! real len = length(); ! assert(0 != len); ! real factor = (real)1.0 / len; ! (*this) *= factor; ! } ! inline Vec3r unit()const ! { ! return (*this) / length(); ! } ! inline void operator+=(const Vec3r & v) ! { ! mData[0] += v.mData[0]; ! mData[1] += v.mData[1]; ! mData[2] += v.mData[2]; ! } ! inline void operator-=(const Vec3r & v) ! { ! mData[0] -= v.mData[0]; ! mData[1] -= v.mData[1]; ! mData[2] -= v.mData[2]; ! } ! inline void operator*=(const Vec3r & v) ! { ! mData[0] *= v.mData[0]; ! mData[1] *= v.mData[1]; ! mData[2] *= v.mData[2]; ! } ! inline void operator*=(real scalar) ! { ! mData[0] *= scalar; ! mData[1] *= scalar; ! mData[2] *= scalar; ! } ! inline void operator/=(real scalar) ! { ! mData[0] /= scalar; ! mData[1] /= scalar; ! mData[2] /= scalar; ! } ! inline void operator/=(const Vec3r & v) ! { ! mData[0] /= v.mData[0]; ! mData[1] /= v.mData[1]; ! mData[2] /= v.mData[2]; ! } ! inline bool operator==(const Vec3r & v) ! { ! return(mData[0]==v.mData[0] && mData[1]==v.mData[1] && ! v.mData[2]==mData[2]); ! } ! inline bool operator!=(const Vec3r & v) ! { ! return(mData[0]!=v.mData[0] && mData[1]!=v.mData[1] && ! v.mData[2]!=mData[2]); ! } ! }; ! inline Vec3r operator+(const Vec3r &u, const Vec3r &v) ! { ! return Vec3r(u[0] + v[0], u[1] + v[1], u[2] + v[2]); ! } ! inline Vec3r operator-(const Vec3r &u, const Vec3r &v) ! { ! return Vec3r(u[0] - v[0], u[1] - v[1], u[2] - v[2]); ! } ! inline Vec3r operator*(const Vec3r &v, real scalar) ! { ! return Vec3r(scalar * v[0], scalar * v[1], scalar * v[2]); ! } ! inline Vec3r operator*(real scalar, const Vec3r &v) ! { ! return Vec3r(scalar * v[0], scalar * v[1], scalar * v[2]); ! } ! inline Vec3r operator/(const Vec3r &v, real scalar) ! { ! return Vec3r(v[0] / scalar, v[1] / scalar, v[2] / scalar); ! } ! inline Vec3r operator%(const Vec3r & a, const Vec3r & b) ! { ! return Vec3r((a[1]*b[2]) - (a[2]*b[1]), (a[2]*b[0]) - (a[0]*b[2]), ! (a[0]*b[1]) - (a[1]*b[0])); ! } ! inline real dot(const Vec3r & u, const Vec3r & v) ! { ! return u[0] * v[0] + u[1] * v[1] + u[2] * v[2]; ! } ! inline Vec3r cross(const Vec3r & u, const Vec3r & v) ! { ! return u%v; ! } ! inline Vec3r operator-(const Vec3r &v) ! { ! return v * -1; ! } ! inline Vec3r project(const Vec3r& u, const Vec3r& v) ! { ! Vec3r u2 = u; ! u2.normalize(); ! return projectPreNorm(u2, v); ! } ! inline Vec3r projectPreNorm(const Vec3r& u, const Vec3r& v) ! { ! return dot(u, v) * u; ! } ! inline real angleBetween(const Vec3r& u, const Vec3r& v) ! { ! Vec3r u2 = u; ! u2.normalize(); ! Vec3r v2 = v; ! v2.normalize(); ! return angleBetweenPreNorm(u2, v2); ! } ! inline real angleBetweenPreNorm(const Vec3r& u, const Vec3r& v) ! { ! real val = dot(u, v); ! // Clamp to avoid rounding errors; acos will puke with values outside ! // this range. ! if (val < -1) ! { ! val = -1; ! } ! else if (val > 1) ! { ! val = 1; ! } ! return radToDeg(acos(val)); ! } ! inline bool areCollinear(const Vec3r& u, const Vec3r& v) ! { ! real value = 1 - dot(u, v); ! if (areEqual(value, 0)) ! { ! return true; ! } ! else ! { ! return false; ! } ! } ! inline std::ostream& operator<<(std::ostream& o, const Vec3r& v) ! { ! return o << "[" << v[0] << " " << v[1] << " " << v[2] << "]"; ! } } --- 1,216 ---- /************************************************************************* ! * * ! * Open Physics Abstraction Layer * ! * Copyright (C) 2004-2005 * ! * Alan Fischer ala...@gm... * ! * Andres Reinot an...@re... * ! * Tyler Streeter tyl...@gm... * ! * All rights reserved. * ! * Web: opal.sourceforge.net * ! * * ! * This library is free software; you can redistribute it and/or * ! * modify it under the terms of EITHER: * ! * (1) The GNU Lesser General Public License as published by the Free * ! * Software Foundation; either version 2.1 of the License, or (at * ! * your option) any later version. The text of the GNU Lesser * ! * General Public License is included with this library in the * ! * file license-LGPL.txt. * ! * (2) The BSD-style license that is included with this library in * ! * the file license-BSD.txt. * ! * * ! * This library is distributed in the hope that it will be useful, * ! * but WITHOUT ANY WARRANTY; without even the implied warranty of * ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * ! * license-LGPL.txt and license-BSD.txt for more details. * ! * * ! *************************************************************************/ #ifndef OPAL_VEC3R_H #define OPAL_VEC3R_H + // project headers #include "OpalMath.h" + // system headers + #include <iostream> + namespace opal { ! class Vec3r; ! inline Vec3r operator+( const Vec3r &u, const Vec3r &v ); ! inline Vec3r operator-( const Vec3r &u, const Vec3r &v ); ! inline Vec3r operator*( const Vec3r &v, real scalar ); ! inline Vec3r operator*( real scalar, const Vec3r &v ); ! inline Vec3r operator/( const Vec3r &v, real scalar ); ! inline Vec3r operator%( const Vec3r & a, const Vec3r & b ); ! inline Vec3r operator-( const Vec3r &v ); ! inline real dot( const Vec3r & u, const Vec3r & v ); ! inline Vec3r cross( const Vec3r & u, const Vec3r& v ); ! /// Returns the projection of 'v' onto 'u'. ! inline Vec3r project( const Vec3r& u, const Vec3r& v ); ! /// Given that the vector 'u' is already a unit vector, returns the ! /// projection of v onto u. ! inline Vec3r projectPreNorm( const Vec3r& u, const Vec3r& v ); ! /// Returns a positive angle between 0 and 180 degrees. ! inline real angleBetween( const Vec3r& u, const Vec3r& v ); ! /// Given that the vectors 'u' and 'v' are already normalized, returns ! /// a positive angle between 0 and 180 degrees. ! inline real angleBetweenPreNorm( const Vec3r& u, const Vec3r& v ); ! /// Returns true if the two vectors are roughly collinear. ! bool areCollinear( const Vec3r& u, const Vec3r& v ); ! /// Prints the Vec3r to the given output stream. ! inline std::ostream& operator<<( std::ostream& o, const Vec3r& v ); ! class Vec3r ! { ! public: ! /// x-coordinate ! real x; ! /// y-coordinate ! real y; ! /// z-coordinate ! real z; ! /// default - (0,0,0) ! Vec3r(); ! Vec3r( const Vec3r & src ); ! Vec3r( real xx, real yy, real zz ); ! Vec3r( const real * data ); ! void set( real xx, real yy, real zz ); ! void set( real * data ); ! real & operator[] ( unsigned int i ); ! const real & operator[] ( unsigned int i ) const; ! real lengthSquared() const; ! real length() const; ! void normalize(); ! Vec3r unit() const; ! void operator+=( const Vec3r & v ); ! void operator-=( const Vec3r & v ); ! void operator*=( const Vec3r & v ); ! void operator*=( real scalar ); ! void operator/=( real scalar ); ! void operator/=( const Vec3r & v ); ! bool operator==( const Vec3r & v ); ! bool operator!=( const Vec3r & v ); ! void operator=( const Vec3r & v ); ! }; ! inline Vec3r operator+( const Vec3r &u, const Vec3r &v ) ! { ! return Vec3r( u.x + v.x, u.y + v.y, u.z + v.z ); ! } ! inline Vec3r operator-( const Vec3r &u, const Vec3r &v ) ! { ! return Vec3r( u.x - v.x, u.y - v.y, u.z - v.z ); ! } ! inline Vec3r operator*( const Vec3r &v, real scalar ) ! { ! return Vec3r( scalar * v.x, scalar * v.y, scalar * v.z ); ! } ! inline Vec3r operator*( real scalar, const Vec3r &v ) ! { ! return Vec3r( scalar * v.x, scalar * v.y, scalar * v.z ); ! } ! inline Vec3r operator/( const Vec3r &v, real scalar ) ! { ! return Vec3r( v.x / scalar, v.y / scalar, v.z / scalar ); ! } ! inline Vec3r operator%( const Vec3r & a, const Vec3r & b ) ! { ! return Vec3r( ( a.y * b.z ) - ( a.z * b.y ), ( a.z * b.x ) - ( a.x * b.z ), ! ( a.x * b.y ) - ( a.y * b.x ) ); ! } ! inline real dot( const Vec3r & u, const Vec3r & v ) ! { ! return u.x * v.x + u.y * v.y + u.z * v.z; ! } ! inline Vec3r cross( const Vec3r & u, const Vec3r & v ) ! { ! return u % v; ! } ! inline Vec3r operator-( const Vec3r &v ) ! { ! return v * -1; ! } ! inline Vec3r project( const Vec3r& u, const Vec3r& v ) ! { ! Vec3r u2 = u; ! u2.normalize(); ! return projectPreNorm( u2, v ); ! } ! inline Vec3r projectPreNorm( const Vec3r& u, const Vec3r& v ) ! { ! return dot( u, v ) * u; ! } ! inline real angleBetween( const Vec3r& u, const Vec3r& v ) ! { ! Vec3r u2 = u; ! u2.normalize(); ! Vec3r v2 = v; ! v2.normalize(); ! return angleBetweenPreNorm( u2, v2 ); ! } ! inline real angleBetweenPreNorm( const Vec3r& u, const Vec3r& v ) ! { ! real val = dot( u, v ); ! // Clamp to avoid rounding errors; acos will puke with values outside ! // this range. ! if ( val < -1 ) ! { ! val = -1; ! } ! else if ( val > 1 ) ! { ! val = 1; ! } ! return radToDeg( acos( val ) ); ! } ! ! inline std::ostream& operator<<( std::ostream& o, const Vec3r& v ) ! { ! return o << "[" << v.x << " " << v.y << " " << v.z << "]"; ! } } Index: Defines.h =================================================================== RCS file: /cvsroot/opal/opal/src/Defines.h,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** Defines.h 19 Apr 2005 14:20:35 -0000 1.77 --- Defines.h 30 Nov 2005 06:28:12 -0000 1.78 *************** *** 43,46 **** --- 43,48 ---- #include "Portability.h" #include "Logger.h" + #include "Vec3r.h" + #include "Point3r.h" /// The main namespace that contains everything in OPAL. *************** *** 50,95 **** class Joint; ! /// Types of Forces. Used when creating a Force struct to designate /// how the Forces should be applied to a Solid. enum ForceType { ! /// Apply a force in a direction relative to the Solid's local /// coordinate system. LOCAL_FORCE, ! /// Apply a force in a direction relative to the global /// coordinate system. GLOBAL_FORCE, ! /// Apply a torque with the axis specified relative to the Solid's /// local coordinate system. LOCAL_TORQUE, ! /// Apply a torque with the axis specified relative to global /// coordinate system. GLOBAL_TORQUE, ! /// Apply a force at a position relative to the Solid's local ! /// coordinate system in a direction relative to the Solid's local /// coordinate system. LOCAL_FORCE_AT_LOCAL_POS, ! /// Apply a force at a position relative to the global ! /// coordinate system in a direction relative to the Solid's local /// coordinate system. LOCAL_FORCE_AT_GLOBAL_POS, ! /// Apply a force at a position relative to the Solid's local ! /// coordinate system in a direction relative to the global /// coordinate system. GLOBAL_FORCE_AT_LOCAL_POS, ! /// Apply a force at a position relative to the global ! /// coordinate system in a direction relative to the global /// coordinate system. GLOBAL_FORCE_AT_GLOBAL_POS }; ! /// Data structure containing all necessary info for applying a /// force/torque to a Solid. struct Force --- 52,97 ---- class Joint; ! /// Types of Forces. Used when creating a Force struct to designate /// how the Forces should be applied to a Solid. enum ForceType { ! /// Apply a force in a direction relative to the Solid's local /// coordinate system. LOCAL_FORCE, ! /// Apply a force in a direction relative to the global /// coordinate system. GLOBAL_FORCE, ! /// Apply a torque with the axis specified relative to the Solid's /// local coordinate system. LOCAL_TORQUE, ! /// Apply a torque with the axis specified relative to global /// coordinate system. GLOBAL_TORQUE, ! /// Apply a force at a position relative to the Solid's local ! /// coordinate system in a direction relative to the Solid's local /// coordinate system. LOCAL_FORCE_AT_LOCAL_POS, ! /// Apply a force at a position relative to the global ! /// coordinate system in a direction relative to the Solid's local /// coordinate system. LOCAL_FORCE_AT_GLOBAL_POS, ! /// Apply a force at a position relative to the Solid's local ! /// coordinate system in a direction relative to the global /// coordinate system. GLOBAL_FORCE_AT_LOCAL_POS, ! /// Apply a force at a position relative to the global ! /// coordinate system in a direction relative to the global /// coordinate system. GLOBAL_FORCE_AT_GLOBAL_POS }; ! /// Data structure containing all necessary info for applying a /// force/torque to a Solid. struct Force *************** *** 107,130 **** 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; ! /// This is mainly used internally by OPAL. It specifies that ! /// the force will be applied across a single time step. If this /// parameter is true, "duration" will be ignored. bool singleStep; ! /// The force direction or torque axis. This parameter encodes the /// magnitude of the force or torque. Vec3r vec; ! /// Only used when the force is applied at an offset (i.e. not /// the center of mass). Point3r pos; }; ! /// Data structure describing material properties. These properties /// determine the collision response when two Solids collide. struct Material --- 109,132 ---- 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; ! /// This is mainly used internally by OPAL. It specifies that ! /// the force will be applied across a single time step. If this /// parameter is true, "duration" will be ignored. bool singleStep; ! /// The force direction or torque axis. This parameter encodes the /// magnitude of the force or torque. Vec3r vec; ! /// Only used when the force is applied at an offset (i.e. not /// the center of mass). Point3r pos; }; ! /// Data structure describing material properties. These properties /// determine the collision response when two Solids collide. struct Material *************** *** 151,155 **** } ! /// Determines how far Solids can interpenetrate. This must /// be between 0 and 1. real hardness; --- 153,157 ---- } ! /// Determines how far Solids can interpenetrate. This must /// be between 0 and 1. real hardness; *************** *** 158,175 **** real friction; ! /// Bounciness (i.e. restitution) determines how elastic the ! /// collisions will be between this Material and another. In other ! /// words, the more bounciness, the farther the Solids will bounce ! /// when they collide (and, in real life, the less energy is lost /// due to heat and sound). This must be between 0 and 1. real bounciness; ! /// Density combined with the volume of a Solid's shapes determine /// the Solid's mass. This must be >= 0. real density; }; ! /// Solver accuracy levels determine how the physics engine constraint ! /// solver is used (e.g. the number of iterations in an iterative /// solver). enum SolverAccuracyLevel --- 160,177 ---- real friction; ! /// Bounciness (i.e. restitution) determines how elastic the ! /// collisions will be between this Material and another. In other ! /// words, the more bounciness, the farther the Solids will bounce ! /// when they collide (and, in real life, the less energy is lost /// due to heat and sound). This must be between 0 and 1. real bounciness; ! /// Density combined with the volume of a Solid's shapes determine /// the Solid's mass. This must be >= 0. real density; }; ! /// Solver accuracy levels determine how the physics engine constraint ! /// solver is used (e.g. the number of iterations in an iterative /// solver). enum SolverAccuracyLevel *************** *** 182,186 **** }; ! /// Joints use different break modes to determine how they are damaged /// from stress. enum JointBreakMode --- 184,188 ---- }; ! /// Joints use different break modes to determine how they are damaged /// from stress. enum JointBreakMode *************** *** 239,243 **** namespace globals { ! /// The highest value that can be used for the Simulator's /// max contacts parameter. const int maxMaxContacts=(int)128; --- 241,245 ---- namespace globals { ! /// The highest value that can be used for the Simulator's /// max contacts parameter. const int maxMaxContacts=(int)128; *************** *** 266,276 **** // Global materials ! const Material metalMaterial(metalHardness, metalFriction, metalBounciness, metalDensity); ! const Material woodMaterial(woodHardness, woodFriction, woodBounciness, woodDensity); ! const Material rubberMaterial(rubberHardness, rubberFriction, rubberBounciness, rubberDensity); ! const Material iceMaterial(iceHardness, iceFriction, iceBounciness, iceDensity); } --- 268,278 ---- // Global materials ! const Material metalMaterial(metalHardness, metalFriction, metalBounciness, metalDensity); ! const Material woodMaterial(woodHardness, woodFriction, woodBounciness, woodDensity); ! const Material rubberMaterial(rubberHardness, rubberFriction, rubberBounciness, rubberDensity); ! const Material iceMaterial(iceHardness, iceFriction, iceBounciness, iceDensity); } Index: SConscript =================================================================== RCS file: /cvsroot/opal/opal/src/SConscript,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** SConscript 24 Jun 2005 17:50:48 -0000 1.21 --- SConscript 30 Nov 2005 06:28:12 -0000 1.22 *************** *** 81,84 **** --- 81,85 ---- ThrusterMotor.cpp VolumeSensor.cpp + Vec3r.cpp """) --- NEW FILE: Vec3r.cpp --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ // class header #include "Vec3r.h" //#pragma implementation // system headers #include <cassert> namespace opal { Vec3r::Vec3r() { x = 0; y = 0; z = 0; } Vec3r::Vec3r( const Vec3r & src ) { x = src.x; y = src.y; z = src.z; } Vec3r::Vec3r( real xx, real yy, real zz ) { x = xx; y = yy; z = zz; } Vec3r::Vec3r( const real * data ) { x = data[ 0 ]; y = data[ 1 ]; z = data[ 2 ]; } void Vec3r::set( real xx, real yy, real zz ) { x = xx; y = yy; z = zz; } void Vec3r::set( real * data ) { x = data[ 0 ]; y = data[ 1 ]; z = data[ 2 ]; } real & Vec3r::operator[] ( unsigned int i ) { switch ( i ) { case 0: return x; case 1: return y; case 2: return z; default: assert( i < 3 && i > -1 ); } } const real & Vec3r::operator[] ( unsigned int i ) const { switch ( i ) { case 0: return x; case 1: return y; case 2: return z; default: assert( i < 3 && i > -1 ); } } real Vec3r::lengthSquared() const { return dot( *this, *this ); } real Vec3r::length() const { return sqrt( dot( *this, *this ) ); } void Vec3r::normalize() { real len = length(); assert( 0 != len ); real factor = ( real ) 1.0 / len; ( *this ) *= factor; } Vec3r Vec3r::unit() const { return ( *this ) / length(); } void Vec3r::operator+=( const Vec3r & v ) { x += v.x; y += v.y; z += v.z; } void Vec3r::operator-=( const Vec3r & v ) { x -= v.x; y -= v.y; z -= v.z; } void Vec3r::operator*=( const Vec3r & v ) { x *= v.x; y *= v.y; z *= v.z; } void Vec3r::operator*=( real scalar ) { x *= scalar; y *= scalar; z *= scalar; } void Vec3r::operator/=( real scalar ) { x /= scalar; y /= scalar; z /= scalar; } void Vec3r::operator/=( const Vec3r & v ) { x /= v.x; y /= v.y; z /= v.z; } bool Vec3r::operator==( const Vec3r & v ) { return ( x == v.x && y == v.y && z == v.z ); } void Vec3r::operator=( const Vec3r & v ) { x = v.x; y = v.y; z = v.z; } bool Vec3r::operator!=( const Vec3r & v ) { return ( x != v.x || y != v.y || z != v.z ); } bool areCollinear( const Vec3r & u, const Vec3r & v ) { Vec3r a = u, b = v; a.normalize(); b.normalize(); if ( areEqual( a.x, b.x ) && areEqual( a.y, b.y ) && areEqual( a.z, b.z ) ) return true; if ( areEqual( a.x, -b.x ) && areEqual( a.y, -b.y ) && areEqual( a.z, -b.z ) ) return true; return false; } } Index: Makefile.in =================================================================== RCS file: /cvsroot/opal/opal/src/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.in 21 Nov 2005 13:59:16 -0000 1.3 --- Makefile.in 30 Nov 2005 06:28:12 -0000 1.4 *************** *** 16,19 **** --- 16,20 ---- + srcdir = @srcdir@ top_srcdir = @top_srcdir@ *************** *** 40,44 **** bin_PROGRAMS = test_opal$(EXEEXT) subdir = src ! DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in --- 41,46 ---- bin_PROGRAMS = test_opal$(EXEEXT) subdir = src ! DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ! $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in *************** *** 60,64 **** ServoMotor.$(OBJEXT) Simulator.$(OBJEXT) Solid.$(OBJEXT) \ SolidData.$(OBJEXT) Space.$(OBJEXT) SpringMotor.$(OBJEXT) \ ! ThrusterMotor.$(OBJEXT) VolumeSensor.$(OBJEXT) libopalode_a_OBJECTS = $(am_libopalode_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" --- 62,66 ---- ServoMotor.$(OBJEXT) Simulator.$(OBJEXT) Solid.$(OBJEXT) \ SolidData.$(OBJEXT) Space.$(OBJEXT) SpringMotor.$(OBJEXT) \ ! ThrusterMotor.$(OBJEXT) VolumeSensor.$(OBJEXT) Vec3r.$(OBJEXT) libopalode_a_OBJECTS = $(am_libopalode_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" *************** *** 67,71 **** am_test_opal_OBJECTS = testopal.$(OBJEXT) testsolid.$(OBJEXT) \ testAccelerationSensor.$(OBJEXT) testRaycastSensor.$(OBJEXT) \ ! testSimulator.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ --- 69,74 ---- am_test_opal_OBJECTS = testopal.$(OBJEXT) testsolid.$(OBJEXT) \ testAccelerationSensor.$(OBJEXT) testRaycastSensor.$(OBJEXT) \ ! testSimulator.$(OBJEXT) testVec3r.$(OBJEXT) \ ! testPoint3r.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ *************** *** 92,95 **** --- 95,99 ---- pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive + HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags *************** *** 201,217 **** SUBDIRS = external ODE noinst_LIBRARIES = libopalode.a ! libopalode_a_SOURCES = AccelerationSensor.cpp AttractorMotor.cpp Blueprint.cpp\ ! BlueprintInstance.cpp BlueprintManager.cpp CollisionEventHandler.cpp\ ! GearedMotor.cpp InclineSensor.cpp Joint.cpp Logger.cpp Motor.cpp\ ! RaycastSensor.cpp Sensor.cpp ServoMotor.cpp Simulator.cpp Solid.cpp\ ! SolidData.cpp Space.cpp SpringMotor.cpp ThrusterMotor.cpp\ ! VolumeSensor.cpp test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode all: all-recursive --- 205,221 ---- SUBDIRS = external ODE noinst_LIBRARIES = libopalode.a ! libopalode_a_SOURCES = AccelerationSensor.cpp AttractorMotor.cpp Blueprint.cpp \ ! BlueprintInstance.cpp BlueprintManager.cpp CollisionEventHandler.cpp GearedMotor.cpp \ ! InclineSensor.cpp Joint.cpp Logger.cpp Motor.cpp RaycastSensor.cpp Sensor.cpp \ ! ServoMotor.cpp Simulator.cpp Solid.cpp SolidData.cpp Space.cpp SpringMotor.cpp \ ! ThrusterMotor.cpp VolumeSensor.cpp Vec3r.cpp test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp testVec3r.cpp testPoint3r.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode + noinst_HEADERS = Mass.h Matrix33r.h all: all-recursive *************** *** 312,319 **** --- 316,326 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SpringMotor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThrusterMotor.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vec3r.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VolumeSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testAccelerationSensor.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPoint3r.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRaycastSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSimulator.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVec3r.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testopal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsolid.Po@am__quote@ *************** *** 526,530 **** check-am: all-am check: check-recursive ! all-am: Makefile $(LIBRARIES) $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: --- 533,537 ---- check-am: all-am check: check-recursive ! all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: --- NEW FILE: testPoint3r.cpp --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ // system headers #include <quicktest.h> #include <sstream> // project headers #include "opal.h" using namespace opal; namespace testPoint3r { QT_TEST( default_constructor ) { Point3r v; QT_CHECK_EQUAL( v.x, 0 ); QT_CHECK_EQUAL( v.y, 0 ); QT_CHECK_EQUAL( v.z, 0 ); } QT_TEST( copy_constructor ) { Point3r copy( 1, 2, 3 ); Point3r v( copy ); QT_CHECK_EQUAL( v.x, 1 ); QT_CHECK_EQUAL( v.y, 2 ); QT_CHECK_EQUAL( v.z, 3 ); } QT_TEST( set_constructor ) { Point3r v( 1, 2, 3 ); QT_CHECK_EQUAL( v.x, 1 ); QT_CHECK_EQUAL( v.y, 2 ); QT_CHECK_EQUAL( v.z, 3 ); } QT_TEST( assign_constructor ) { Point3r v = Point3r( 1, 2, 3 ); QT_CHECK_EQUAL( v.x, 1 ); QT_CHECK_EQUAL( v.y, 2 ); QT_CHECK_EQUAL( v.z, 3 ); } QT_TEST( array_constructor ) { real d[] = {1, 2, 3}; Point3r v( d ); QT_CHECK_EQUAL( v.x, 1 ); QT_CHECK_EQUAL( v.y, 2 ); QT_CHECK_EQUAL( v.z, 3 ); } QT_TEST( set ) { Point3r v; v.set( 1, 2, 3 ); QT_CHECK_EQUAL( v.x, 1 ); QT_CHECK_EQUAL( v.y, 2 ); QT_CHECK_EQUAL( v.z, 3 ); } QT_TEST( set_array ) { real d[] = {1, 2, 3}; Point3r v; v.set( d ); QT_CHECK_EQUAL( v.x, 1 ); QT_CHECK_EQUAL( v.y, 2 ); QT_CHECK_EQUAL( v.z, 3 ); } QT_TEST( operator_sq_brackets ) { Point3r v( 1, 2, 3 ); QT_CHECK_EQUAL( v[ 0 ], 1 ); QT_CHECK_EQUAL( v[ 1 ], 2 ); QT_CHECK_EQUAL( v[ 2 ], 3 ); } QT_TEST( operator_add ) { Point3r v( 1, 2, 3 ); Vec3r w( 4, 5, 6 ); QT_CHECK_EQUAL( v + w, Point3r( 5, 7, 9 ) ); } QT_TEST( operator_add_to ) { Point3r v( 1, 2, 3 ); Vec3r w( 4, 5, 6 ); v += w; QT_CHECK_EQUAL( v, Point3r( 5, 7, 9 ) ); } QT_TEST( operator_substract_vector ) { Point3r v( 1, 2, 3 ); Vec3r w( 4, 5, 6 ); QT_CHECK_EQUAL( v - w, Point3r( -3, -3, -3 ) ); } QT_TEST( operator_substract_from_vector ) { Point3r v( 1, 2, 3 ); Vec3r w( 4, 5, 6 ); v -= w; QT_CHECK_EQUAL( v, Point3r( -3, -3, -3 ) ); } QT_TEST( operator_substract_point ) { Point3r v( 1, 2, 3 ); Point3r w( 4, 5, 6 ); QT_CHECK_EQUAL( v - w, Vec3r( -3, -3, -3 ) ); } QT_TEST( operator_substract_from_point ) { Point3r v( 1, 2, 3 ); Vec3r w( 4, 5, 6 ); v -= w; QT_CHECK_EQUAL( v, Point3r( -3, -3, -3 ) ); } QT_TEST( operator_mutliply_scalar_after ) { Point3r v( 1, 2, 3 ); QT_CHECK_EQUAL( v * 3, Point3r( 3, 6, 9 ) ); } QT_TEST( operator_mutliply_scalar_before ) { Point3r v( 1, 2, 3 ); QT_CHECK_EQUAL( 3 * v, Point3r( 3, 6, 9 ) ); } QT_TEST( operator_divide_vector ) { Point3r v( 1, 2, 3 ); QT_CHECK_EQUAL( v / 2, Point3r( 1 / 2.0, 2 / 2.0, 3 / 2.0 ) ); } QT_TEST( operator_divide_scalar ) { Point3r v( 1, 2, 3 ); QT_CHECK_EQUAL( v / 2, Point3r( 0.5, 1, 1.5 ) ); } QT_TEST( operator_equal ) { QT_CHECK_EQUAL( Point3r( 1, 2, 3 ) == Point3r( 1, 2, 3 ), true ); QT_CHECK_EQUAL( Point3r( 1, 2, 3 ) == Point3r( 4, 2, 3 ), false ); QT_CHECK_EQUAL( Point3r( 1, 2, 3 ) == Point3r( 1, 4, 3 ), false ); QT_CHECK_EQUAL( Point3r( 1, 2, 3 ) == Point3r( 1, 2, 4 ), false ); } QT_TEST( operator_not_equal ) { QT_CHECK_EQUAL( Point3r( 1, 2, 3 ) != Point3r( 1, 2, 3 ), false ); QT_CHECK_EQUAL( Point3r( 1, 2, 3 ) != Point3r( 4, 2, 3 ), true ); QT_CHECK_EQUAL( Point3r( 1, 2, 3 ) != Point3r( 1, 4, 3 ), true ); QT_CHECK_EQUAL( Point3r( 1, 2, 3 ) != Point3r( 1, 2, 4 ), true ); } QT_TEST( negate ) { QT_CHECK_EQUAL( -Point3r( 1, 2, 3 ), Point3r( -1, -2, -3 ) ); } QT_TEST( operator_stream ) { { std::ostringstream ss; ss << Point3r( 1, 1, 1 ); QT_CHECK_EQUAL( ss.str(), "[1 1 1]" ); } { std::ostringstream ss; ss << Point3r( 1, 1, 1.5 ); QT_CHECK_EQUAL( ss.str(), "[1 1 1.5]" ); } } QT_TEST( distance ) { QT_CHECK_EQUAL( distance( Point3r( 1, 2, 3 ) , Point3r( 1, 2, 3 ) ), 0 ); QT_CHECK_EQUAL( distance( Point3r( 1, 0, 1 ) , Point3r( 1, 0, 3 ) ), 2 ); QT_CHECK_EQUAL( distance( Point3r( 1, 0, 3 ) , Point3r( 1, 0, 1 ) ), 2 ); } } Index: OpalMath.h =================================================================== RCS file: /cvsroot/opal/opal/src/OpalMath.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** OpalMath.h 24 Jun 2005 16:40:49 -0000 1.14 --- OpalMath.h 30 Nov 2005 06:28:12 -0000 1.15 *************** *** 29,32 **** --- 29,33 ---- #define OPAL_OPAL_MATH_H + // system headers #include <math.h> *************** *** 67,75 **** } ! /// Returns true if the two values are equal within some tolerance, ! /// using a combination of absolute and relative (epsilon is scaled ! /// by the magnitudes of the values) tolerance, depending on whether /// both values are both less than 1. ! /// See Christer Ericson's GDC 2005 presentation: /// http://realtimecollisiondetection.net/pubs/GDC05_Ericson_Numerical_Robustness_for_Geometric_Calculations.ppt inline bool areEqual(real x, real y) --- 68,76 ---- } ! /// Returns true if the two values are equal within some tolerance, ! /// using a combination of absolute and relative (epsilon is scaled ! /// by the magnitudes of the values) tolerance, depending on whether /// both values are both less than 1. ! /// See Christer Ericson's GDC 2005 presentation: /// http://realtimecollisiondetection.net/pubs/GDC05_Ericson_Numerical_Robustness_for_Geometric_Calculations.ppt inline bool areEqual(real x, real y) *************** *** 98,106 **** } ! #include "Point3r.h" ! #include "Vec3r.h" ! #include "Rayr.h" ! #include "Matrix44r.h" ! #include "Quaternion.h" #endif --- 99,107 ---- } ! //#include "Point3r.h" ! //#include "Vec3r.h" ! //#include "Rayr.h" ! //#include "Matrix44r.h" ! //#include "Quaternion.h" #endif Index: SpringMotor.h =================================================================== RCS file: /cvsroot/opal/opal/src/SpringMotor.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SpringMotor.h 30 Mar 2005 23:26:23 -0000 1.14 --- SpringMotor.h 30 Nov 2005 06:28:12 -0000 1.15 *************** *** 30,33 **** --- 30,34 ---- #include "Defines.h" + #include "Matrix44r.h" #include "Motor.h" #include "SpringMotorData.h" *************** *** 35,41 **** namespace opal { ! /// This is a spring that either 1) operates in 3 dimensions to keep ! /// a Solid in a desired position, or 2) operates in 3 degrees of ! /// rotational motion to keep a Solid in a desired orientation. It can /// also do both modes at once. class SpringMotor : public Motor --- 36,42 ---- namespace opal { ! /// This is a spring that either 1) operates in 3 dimensions to keep ! /// a Solid in a desired position, or 2) operates in 3 degrees of ! /// rotational motion to keep a Solid in a desired orientation. It can /// also do both modes at once. class SpringMotor : public Motor *************** *** 46,50 **** virtual ~SpringMotor(); ! /// Initializes the Motor with the given data structure. If the /// Solid pointer in the data are NULL, the Motor will do nothing. virtual void OPAL_CALL init(const SpringMotorData& data); --- 47,51 ---- virtual ~SpringMotor(); ! /// Initializes the Motor with the given data structure. If the /// Solid pointer in the data are NULL, the Motor will do nothing. virtual void OPAL_CALL init(const SpringMotorData& data); *************** *** 63,114 **** virtual void OPAL_CALL setEnabled(bool e); ! /// Sets the spring's attach point on the Solid. This is a local /// offset point from the Solid's position. virtual void OPAL_CALL setLocalAttachOffset(const Point3r& offset); ! /// Returns the spring's attach point on the Solid. This is a local /// offset point from the Solid's position. virtual const Point3r& OPAL_CALL getLocalAttachOffset()const; ! /// Sets the spring's attach point on the Solid in global /// coordinates. virtual void OPAL_CALL setGlobalAttachPoint(const Point3r& p); ! /// Returns the spring's attach point on the Solid in global /// coordinates. virtual Point3r OPAL_CALL getGlobalAttachPoint()const; ! /// Sets the desired position and orientation. virtual void OPAL_CALL setDesiredTransform(const Matrix44r& transform); ! /// Sets the desired position. virtual void OPAL_CALL setDesiredPosition(const Point3r& pos); ! /// Sets the desired orientation. ! virtual void OPAL_CALL setDesiredOrientation(const Vec3r& forward, const Vec3r& up, const Vec3r& right); ! /// Sets the damping constant for linear mode. virtual void OPAL_CALL setLinearKd(real kd); ! /// Sets the spring constant for linear mode. virtual void OPAL_CALL setLinearKs(real ks); ! /// Returns the damping constant for linear mode. virtual real OPAL_CALL getLinearKd()const; ! /// Returns the spring constant for linear mode. virtual real OPAL_CALL getLinearKs()const; ! /// Sets the damping constant for angular mode. virtual void OPAL_CALL setAngularKd(real kd); ! /// Sets the spring constant for angular mode. virtual void OPAL_CALL setAngularKs(real ks); ! /// Returns the damping constant for angular mode. virtual real OPAL_CALL getAngularKd()const; ! /// Returns the spring constant for angular mode. virtual real OPAL_CALL getAngularKs()const; --- 64,115 ---- virtual void OPAL_CALL setEnabled(bool e); ! /// Sets the spring's attach point on the Solid. This is a local /// offset point from the Solid's position. virtual void OPAL_CALL setLocalAttachOffset(const Point3r& offset); ! /// Returns the spring's attach point on the Solid. This is a local /// offset point from the Solid's position. virtual const Point3r& OPAL_CALL getLocalAttachOffset()const; ! /// Sets the spring's attach point on the Solid in global /// coordinates. virtual void OPAL_CALL setGlobalAttachPoint(const Point3r& p); ! /// Returns the spring's attach point on the Solid in global /// coordinates. virtual Point3r OPAL_CALL getGlobalAttachPoint()const; ! /// Sets the desired position and orientation. virtual void OPAL_CALL setDesiredTransform(const Matrix44r& transform); ! /// Sets the desired position. virtual void OPAL_CALL setDesiredPosition(const Point3r& pos); ! /// Sets the desired orientation. ! virtual void OPAL_CALL setDesiredOrientation(const Vec3r& forward, const Vec3r& up, const Vec3r& right); ! /// Sets the damping constant for linear mode. virtual void OPAL_CALL setLinearKd(real kd); ! /// Sets the spring constant for linear mode. virtual void OPAL_CALL setLinearKs(real ks); ! /// Returns the damping constant for linear mode. virtual real OPAL_CALL getLinearKd()const; ! /// Returns the spring constant for linear mode. virtual real OPAL_CALL getLinearKs()const; ! /// Sets the damping constant for angular mode. virtual void OPAL_CALL setAngularKd(real kd); ! /// Sets the spring constant for angular mode. virtual void OPAL_CALL setAngularKs(real ks); ! /// Returns the damping constant for angular mode. virtual real OPAL_CALL getAngularKd()const; ! /// Returns the spring constant for angular mode. virtual real OPAL_CALL getAngularKs()const; Index: Point3r.h =================================================================== RCS file: /cvsroot/opal/opal/src/Point3r.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Point3r.h 18 Apr 2005 22:21:03 -0000 1.13 --- Point3r.h 30 Nov 2005 06:28:12 -0000 1.14 *************** *** 1,28 **** /************************************************************************* ! * * ! * Open Physics Abstraction Layer * ! * Copyright (C) 2004-2005 * ! * Alan Fischer ala...@gm... * ! * Andres Reinot an...@re... * ! * Tyler Streeter tyl...@gm... * ! * All rights reserved. * ! * Web: opal.sourceforge.net * ! * * ! * This library is free software; you can redistribute it and/or * ! * modify it under the terms of EITHER: * ! * (1) The GNU Lesser General Public License as published by the Free * ! * Software Foundation; either version 2.1 of the License, or (at * ! * your option) any later version. The text of the GNU Lesser * ! * General Public License is included with this library in the * ! * file license-LGPL.txt. * ! * (2) The BSD-style license that is included with this library in * ! * the file license-BSD.txt. * ! * * ! * This library is distributed in the hope that it will be useful, * ! * but WITHOUT ANY WARRANTY; without even the implied warranty of * ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * ! * license-LGPL.txt and license-BSD.txt for more details. * ! * * ! *************************************************************************/ #ifndef OPAL_POINT3R_H --- 1,28 ---- /************************************************************************* ! * * ! * Open Physics Abstraction Layer * ! * Copyright (C) 2004-2005 * ! * Alan Fischer ala...@gm... * ! * Andres Reinot an...@re... * ! * Tyler Streeter tyl...@gm... * ! * All rights reserved. * ! * Web: opal.sourceforge.net * ! * * ! * This library is free software; you can redistribute it and/or * ! * modify it under the terms of EITHER: * ! * (1) The GNU Lesser General Public License as published by the Free * ! * Software Foundation; either version 2.1 of the License, or (at * ! * your option) any later version. The text of the GNU Lesser * ! * General Public License is included with this library in the * ! * file license-LGPL.txt. * ! * (2) The BSD-style license that is included with this library in * ! * the file license-BSD.txt. * ! * * ! * This library is distributed in the hope that it will be useful, * ! * but WITHOUT ANY WARRANTY; without even the implied warranty of * ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * ! * license-LGPL.txt and license-BSD.txt for more details. * ! * * ! *************************************************************************/ #ifndef OPAL_POINT3R_H *************** *** 34,208 **** namespace opal { ! class Point3r; ! inline Point3r operator+(const Point3r &u, const Vec3r &v); ! inline Point3r operator-(const Point3r &u, const Vec3r &v); ! inline Vec3r operator-(const Point3r &u, const Point3r &v); ! inline Point3r operator*(const Point3r &v, real scalar); ! i... [truncated message content] |
|
From: Olex <ole...@us...> - 2005-11-30 06:28:20
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18063 Modified Files: changelog.txt Log Message: Vec3r and Point3r refactored and fixed with unit tests. Index: changelog.txt =================================================================== RCS file: /cvsroot/opal/opal/changelog.txt,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** changelog.txt 26 Nov 2005 22:40:18 -0000 1.50 --- changelog.txt 30 Nov 2005 06:28:12 -0000 1.51 *************** *** 11,18 **** ! Version 0.3.2 (not yet released) ------------------------------------------ * 11-26-05: Simulator::getRootSpace() Added option for the custom simulator. Additional unit tests. (Oleksandr Lozitskiy) --- 11,20 ---- ! Version 0.3.2 (possibly 0.4.0 ?) (not yet released) ------------------------------------------ + * 11-30-05: Vec3r and Point3r refactored and fixed with unit tests. (Oleksandr Lozitskiy) + * 11-26-05: Simulator::getRootSpace() Added option for the custom simulator. Additional unit tests. (Oleksandr Lozitskiy) |
|
From: Olex <ole...@us...> - 2005-11-26 22:40:27
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7819/src Modified Files: Simulator.cpp Simulator.h opal.h testRaycastSensor.cpp Log Message: Simulator::getRootSpace() Added option for the custom simulator. Additional unit tests. Index: opal.h =================================================================== RCS file: /cvsroot/opal/opal/src/opal.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** opal.h 19 Apr 2005 14:20:36 -0000 1.28 --- opal.h 26 Nov 2005 22:40:18 -0000 1.29 *************** *** 76,85 **** OPAL_EXPORT_FUNCTION Simulator* OPAL_CALL createSimulator(); /// Loads a Blueprint from an OPAL XML file. ! OPAL_EXPORT_FUNCTION void OPAL_CALL loadFile(Blueprint& bp, const std::string& filename); /// Saves a Blueprint in an OPAL XML file. ! //OPAL_EXPORT_FUNCTION void OPAL_CALL saveFile(const Blueprint& bp, // const std::string& filename); } --- 76,88 ---- OPAL_EXPORT_FUNCTION Simulator* OPAL_CALL createSimulator(); + /// Creates a custom Simulator. + OPAL_EXPORT_FUNCTION Simulator* OPAL_CALL createCustomSimulator( SimulatorData & data ); + /// Loads a Blueprint from an OPAL XML file. ! OPAL_EXPORT_FUNCTION void OPAL_CALL loadFile(Blueprint& bp, const std::string& filename); /// Saves a Blueprint in an OPAL XML file. ! //OPAL_EXPORT_FUNCTION void OPAL_CALL saveFile(const Blueprint& bp, // const std::string& filename); } Index: testRaycastSensor.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/testRaycastSensor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testRaycastSensor.cpp 15 Nov 2005 03:32:43 -0000 1.1 --- testRaycastSensor.cpp 26 Nov 2005 22:40:18 -0000 1.2 *************** *** 58,62 **** { PlaneShapeData data; ! real plane_params[ 4 ] = {1, 0, 1, 0}; for ( int i = 0; i < 4; ++i ) data.abcd[ i ] = plane_params[ i ]; --- 58,62 ---- { PlaneShapeData data; ! real plane_params[ 4 ] = {0, 1, 0, 0}; for ( int i = 0; i < 4; ++i ) data.abcd[ i ] = plane_params[ i ]; *************** *** 91,95 **** f.caster->setPosition( 0, 10, 0 ); ! RaycastResult r = f.sensor->fireRay(); Point3r hitPoint = r.intersection; --- 91,95 ---- f.caster->setPosition( 0, 10, 0 ); ! RaycastResult r = f.sensor->fireRay( 500 ); Point3r hitPoint = r.intersection; *************** *** 116,120 **** intheway->setStatic( false ); ! RaycastResult r = f.sensor->fireRay(); Point3r hitPoint = r.intersection; Solid * hit = r.solid; --- 116,120 ---- intheway->setStatic( false ); ! RaycastResult r = f.sensor->fireRay( 500 ); Point3r hitPoint = r.intersection; Solid * hit = r.solid; *************** *** 122,126 **** real diff = r.distance; ! QT_CHECK_EQUAL( diff, 5 ); f.sim->destroySolid( intheway ); --- 122,126 ---- real diff = r.distance; ! QT_CHECK_EQUAL( diff, 4 ); f.sim->destroySolid( intheway ); Index: Simulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.cpp,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** Simulator.cpp 19 Jul 2005 17:53:30 -0000 1.66 --- Simulator.cpp 26 Nov 2005 22:40:18 -0000 1.67 *************** *** 57,61 **** mIsSolidDestructionSafe = true; mIsJointDestructionSafe = true; ! mStaticSleepingContactsEnabled = defaults::staticSleepingContactsEnabled; --- 57,61 ---- mIsSolidDestructionSafe = true; mIsJointDestructionSafe = true; ! mStaticSleepingContactsEnabled = defaults::staticSleepingContactsEnabled; *************** *** 65,70 **** --- 65,77 ---- mContactGroupFlags[i] = defaults::contactGroupFlags; } + + mRootSpace = NULL; } + void Simulator::initData( SimulatorData data ) + { + mData = data; + } + Simulator::~Simulator() { *************** *** 79,82 **** --- 86,90 ---- mSpaceList.pop_back(); } + mRootSpace->internal_destroy(); mSolidGarbageList.clear(); *************** *** 104,108 **** // Update Sensors. std::vector<Sensor*>::iterator sensorIter; ! for (sensorIter = mSensorList.begin(); sensorIter != mSensorList.end(); ++sensorIter) { --- 112,116 ---- // Update Sensors. std::vector<Sensor*>::iterator sensorIter; ! for (sensorIter = mSensorList.begin(); sensorIter != mSensorList.end(); ++sensorIter) { *************** *** 112,116 **** // Update Motors. std::vector<Motor*>::iterator motorIter; ! for (motorIter = mMotorList.begin(); motorIter != mMotorList.end(); ++motorIter) { --- 120,124 ---- // Update Motors. std::vector<Motor*>::iterator motorIter; ! for (motorIter = mMotorList.begin(); motorIter != mMotorList.end(); ++motorIter) { *************** *** 120,124 **** // Apply forces/torques to Solids. std::vector<Solid*>::iterator solidIter; ! for (solidIter = mSolidList.begin(); solidIter != mSolidList.end(); ++solidIter) { --- 128,132 ---- // Apply forces/torques to Solids. std::vector<Solid*>::iterator solidIter; ! for (solidIter = mSolidList.begin(); solidIter != mSolidList.end(); ++solidIter) { *************** *** 129,137 **** mIsJointDestructionSafe = false; std::vector<Joint*>::iterator jointIter; ! for (jointIter = mJointList.begin(); jointIter != mJointList.end(); ++jointIter) { ! // If a Joint gets broken here, it will automatically ! // send a Joint break event to the Joint's // JointBreakEventHandler (assuming one exists). (*jointIter)->internal_update(); --- 137,145 ---- mIsJointDestructionSafe = false; std::vector<Joint*>::iterator jointIter; ! for (jointIter = mJointList.begin(); jointIter != mJointList.end(); ++jointIter) { ! // If a Joint gets broken here, it will automatically ! // send a Joint break event to the Joint's // JointBreakEventHandler (assuming one exists). (*jointIter)->internal_update(); *************** *** 139,143 **** mIsJointDestructionSafe = true; ! // Now do physics engine-specific stuff; collision events will // be sent from here. stepPhysics(); --- 147,151 ---- mIsJointDestructionSafe = true; ! // Now do physics engine-specific stuff; collision events will // be sent from here. stepPhysics(); *************** *** 145,154 **** // Loop over Solids again to handle a few more things... mIsSolidDestructionSafe = false; ! for (solidIter = mSolidList.begin(); solidIter != mSolidList.end(); ++solidIter) { Solid* solid = *solidIter; ! // Get each dynamic, awake Solid's new transform from the // physics engine. if (!solid->isStatic() && !solid->isSleeping()) --- 153,162 ---- // Loop over Solids again to handle a few more things... mIsSolidDestructionSafe = false; ! for (solidIter = mSolidList.begin(); solidIter != mSolidList.end(); ++solidIter) { Solid* solid = *solidIter; ! // Get each dynamic, awake Solid's new transform from the // physics engine. if (!solid->isStatic() && !solid->isSleeping()) *************** *** 157,164 **** } ! // Update the sleeping value from the physics engine. This // needs to be updated to keep the Solid's SolidData valid. //solid->internal_updateSleeping(); ! // Update... Now this gets updated in the Solid::getData // function. --- 165,172 ---- } ! // Update the sleeping value from the physics engine. This // needs to be updated to keep the Solid's SolidData valid. //solid->internal_updateSleeping(); ! // Update... Now this gets updated in the Solid::getData // function. *************** *** 211,215 **** void Simulator::instantiateBlueprint( ! BlueprintInstance& instance, const Blueprint& bp, const Matrix44r& offset, real scale) { --- 219,223 ---- void Simulator::instantiateBlueprint( ! BlueprintInstance& instance, const Blueprint& bp, const Matrix44r& offset, real scale) { *************** *** 218,222 **** if (!bp.isFinalized()) { ! OPAL_LOGGER("warning") << "opal::Simulator::instantiateBlueprint: Cannot \ instantiate a Blueprint before it is finalized. Ignoring \ --- 226,230 ---- if (!bp.isFinalized()) { ! OPAL_LOGGER("warning") << "opal::Simulator::instantiateBlueprint: Cannot \ instantiate a Blueprint before it is finalized. Ignoring \ *************** *** 239,255 **** } ! // For each object created here, only the ones with names get added // to the BlueprintInstance. ! // Some of the objects depend on the presence of others, so ! // they must be created in a specific order: Solids depend on ! // nothing, Joints depend on Solids, Motors depend on Joints // and Solids, and Sensors depend on Joints and Solids. ! // For the objects with references to their dependencies (i.e. ! // 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. std::vector<Solid*> solidList; --- 247,263 ---- } ! // For each object created here, only the ones with names get added // to the BlueprintInstance. ! // Some of the objects depend on the presence of others, so ! // they must be created in a specific order: Solids depend on ! // nothing, Joints depend on Solids, Motors depend on Joints // and Solids, and Sensors depend on Joints and Solids. ! // For the objects with references to their dependencies (i.e. ! // 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. std::vector<Solid*> solidList; *************** *** 262,266 **** Solid* s = createSolid(); ! // Make a local copy of the Solid's data, including all of its // Shapes. SolidData sd = *bp.getSolidData(i); --- 270,274 ---- Solid* s = createSolid(); ! // Make a local copy of the Solid's data, including all of its // Shapes. SolidData sd = *bp.getSolidData(i); *************** *** 286,292 **** case BOX_SHAPE: { ! BoxShapeData* boxData = (BoxShapeData*)shapeData; ! boxData->dimensions = scale * boxData->dimensions; break; --- 294,300 ---- case BOX_SHAPE: { ! BoxShapeData* boxData = (BoxShapeData*)shapeData; ! boxData->dimensions = scale * boxData->dimensions; break; *************** *** 294,300 **** case SPHERE_SHAPE: { ! SphereShapeData* sphereData = (SphereShapeData*)shapeData; ! sphereData->radius = scale * sphereData->radius; break; --- 302,308 ---- case SPHERE_SHAPE: { ! SphereShapeData* sphereData = (SphereShapeData*)shapeData; ! sphereData->radius = scale * sphereData->radius; break; *************** *** 302,310 **** case CAPSULE_SHAPE: { ! CapsuleShapeData* capsuleData = (CapsuleShapeData*)shapeData; ! capsuleData->radius = scale * capsuleData->radius; ! capsuleData->length = scale * capsuleData->length; break; --- 310,318 ---- case CAPSULE_SHAPE: { ! CapsuleShapeData* capsuleData = (CapsuleShapeData*)shapeData; ! capsuleData->radius = scale * capsuleData->radius; ! capsuleData->length = scale * capsuleData->length; break; *************** *** 312,318 **** case PLANE_SHAPE: { ! PlaneShapeData* planeData = (PlaneShapeData*)shapeData; ! planeData->abcd[3] = scale * planeData->abcd[3]; break; --- 320,326 ---- case PLANE_SHAPE: { ! PlaneShapeData* planeData = (PlaneShapeData*)shapeData; ! planeData->abcd[3] = scale * planeData->abcd[3]; break; *************** *** 320,324 **** //case RAY_SHAPE: //{ ! // RayShapeData* rayData = // (RayShapeData*)shapeData; // Point3r origin = rayData->ray.getOrigin(); --- 328,332 ---- //case RAY_SHAPE: //{ ! // RayShapeData* rayData = // (RayShapeData*)shapeData; // Point3r origin = rayData->ray.getOrigin(); *************** *** 329,333 **** case MESH_SHAPE: { ! // Not implemented. Scaling the Mesh data // should be handled elsewhere. break; --- 337,341 ---- case MESH_SHAPE: { ! // Not implemented. Scaling the Mesh data // should be handled elsewhere. break; *************** *** 470,474 **** SensorData* sensorData = bp.getSensorData(i); ! // These are necessary because we don't want to change teh // Blueprint's Sensor data directly; we need a local copy. Solid* solidPtr = NULL; --- 478,482 ---- SensorData* sensorData = bp.getSensorData(i); ! // These are necessary because we don't want to change teh // Blueprint's Sensor data directly; we need a local copy. Solid* solidPtr = NULL; *************** *** 507,511 **** { // Make a local copy of the Sensor's data. ! AccelerationSensorData data = *(AccelerationSensorData*)sensorData; data.solid = solidPtr; --- 515,519 ---- { // Make a local copy of the Sensor's data. ! AccelerationSensorData data = *(AccelerationSensorData*)sensorData; data.solid = solidPtr; *************** *** 615,625 **** } ! void Simulator::setupContactGroups(unsigned int group0, unsigned int group1, bool makeContacts) { if (group0 > 31) { ! OPAL_LOGGER("warning") << "opal::Simulator::setupContactGroups: " ! << "Invalid contact group " << group0 << ". Request will be ignored." << std::endl; return; --- 623,633 ---- } ! void Simulator::setupContactGroups(unsigned int group0, unsigned int group1, bool makeContacts) { if (group0 > 31) { ! OPAL_LOGGER("warning") << "opal::Simulator::setupContactGroups: " ! << "Invalid contact group " << group0 << ". Request will be ignored." << std::endl; return; *************** *** 628,638 **** if (group1 > 31) { ! OPAL_LOGGER("warning") << "opal::Simulator::setupContactGroups: " ! << "Invalid contact group " << group1 << ". Request will be ignored." << std::endl; return; } ! // The interaction always goes both ways, so we need to set the bit // flags both ways. --- 636,646 ---- if (group1 > 31) { ! OPAL_LOGGER("warning") << "opal::Simulator::setupContactGroups: " ! << "Invalid contact group " << group1 << ". Request will be ignored." << std::endl; return; } ! // The interaction always goes both ways, so we need to set the bit // flags both ways. *************** *** 662,666 **** } ! void Simulator::setupContactGroup(unsigned int group, bool makeContacts) { --- 670,674 ---- } ! void Simulator::setupContactGroup(unsigned int group, bool makeContacts) { *************** *** 672,681 **** } ! bool Simulator::groupsMakeContacts(unsigned int group0, unsigned int group1) { ! // We only need to check for "one side" of the contact groups ! // here because the groups are always setup both ways (i.e. ! // the interaction between object 0's contact group and // object 1's contact group is always symmetric). --- 680,689 ---- } ! bool Simulator::groupsMakeContacts(unsigned int group0, unsigned int group1) { ! // We only need to check for "one side" of the contact groups ! // here because the groups are always setup both ways (i.e. ! // the interaction between object 0's contact group and // object 1's contact group is always symmetric). *************** *** 707,711 **** } ! Solid* Simulator::createPlane(real a, real b, real c, real d, const Material& m) { --- 715,719 ---- } ! Solid* Simulator::createPlane(real a, real b, real c, real d, const Material& m) { *************** *** 912,917 **** void Simulator::removeSolid(Solid* s) { ! // TODO: make this more efficient by not iterating through all Motors, ! // Sensors, and Joints; maybe have the Solid maintain pointers to // things that depend on it. --- 920,925 ---- void Simulator::removeSolid(Solid* s) { ! // TODO: make this more efficient by not iterating through all Motors, ! // Sensors, and Joints; maybe have the Solid maintain pointers to // things that depend on it. *************** *** 967,972 **** void Simulator::removeJoint(Joint* j) { ! // TODO: make this more efficient by not iterating through all Motors; ! // maybe have the Solid maintain pointers to things that // depend on it. --- 975,980 ---- void Simulator::removeJoint(Joint* j) { ! // TODO: make this more efficient by not iterating through all Motors; ! // maybe have the Solid maintain pointers to things that // depend on it. *************** *** 1044,1047 **** --- 1052,1060 ---- } + Space* Simulator::getRootSpace() + { + return mRootSpace; + } + void Simulator::destroyGarbage() { Index: Simulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/Simulator.h,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** Simulator.h 24 Jun 2005 18:46:29 -0000 1.101 --- Simulator.h 26 Nov 2005 22:40:18 -0000 1.102 *************** *** 36,39 **** --- 36,40 ---- #include "Blueprint.h" #include "Sensor.h" + #include "Vec3r.h" namespace opal *************** *** 53,59 **** struct VolumeQueryResult; ! /// A Simulator is an environment that contains simulated objects. ! /// It performs collision detection and physical simulation. It is ! /// a factory that creates, maintains, and destroys Solids, Joints, /// Motors, and Sensors. class Simulator --- 54,116 ---- struct VolumeQueryResult; ! /// Various configuration data for Simulator ! class SimulatorData ! { ! public: ! /// constructor with default values ! SimulatorData() ! { ! useOctreeInsteadHash = false; ! ! // octree defaults ! worldSize = Vec3r( 1000, 1000, 1000 ); ! octreeDepth = 7; ! worldCenter = Vec3r( 0, 0, 0 ); ! ! // hash defaults ! hashMinLevel = -5; ! hashMaxLevel = 9; ! } ! ! /// copy-constructor ! /* ! SimulatorData( SimulatorData & copy ) ! { ! useOctreeInsteadHash = copy.useOctreeInsteadHash; ! ! // octree defaults ! worldSize = copy.worldSize; ! octreeDepth = copy.octreeDepth; ! worldCenter = copy.worldCenter; ! ! // hash defaults ! hashMinLevel = copy.hashMinLevel; ! hashMaxLevel = copy.hashMaxLevel; ! }*/ ! ! /// if true, octree space will be used ! /// if false, hash space will be used instead ! /// default is false = hash space ! bool useOctreeInsteadHash; ! ! /// used for octree space, default - (1000,1000,1000) ! Vec3r worldSize; ! ! /// used for octree space, default - (0,0,0) ! Vec3r worldCenter; ! ! /// used for octree space, default - 7 ! int octreeDepth; ! ! /// for hash space: 2^(this value) ! int hashMinLevel; ! ! /// for hash space: 2^(this value) ! int hashMaxLevel; ! }; ! ! /// A Simulator is an environment that contains simulated objects. ! /// It performs collision detection and physical simulation. It is ! /// a factory that creates, maintains, and destroys Solids, Joints, /// Motors, and Sensors. class Simulator *************** *** 62,80 **** Simulator(); ! /// Deallocates everything within the Simulator. This should be ! /// called when finished with everything. Simulator implementations /// should call "delete this" within this function. virtual void OPAL_CALL destroy() = 0; ! /// This function performs collision detection and simulates ! /// everything ahead by the given dt. Internally, it steps through ! /// the simulation iteratively using a fixed step size (so you can ! /// pass in whatever dt you want; it will be broken up into fixed ! /// increments automatically). Any "leftover" time will be saved ! /// until the next time this is called. The function returns true ! /// if at least one time step has been taken. During collision ! /// detection, the following cases are ignored when deciding whether ! /// to collide two Solids (ignored both for physical contact ! /// generation and collision event handling): /// 1. Two static Solids, each without a CollisionEventHandler. /// 2. Two Shapes that are part of the same Solid. --- 119,139 ---- Simulator(); ! virtual void initData( SimulatorData data ); ! ! /// Deallocates everything within the Simulator. This should be ! /// called when finished with everything. Simulator implementations /// should call "delete this" within this function. virtual void OPAL_CALL destroy() = 0; ! /// This function performs collision detection and simulates ! /// everything ahead by the given dt. Internally, it steps through ! /// the simulation iteratively using a fixed step size (so you can ! /// pass in whatever dt you want; it will be broken up into fixed ! /// increments automatically). Any "leftover" time will be saved ! /// until the next time this is called. The function returns true ! /// if at least one time step has been taken. During collision ! /// detection, the following cases are ignored when deciding whether ! /// to collide two Solids (ignored both for physical contact ! /// generation and collision event handling): /// 1. Two static Solids, each without a CollisionEventHandler. /// 2. Two Shapes that are part of the same Solid. *************** *** 82,99 **** /// 4. Two Solids connected by a fixed Joint. /// 5. Two Solids connected by a Joint with contacts disabled. ! /// 6. Solid0 is static, Solid1 dynamic and is sleeping, ! /// static-to-sleeping contacts are ignored by the ! /// Simulator, and neither Solid has a /// CollisionEventHandler. ! /// 7. Solid1 is static, Solid0 dynamic and is sleeping, ! /// static-to-sleeping contacts are ignored by the ! /// Simulator, and neither Solid has a /// CollisionEventHandler. ! /// 8. The two Solids' contact groups do not generate ! /// contacts when they collide, and neither Solid has a /// CollisionEventHandler. virtual bool OPAL_CALL simulate(real dt); ! /// Sets the constant step size used in the simulation. The step /// size must be greater than zero. virtual void OPAL_CALL setStepSize(real stepSize); --- 141,158 ---- /// 4. Two Solids connected by a fixed Joint. /// 5. Two Solids connected by a Joint with contacts disabled. ! /// 6. Solid0 is static, Solid1 dynamic and is sleeping, ! /// static-to-sleeping contacts are ignored by the ! /// Simulator, and neither Solid has a /// CollisionEventHandler. ! /// 7. Solid1 is static, Solid0 dynamic and is sleeping, ! /// static-to-sleeping contacts are ignored by the ! /// Simulator, and neither Solid has a /// CollisionEventHandler. ! /// 8. The two Solids' contact groups do not generate ! /// contacts when they collide, and neither Solid has a /// CollisionEventHandler. virtual bool OPAL_CALL simulate(real dt); ! /// Sets the constant step size used in the simulation. The step /// size must be greater than zero. virtual void OPAL_CALL setStepSize(real stepSize); *************** *** 102,209 **** virtual real OPAL_CALL getStepSize(); ! /// Sets the Simulator's post-step event handler. virtual void OPAL_CALL setPostStepEventHandler( PostStepEventHandler* eventHandler); ! /// Returns the Simulator's post-step event handler. If this /// returns NULL, the Simulator is not using one. ! virtual PostStepEventHandler* OPAL_CALL getPostStepEventHandler()const; ! /// 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); ! /// Sets the gravity used in the simulation. virtual void OPAL_CALL setGravity(const Vec3r& gravity) = 0; ! /// Returns the gravity used in the simulation. virtual Vec3r OPAL_CALL getGravity()const = 0; ! /// Sets the accuracy level used by the physics engine's constraint /// solver. virtual void OPAL_CALL setSolverAccuracy(SolverAccuracyLevel level); ! /// Returns the accuracy level. virtual SolverAccuracyLevel OPAL_CALL getSolverAccuracy()const; ! /// Sets the maximum correcting velocity for interpenetrating /// objects. The given velocity must be positive. virtual void OPAL_CALL setMaxCorrectingVel(real vel); ! /// Returns the maximum correcting velocity for interpenetrating /// objects. virtual real OPAL_CALL getMaxCorrectingVel()const; ! /// Sets the maximum number of physical contacts generated when ! /// two Solids collide. This number cannot be larger than the /// global "max max contacts" parameter. virtual void OPAL_CALL setMaxContacts(unsigned int mc); ! /// Returns the maximum number of physical contacts generated /// when two Solids collide. virtual unsigned int OPAL_CALL getMaxContacts()const; ! /// Sets the maximum linear velocity for any Solid. This limits ! /// Solid motion to prevent explosions from numerical innacuracy. //virtual void OPAL_CALL setMaxLinearVel(real max); ! /// Returns the maximum linear velocity for any Solid. This limits ! /// Solid motion to prevent explosions from numerical innacuracy. //virtual real OPAL_CALL getMaxLinearVel()const; ! /// Sets the maximum angular velocity for any Solid. This limits ! /// Solid motion to prevent explosions from numerical innacuracy. //virtual void OPAL_CALL setMaxAngularVel(real max); ! /// Returns the maximum angular velocity for any Solid. This limits ! /// Solid motion to prevent explosions from numerical innacuracy. //virtual real OPAL_CALL getMaxAngularVel()const; ! /// Set the user data pointer to some external data. The user data /// is totally user-managed /// (i.e. it is not destroyed when the Simulator is destroyed). virtual void OPAL_CALL setUserData(void* data); ! /// Returns the user data pointer (NULL if it has not been set). virtual void* OPAL_CALL getUserData(); ! /// Defines the interaction between two contact groups. If the ! /// last argument is true, the two groups will generate physical ! /// points when they collide. Otherwise, they will pass through ! /// each other. Keep in mind that certain cases are already ! /// ignored when performing collision detection; see comments ! /// on Simulator::simulate for more details. ! /// Note that contact groups do not affect collision events; two ! /// colliding objects might not generate contacts and still /// generate collision events sent to their CollisionEventHandlers. ! virtual void OPAL_CALL setupContactGroups(unsigned int group0, unsigned int group1, bool makeContacts); ! /// Similar to setupContactGroups. Determines how a single contact ! /// group interacts with all other groups. This is useful when ! /// you want to e.g. disable collisions between a group and ! /// everything else for a "trigger volume." (See setupContactGroups /// for more details). ! virtual void OPAL_CALL setupContactGroup(unsigned int group, ! bool makeContacts); ! /// Returns true if the two contact groups are setup to generate /// contacts when they collide. ! virtual bool OPAL_CALL groupsMakeContacts(unsigned int group0, unsigned int group1); ! /// Sets whether contacts should be generated between static Solids ! /// and sleeping Solids. Usually this isn't necessary, but ! /// sometimes you might want a static Solid to wake up a sleeping /// dynamic Solid by touching it. virtual void OPAL_CALL setStaticSleepingContactsEnabled(bool enable); ! /// Returns true if contacts are generated between static Solids /// and sleeping Solids. virtual bool OPAL_CALL areStaticSleepingContactsEnabled(); --- 161,268 ---- virtual real OPAL_CALL getStepSize(); ! /// Sets the Simulator's post-step event handler. virtual void OPAL_CALL setPostStepEventHandler( PostStepEventHandler* eventHandler); ! /// Returns the Simulator's post-step event handler. If this /// returns NULL, the Simulator is not using one. ! virtual PostStepEventHandler* OPAL_CALL getPostStepEventHandler()const; ! /// 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); ! /// Sets the gravity used in the simulation. virtual void OPAL_CALL setGravity(const Vec3r& gravity) = 0; ! /// Returns the gravity used in the simulation. virtual Vec3r OPAL_CALL getGravity()const = 0; ! /// Sets the accuracy level used by the physics engine's constraint /// solver. virtual void OPAL_CALL setSolverAccuracy(SolverAccuracyLevel level); ! /// Returns the accuracy level. virtual SolverAccuracyLevel OPAL_CALL getSolverAccuracy()const; ! /// Sets the maximum correcting velocity for interpenetrating /// objects. The given velocity must be positive. virtual void OPAL_CALL setMaxCorrectingVel(real vel); ! /// Returns the maximum correcting velocity for interpenetrating /// objects. virtual real OPAL_CALL getMaxCorrectingVel()const; ! /// Sets the maximum number of physical contacts generated when ! /// two Solids collide. This number cannot be larger than the /// global "max max contacts" parameter. virtual void OPAL_CALL setMaxContacts(unsigned int mc); ! /// Returns the maximum number of physical contacts generated /// when two Solids collide. virtual unsigned int OPAL_CALL getMaxContacts()const; ! /// Sets the maximum linear velocity for any Solid. This limits ! /// Solid motion to prevent explosions from numerical innacuracy. //virtual void OPAL_CALL setMaxLinearVel(real max); ! /// Returns the maximum linear velocity for any Solid. This limits ! /// Solid motion to prevent explosions from numerical innacuracy. //virtual real OPAL_CALL getMaxLinearVel()const; ! /// Sets the maximum angular velocity for any Solid. This limits ! /// Solid motion to prevent explosions from numerical innacuracy. //virtual void OPAL_CALL setMaxAngularVel(real max); ! /// Returns the maximum angular velocity for any Solid. This limits ! /// Solid motion to prevent explosions from numerical innacuracy. //virtual real OPAL_CALL getMaxAngularVel()const; ! /// Set the user data pointer to some external data. The user data /// is totally user-managed /// (i.e. it is not destroyed when the Simulator is destroyed). virtual void OPAL_CALL setUserData(void* data); ! /// Returns the user data pointer (NULL if it has not been set). virtual void* OPAL_CALL getUserData(); ! /// Defines the interaction between two contact groups. If the ! /// last argument is true, the two groups will generate physical ! /// points when they collide. Otherwise, they will pass through ! /// each other. Keep in mind that certain cases are already ! /// ignored when performing collision detection; see comments ! /// on Simulator::simulate for more details. ! /// Note that contact groups do not affect collision events; two ! /// colliding objects might not generate contacts and still /// generate collision events sent to their CollisionEventHandlers. ! virtual void OPAL_CALL setupContactGroups(unsigned int group0, unsigned int group1, bool makeContacts); ! /// Similar to setupContactGroups. Determines how a single contact ! /// group interacts with all other groups. This is useful when ! /// you want to e.g. disable collisions between a group and ! /// everything else for a "trigger volume." (See setupContactGroups /// for more details). ! virtual void OPAL_CALL setupContactGroup(unsigned int group, ! bool makeContacts); ! /// Returns true if the two contact groups are setup to generate /// contacts when they collide. ! virtual bool OPAL_CALL groupsMakeContacts(unsigned int group0, unsigned int group1); ! /// Sets whether contacts should be generated between static Solids ! /// and sleeping Solids. Usually this isn't necessary, but ! /// sometimes you might want a static Solid to wake up a sleeping /// dynamic Solid by touching it. virtual void OPAL_CALL setStaticSleepingContactsEnabled(bool enable); ! /// Returns true if contacts are generated between static Solids /// and sleeping Solids. virtual bool OPAL_CALL areStaticSleepingContactsEnabled(); *************** *** 211,219 **** // SOLIDS ! /// Creates and returns a pointer to a Solid. virtual Solid* OPAL_CALL createSolid() = 0; /// Helper function for creating a static Solid with a Plane Shape. ! virtual Solid* OPAL_CALL createPlane(real a, real b, real c, real d, const Material& m = defaults::shape::material); --- 270,278 ---- // SOLIDS ! /// Creates and returns a pointer to a Solid. virtual Solid* OPAL_CALL createSolid() = 0; /// Helper function for creating a static Solid with a Plane Shape. ! virtual Solid* OPAL_CALL createPlane(real a, real b, real c, real d, const Material& m = defaults::shape::material); *************** *** 224,305 **** virtual Solid* OPAL_CALL getSolid(unsigned int i)const; ! /// Immediately destroys the given Solid. All Joints, Motors, and ! /// Sensors that depend on this Solid will be automatically /// disabled. virtual void OPAL_CALL destroySolid(Solid* s); ! /// Immediately destroys all Solids in the Simulator. virtual void OPAL_CALL destroyAllSolids(); // JOINTS ! /// Creates and returns a pointer to a Joint. virtual Joint* OPAL_CALL createJoint() = 0; ! /// Immediately destroys the given Joint. All Motors that depend /// on this Solid will be automatically disabled. virtual void OPAL_CALL destroyJoint(Joint* j); ! /// Immediately destroys all Joints in the Simulator. virtual void OPAL_CALL destroyAllJoints(); // MOTORS ! /// Creates and returns a pointer to a ThrusterMotor. virtual ThrusterMotor* OPAL_CALL createThrusterMotor(); ! /// Creates and returns a pointer to a GearedMotor. virtual GearedMotor* OPAL_CALL createGearedMotor(); ! /// Creates and returns a pointer to a ServoMotor. virtual ServoMotor* OPAL_CALL createServoMotor(); ! /// Creates and returns a pointer to an AttractorMotor. virtual AttractorMotor* OPAL_CALL createAttractorMotor(); ! /// Creates and returns a pointer to a SpringMotor. virtual SpringMotor* OPAL_CALL createSpringMotor(); ! /// Inform the Simulator of a custom Motor. Custom Motors are /// allocated and deallocated by the user //virtual void OPAL_CALL registerCustomMotor(Motor* m); ! /// Immediately destroys the given Motor. virtual void OPAL_CALL destroyMotor(Motor* m); ! /// Immediately destroys all Motors in the Simulator. virtual void OPAL_CALL destroyAllMotors(); // SENSORS ! /// Creates and returns a pointer to an AccelerationSensor. virtual AccelerationSensor* OPAL_CALL createAccelerationSensor(); ! /// Creates and returns a pointer to an InclineSensor. virtual InclineSensor* OPAL_CALL createInclineSensor(); ! /// Creates and returns a pointer to a RaycastSensor. virtual RaycastSensor* OPAL_CALL createRaycastSensor(); ! /// Creates and returns a pointer to a VolumeSensor. virtual VolumeSensor* OPAL_CALL createVolumeSensor(); ! /// Immediately destroys the given Sensor. virtual void OPAL_CALL destroySensor(Sensor* s); ! /// Immediately destroys all Sensors in the Simulator. virtual void OPAL_CALL destroyAllSensors(); // SPACES ! /// Creates and returns a pointer to a Space which is a child of /// the Simulator's root Space. virtual Space* OPAL_CALL createSpace() = 0; ! /// Helper function used for ray casting. Immediately fires a ray ! /// into the scene and returns intersections results. Uses the /// ray's contact group parameter to limit collision checks. virtual const RaycastResult& OPAL_CALL internal_fireRay( ! const Rayr& r, real length, const Solid* attachedSolid, unsigned int rayContactGroup) = 0; --- 283,366 ---- virtual Solid* OPAL_CALL getSolid(unsigned int i)const; ! /// Immediately destroys the given Solid. All Joints, Motors, and ! /// Sensors that depend on this Solid will be automatically /// disabled. virtual void OPAL_CALL destroySolid(Solid* s); ! /// Immediately destroys all Solids in the Simulator. virtual void OPAL_CALL destroyAllSolids(); // JOINTS ! /// Creates and returns a pointer to a Joint. virtual Joint* OPAL_CALL createJoint() = 0; ! /// Immediately destroys the given Joint. All Motors that depend /// on this Solid will be automatically disabled. virtual void OPAL_CALL destroyJoint(Joint* j); ! /// Immediately destroys all Joints in the Simulator. virtual void OPAL_CALL destroyAllJoints(); // MOTORS ! /// Creates and returns a pointer to a ThrusterMotor. virtual ThrusterMotor* OPAL_CALL createThrusterMotor(); ! /// Creates and returns a pointer to a GearedMotor. virtual GearedMotor* OPAL_CALL createGearedMotor(); ! /// Creates and returns a pointer to a ServoMotor. virtual ServoMotor* OPAL_CALL createServoMotor(); ! /// Creates and returns a pointer to an AttractorMotor. virtual AttractorMotor* OPAL_CALL createAttractorMotor(); ! /// Creates and returns a pointer to a SpringMotor. virtual SpringMotor* OPAL_CALL createSpringMotor(); ! /// Inform the Simulator of a custom Motor. Custom Motors are /// allocated and deallocated by the user //virtual void OPAL_CALL registerCustomMotor(Motor* m); ! /// Immediately destroys the given Motor. virtual void OPAL_CALL destroyMotor(Motor* m); ! /// Immediately destroys all Motors in the Simulator. virtual void OPAL_CALL destroyAllMotors(); // SENSORS ! /// Creates and returns a pointer to an AccelerationSensor. virtual AccelerationSensor* OPAL_CALL createAccelerationSensor(); ! /// Creates and returns a pointer to an InclineSensor. virtual InclineSensor* OPAL_CALL createInclineSensor(); ! /// Creates and returns a pointer to a RaycastSensor. virtual RaycastSensor* OPAL_CALL createRaycastSensor(); ! /// Creates and returns a pointer to a VolumeSensor. virtual VolumeSensor* OPAL_CALL createVolumeSensor(); ! /// Immediately destroys the given Sensor. virtual void OPAL_CALL destroySensor(Sensor* s); ! /// Immediately destroys all Sensors in the Simulator. virtual void OPAL_CALL destroyAllSensors(); // SPACES ! /// Creates and returns a pointer to a Space which is a child of /// the Simulator's root Space. virtual Space* OPAL_CALL createSpace() = 0; ! virtual Space* OPAL_CALL getRootSpace(); ! ! /// Helper function used for ray casting. Immediately fires a ray ! /// into the scene and returns intersections results. Uses the /// ray's contact group parameter to limit collision checks. virtual const RaycastResult& OPAL_CALL internal_fireRay( ! const Rayr& r, real length, const Solid* attachedSolid, unsigned int rayContactGroup) = 0; *************** *** 309,427 **** /// Returns the Simulator's contact group flags. ! virtual unsigned long int OPAL_CALL internal_getContactGroupFlags(unsigned int groupNum)const; protected: virtual ~Simulator(); ! /// This function is physics engine-specific. It handles collision ! /// detection and steps the simulation ahead by a constant step /// size. virtual void stepPhysics() = 0; ! /// Adds a Solid to the internal list of Solids. void addSolid(Solid* s); ! /// Removes a Solid from the internal list of Solids. void removeSolid(Solid* s); ! /// Adds a Joint to the internal list of Joints. void addJoint(Joint* j); ! /// Removes a Joint from the internal list of Joints. void removeJoint(Joint* j); ! /// Adds a Motor to the internal list of Motors. void addMotor(Motor* m); ! /// Removes a Motor from the internal list of Motors. void removeMotor(Motor* m); ! /// Adds a Sensor to the internal list of Sensors. void addSensor(Sensor* s); ! /// Removes a Sensor from the internal list of Sensors. void removeSensor(Sensor* s); ! /// Adds a Space to the internal list of Spaces. void addSpace(Space* s); ! /// Destroys all objects marked as garbage. Useful for destroying /// objects at safe times. void destroyGarbage(); ! /// The constant step size used to break arbitrary simulation dt /// values into constant chunks. real mStepSize; ! /// Maintains leftover dt from previous simulation steps. This is ! /// useful when a dt smaller than the step size is requested; the /// dt will accumulate until there is enough for a single step. real mTimeBuffer; ! /// The accuracy level used internally by the physics engine's /// constraint solver. SolverAccuracyLevel mSolverAccuracyLevel; ! /// Pointer to user data. This is totally user-managed (i.e. OPAL ! /// will never delete it). void* mUserData; ! /// A limit on Solid motion to protect against simulation explosions /// due to numerical inaccuracy. //real mMaxLinearVel; ! /// A limit on Solid motion to protect against simulation explosions /// due to numerical inaccuracy. //real mMaxAngularVel; ! /// An internal list of all Solids. std::vector<Solid*> mSolidList; ! /// An internal list of all Joints. std::vector<Joint*> mJointList; ! /// An internal list of all Motors. std::vector<Motor*> mMotorList; ! /// An internal list of all Sensors. std::vector<Sensor*> mSensorList; ! /// True when it is safe to destroy a Solid (e.g. not in the middle /// of looping over all the Solid). bool mIsSolidDestructionSafe; ! /// True when it is safe to destroy a Joint (e.g. not in the middle /// of looping over all the Joint). bool mIsJointDestructionSafe; ! /// An internal list of Solids marked as garbage. std::vector<Solid*> mSolidGarbageList; ! /// An internal list of Joints marked as garbage. std::vector<Joint*> mJointGarbageList; ! /// Spaces are stored here so the user doesn't have to destroy them; /// they get destroyed when the Simulator is destroyed. std::vector<Space*> mSpaceList; ! /// A set of bitfields used to describe how different contact groups /// interact. unsigned long int mContactGroupFlags[32]; ! /// True if contacts are generated between static Solids and /// sleeping Solids. bool mStaticSleepingContactsEnabled; ! /// Pointer to the Simulator's post-step event handler. PostStepEventHandler* mPostStepEventHandler; ! /// The maximum correcting velocity used when forcing apart /// interpenetrating objects. real mMaxCorrectingVel; ! /// The maximum number of physical contacts generated when two /// Solids collide. unsigned int mMaxContacts; private: }; --- 370,494 ---- /// Returns the Simulator's contact group flags. ! virtual unsigned long int OPAL_CALL internal_getContactGroupFlags(unsigned int groupNum)const; protected: virtual ~Simulator(); ! /// This function is physics engine-specific. It handles collision ! /// detection and steps the simulation ahead by a constant step /// size. virtual void stepPhysics() = 0; ! /// Adds a Solid to the internal list of Solids. void addSolid(Solid* s); ! /// Removes a Solid from the internal list of Solids. void removeSolid(Solid* s); ! /// Adds a Joint to the internal list of Joints. void addJoint(Joint* j); ! /// Removes a Joint from the internal list of Joints. void removeJoint(Joint* j); ! /// Adds a Motor to the internal list of Motors. void addMotor(Motor* m); ! /// Removes a Motor from the internal list of Motors. void removeMotor(Motor* m); ! /// Adds a Sensor to the internal list of Sensors. void addSensor(Sensor* s); ! /// Removes a Sensor from the internal list of Sensors. void removeSensor(Sensor* s); ! /// Adds a Space to the internal list of Spaces. void addSpace(Space* s); ! /// Destroys all objects marked as garbage. Useful for destroying /// objects at safe times. void destroyGarbage(); ! /// The constant step size used to break arbitrary simulation dt /// values into constant chunks. real mStepSize; ! /// Maintains leftover dt from previous simulation steps. This is ! /// useful when a dt smaller than the step size is requested; the /// dt will accumulate until there is enough for a single step. real mTimeBuffer; ! /// The accuracy level used internally by the physics engine's /// constraint solver. SolverAccuracyLevel mSolverAccuracyLevel; ! /// Pointer to user data. This is totally user-managed (i.e. OPAL ! /// will never delete it). void* mUserData; ! /// A limit on Solid motion to protect against simulation explosions /// due to numerical inaccuracy. //real mMaxLinearVel; ! /// A limit on Solid motion to protect against simulation explosions /// due to numerical inaccuracy. //real mMaxAngularVel; ! /// An internal list of all Solids. std::vector<Solid*> mSolidList; ! /// An internal list of all Joints. std::vector<Joint*> mJointList; ! /// An internal list of all Motors. std::vector<Motor*> mMotorList; ! /// An internal list of all Sensors. std::vector<Sensor*> mSensorList; ! /// True when it is safe to destroy a Solid (e.g. not in the middle /// of looping over all the Solid). bool mIsSolidDestructionSafe; ! /// True when it is safe to destroy a Joint (e.g. not in the middle /// of looping over all the Joint). bool mIsJointDestructionSafe; ! /// An internal list of Solids marked as garbage. std::vector<Solid*> mSolidGarbageList; ! /// An internal list of Joints marked as garbage. std::vector<Joint*> mJointGarbageList; ! /// Spaces are stored here so the user doesn't have to destroy them; /// they get destroyed when the Simulator is destroyed. std::vector<Space*> mSpaceList; ! /// parent of all spaces ! Space * mRootSpace; ! ! /// A set of bitfields used to describe how different contact groups /// interact. unsigned long int mContactGroupFlags[32]; ! /// True if contacts are generated between static Solids and /// sleeping Solids. bool mStaticSleepingContactsEnabled; ! /// Pointer to the Simulator's post-step event handler. PostStepEventHandler* mPostStepEventHandler; ! /// The maximum correcting velocity used when forcing apart /// interpenetrating objects. real mMaxCorrectingVel; ! /// The maximum number of physical contacts generated when two /// Solids collide. unsigned int mMaxContacts; + /// data + SimulatorData mData; + private: }; |
|
From: Olex <ole...@us...> - 2005-11-26 22:40:26
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7819/src/ODE Modified Files: ODESimulator.cpp ODESimulator.h ODESpace.cpp ODESpace.h Log Message: Simulator::getRootSpace() Added option for the custom simulator. Additional unit tests. Index: ODESimulator.h =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.h,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** ODESimulator.h 12 Apr 2005 21:23:46 -0000 1.71 --- ODESimulator.h 26 Nov 2005 22:40:18 -0000 1.72 *************** *** 42,62 **** namespace opal { ! /// The ODE implementation of the Simulator class. class ODESimulator : public Simulator { public: ! /// The types of ODE constraint solvers. enum SolverType { ! /// Time complexity: O(m^3), space complexity O(m^2), where /// m = # of constraints. SOLVER_WORLDSTEP, ! /// Time complexity: O(m*N), space complexity O(m), where /// m = # of constraints and N = # of iterations. SOLVER_QUICKSTEP }; ! ODESimulator(); virtual ~ODESimulator(); --- 42,66 ---- namespace opal { ! /// The ODE implementation of the Simulator class. class ODESimulator : public Simulator { public: ! /// The types of ODE constraint solvers. enum SolverType { ! /// Time complexity: O(m^3), space complexity O(m^2), where /// m = # of constraints. SOLVER_WORLDSTEP, ! /// Time complexity: O(m*N), space complexity O(m), where /// m = # of constraints and N = # of iterations. SOLVER_QUICKSTEP }; ! /// use initData to complete ! ODESimulator( ); ! ! /// complete creation ! void initData( SimulatorData data ); virtual ~ODESimulator(); *************** *** 99,103 **** virtual const RaycastResult& OPAL_CALL internal_fireRay( ! const Rayr& r, real length, const Solid* attachedSolid, unsigned int rayContactGroup); --- 103,107 ---- virtual const RaycastResult& OPAL_CALL internal_fireRay( ! const Rayr& r, real length, const Solid* attachedSolid, unsigned int rayContactGroup); *************** *** 105,116 **** const Solid* volume, const Solid* attachedSolid); ! /// Helper function used for ray casting. ! virtual void OPAL_CALL internal_setRaycastResult(Solid* solid, const Point3r& intersection, const Vec3r& normal, real distance); ! /// Helper function for volume collision checking. virtual void OPAL_CALL internal_addCollidedSolid(Solid* solid); ! /// Helper function used for ray casting. virtual unsigned int OPAL_CALL internal_getRayContactGroup(); --- 109,120 ---- const Solid* volume, const Solid* attachedSolid); ! /// Helper function used for ray casting. ! virtual void OPAL_CALL internal_setRaycastResult(Solid* solid, const Point3r& intersection, const Vec3r& normal, real distance); ! /// Helper function for volume collision checking. virtual void OPAL_CALL internal_addCollidedSolid(Solid* solid); ! /// Helper function used for ray casting. virtual unsigned int OPAL_CALL internal_getRayContactGroup(); *************** *** 118,150 **** virtual void stepPhysics(); ! /// The ODE world ID used by this Simulator. dWorldID mWorldID; ! /// The root of the ODE collision detection hierarchy. dSpaceID mRootSpaceID; ! /// The ODE joint constraint group. dJointGroupID mContactJointGroupID; ! /// The type of constraint solver to use. SolverType mSolverType; ! /// Used for volume collision checks. long int mCollisionCount; ! /// Temporary list of Solids that collided in a volume collision /// check. VolumeQueryResult mVolumeQueryResult; ! /// Used for ray casting. RaycastResult mRaycastResult; ! /// Used for ray casting and volume queries. If a RaycastSensor or ! /// VolumeSensor is attached to a Solid, this pointer will point to ! /// that Solid. It is used to make sure the raycasts and collision /// query doesn't collide with the attached Solid. const Solid* mSensorSolid; ! /// A temporary variable that lets rays to use contact groups. This /// allows them to limit which Shapes they collide with. unsigned int mRayContactGroup; --- 122,154 ---- virtual void stepPhysics(); ! /// The ODE world ID used by this Simulator. dWorldID mWorldID; ! /// The root of the ODE collision detection hierarchy. dSpaceID mRootSpaceID; ! /// The ODE joint constraint group. dJointGroupID mContactJointGroupID; ! /// The type of constraint solver to use. SolverType mSolverType; ! /// Used for volume collision checks. long int mCollisionCount; ! /// Temporary list of Solids that collided in a volume collision /// check. VolumeQueryResult mVolumeQueryResult; ! /// Used for ray casting. RaycastResult mRaycastResult; ! /// Used for ray casting and volume queries. If a RaycastSensor or ! /// VolumeSensor is attached to a Solid, this pointer will point to ! /// that Solid. It is used to make sure the raycasts and collision /// query doesn't collide with the attached Solid. const Solid* mSensorSolid; ! /// A temporary variable that lets rays to use contact groups. This /// allows them to limit which Shapes they collide with. unsigned int mRayContactGroup; *************** *** 152,181 **** }; ! /// A namespace containing internal ODE functions. namespace ode_hidden { ! // These function don't use the OPAL_CALL calling convention ! // because they are functors passed to ODE, which expects a different // calling convention. ! /// Main collision callback functor. void internal_collisionCallback(void* data, dGeomID o0, dGeomID o1); ! /// Assuming the two ODE bodies are connected by an ODE joint, this ! /// function returns the OPAL Joint connecting the two bodies' /// Solids. Joint* internal_getCommonJoint(dBodyID body0, dBodyID body1); ! /// Special collision callback functor for volume collision /// checking. ! void internal_volumeCollisionCallback(void* data, dGeomID o0, dGeomID o1); ! /// Collision callback functor for ray casting. ! void internal_raycastCollisionCallback(void* data, dGeomID o0, dGeomID o1); //helper function for collision callback ! //void createOneSidedContact(dJointID contactJoint, // dBodyID movingObject, dBodyID staticObject, dVector3 pos); } --- 156,185 ---- }; ! /// A namespace containing internal ODE functions. namespace ode_hidden { ! // These function don't use the OPAL_CALL calling convention ! // because they are functors passed to ODE, which expects a different // calling convention. ! /// Main collision callback functor. void internal_collisionCallback(void* data, dGeomID o0, dGeomID o1); ! /// Assuming the two ODE bodies are connected by an ODE joint, this ! /// function returns the OPAL Joint connecting the two bodies' /// Solids. Joint* internal_getCommonJoint(dBodyID body0, dBodyID body1); ! /// Special collision callback functor for volume collision /// checking. ! void internal_volumeCollisionCallback(void* data, dGeomID o0, dGeomID o1); ! /// Collision callback functor for ray casting. ! void internal_raycastCollisionCallback(void* data, dGeomID o0, dGeomID o1); //helper function for collision callback ! //void createOneSidedContact(dJointID contactJoint, // dBodyID movingObject, dBodyID staticObject, dVector3 pos); } Index: ODESpace.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESpace.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ODESpace.cpp 11 Feb 2005 02:18:36 -0000 1.8 --- ODESpace.cpp 26 Nov 2005 22:40:18 -0000 1.9 *************** *** 31,41 **** { ODESpace::ODESpace() - : Space() { // Create the Space without adding it to another Space. ! mSpaceID = dSimpleSpaceCreate(0); mParentSpaceID = NULL; } ODESpace::~ODESpace() { --- 31,52 ---- { ODESpace::ODESpace() { // Create the Space without adding it to another Space. ! if ( false ) ! mSpaceID = dSimpleSpaceCreate(0); ! else ! { ! mSpaceID = dHashSpaceCreate(0); ! dHashSpaceSetLevels(mSpaceID, 3, 9); ! } mParentSpaceID = NULL; } + ODESpace::ODESpace( dSpaceID space ) + { + mSpaceID = space; + mParentSpaceID = NULL; + } + ODESpace::~ODESpace() { *************** *** 44,51 **** void ODESpace::setParentSpace(Space* parentSpace) { ! dSpaceID tempSpaceID = ((ODESpace*)parentSpace)->internal_getSpaceID(); ! // First remove this Space from its current parent Space, if one // exists. if (NULL != mParentSpaceID) --- 55,62 ---- void ODESpace::setParentSpace(Space* parentSpace) { ! dSpaceID tempSpaceID = ((ODESpace*)parentSpace)->internal_getSpaceID(); ! // First remove this Space from its current parent Space, if one // exists. if (NULL != mParentSpaceID) Index: ODESpace.h =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESpace.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ODESpace.h 18 Feb 2005 23:59:42 -0000 1.11 --- ODESpace.h 26 Nov 2005 22:40:18 -0000 1.12 *************** *** 35,39 **** namespace opal { ! /// The ODE implementation of the Space class. class ODESpace : public Space { --- 35,39 ---- namespace opal { ! /// The ODE implementation of the Space class. class ODESpace : public Space { *************** *** 41,56 **** ODESpace(); virtual ~ODESpace(); virtual void OPAL_CALL setParentSpace(Space* parentSpace); ! /// Returns the ODE space ID. virtual dSpaceID OPAL_CALL internal_getSpaceID()const; ! protected: ! /// The ODE space ID. dSpaceID mSpaceID; ! /// The ODE space ID of this ODESpace's parent ODESpace. dSpaceID mParentSpaceID; --- 41,58 ---- ODESpace(); + ODESpace( dSpaceID space ); + virtual ~ODESpace(); virtual void OPAL_CALL setParentSpace(Space* parentSpace); ! /// Returns the ODE space ID. virtual dSpaceID OPAL_CALL internal_getSpaceID()const; ! protected: ! /// The ODE space ID. dSpaceID mSpaceID; ! /// The ODE space ID of this ODESpace's parent ODESpace. dSpaceID mParentSpaceID; Index: ODESimulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.cpp,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** ODESimulator.cpp 19 Nov 2005 18:09:01 -0000 1.107 --- ODESimulator.cpp 26 Nov 2005 22:40:18 -0000 1.108 *************** *** 1,28 **** /************************************************************************* ! * * ! * Open Physics Abstraction Layer * ! * Copyright (C) 2004-2005 * ! * Alan Fischer ala...@gm... * ! * Andres Reinot an...@re... * ! * Tyler Streeter tyl...@gm... * ! * All rights reserved. * ! * Web: opal.sourceforge.net * ! * * [...2283 lines suppressed...] ! assert( false ); ! break; ! } ! } ! ! dWorldID ODESimulator::internal_getWorldID() const ! { ! return mWorldID; ! } ! ! dSpaceID ODESimulator::internal_getSpaceID() const ! { ! return mRootSpaceID; ! } ! ! dJointGroupID ODESimulator::internal_getJointGroupID() const ! { ! return mContactJointGroupID; ! } } |
|
From: Olex <ole...@us...> - 2005-11-26 22:40:25
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7819 Modified Files: changelog.txt Log Message: Simulator::getRootSpace() Added option for the custom simulator. Additional unit tests. Index: changelog.txt =================================================================== RCS file: /cvsroot/opal/opal/changelog.txt,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** changelog.txt 21 Nov 2005 13:59:16 -0000 1.49 --- changelog.txt 26 Nov 2005 22:40:18 -0000 1.50 *************** *** 15,18 **** --- 15,21 ---- ------------------------------------------ + * 11-26-05: Simulator::getRootSpace() Added option for the custom + simulator. Additional unit tests. (Oleksandr Lozitskiy) + * 11-21-05: Added more unit tests. (Oleksandr Lozitksiy) |
|
From: Olex <ole...@us...> - 2005-11-21 13:59:39
|
Update of /cvsroot/opal/opal/src/external/quicktest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28046/src/external/quicktest Modified Files: quicktest.h Log Message: Added more unit tests. Index: quicktest.h =================================================================== RCS file: /cvsroot/opal/opal/src/external/quicktest/quicktest.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** quicktest.h 13 Nov 2005 18:51:20 -0000 1.2 --- quicktest.h 21 Nov 2005 13:59:16 -0000 1.3 *************** *** 22,32 **** * license-LGPL.txt and license-BSD.txt for more details. * * * ! *************************************************************************/ ! // Credits: ! // Thanks to Noel Llopis for his helpful comparison of various C++ unit ! // testing frameworks and ideas for an ideal simple testing framework: ! // http://www.gamesfromwithin.com/articles/0412/000061.html Thanks to ! // Michael Feathers for developing CppUnitLite. Many of the macros in // Quicktest were modeled after those in CppUnitLite. --- 22,32 ---- * license-LGPL.txt and license-BSD.txt for more details. * * * ! *************************************************************************/ ! // Credits: ! // Thanks to Noel Llopis for his helpful comparison of various C++ unit ! // testing frameworks and ideas for an ideal simple testing framework: ! // http://www.gamesfromwithin.com/articles/0412/000061.html Thanks to ! // Michael Feathers for developing CppUnitLite. Many of the macros in // Quicktest were modeled after those in CppUnitLite. *************** *** 42,52 **** // Design Notes // ----------------------------------------------------------------------- ! // * Each test automatically registers itself by accessing the TestManager // singleton. ! // ! // * There are no formal fixtures. Fixtures are simply user-defined ! // objects. setup and teardown occur in the user-defined object's ! // constructor and destructor. Tests that need fixtures should staticly ! // allocate one of these objects at the beginning of the test. This method // is flexible and conceptually simple. --- 42,52 ---- // Design Notes // ----------------------------------------------------------------------- ! // * Each test automatically registers itself by accessing the TestManager // singleton. ! // ! // * There are no formal fixtures. Fixtures are simply user-defined ! // objects. setup and teardown occur in the user-defined object's ! // constructor and destructor. Tests that need fixtures should staticly ! // allocate one of these objects at the beginning of the test. This method // is flexible and conceptually simple. *************** *** 69,73 **** protected: ! void recordFailure(TestResult& result, const std::string& file, unsigned long int line, const std::string& message) { --- 69,73 ---- protected: ! void recordFailure(TestResult& result, const std::string& file, unsigned long int line, const std::string& message) { *************** *** 78,90 **** if (fileLength > maxLength) { ! // Get the last maxLength characters - 3 (leave room for // three ellipses at the beginning). fileStr = "..."; ! fileStr += file.substr(fileLength - maxLength + 3, fileLength - 1); } std::ostringstream oss; ! oss << fileStr << "(" << line << "): '" << mTestName << "' FAILED: " << message; result.push_back(oss.str()); --- 78,90 ---- if (fileLength > maxLength) { ! // Get the last maxLength characters - 3 (leave room for // three ellipses at the beginning). fileStr = "..."; ! fileStr += file.substr(fileLength - maxLength + 3, fileLength - 1); } std::ostringstream oss; ! oss << fileStr << "(" << line << "): '" << mTestName << "' FAILED: " << message; result.push_back(oss.str()); *************** *** 126,136 **** unsigned int numFailures = 0; ! *getOutputStream() ! << "[---------------- RUNNING TESTS ----------------]" << std::endl; unsigned int numLocalFailures = 0; unsigned int numLocalSuccesses = 0; ! std::string currentGroup; std::vector<Test*>::iterator iter; --- 126,136 ---- unsigned int numFailures = 0; ! *getOutputStream() ! << "[---------------- RUNNING TESTS ----------------]" << std::endl; unsigned int numLocalFailures = 0; unsigned int numLocalSuccesses = 0; ! std::string currentGroup; std::vector<Test*>::iterator iter; *************** *** 138,160 **** { if ( currentGroup != (*iter)->getGroup() ) ! { if ( !currentGroup.empty() ) { ! *getOutputStream() << "Group results: " ! << numLocalSuccesses << " succeeded, " ! << numLocalFailures << " failed" << std::endl; } currentGroup = (*iter)->getGroup(); ! ! *getOutputStream() << ! "Group: " << (*iter)->getGroup() << std::endl; ! numLocalFailures = 0; numLocalSuccesses = 0; } ! (*iter)->run(mResult); --- 138,160 ---- { if ( currentGroup != (*iter)->getGroup() ) ! { if ( !currentGroup.empty() ) { ! *getOutputStream() << "Group results: " ! << numLocalSuccesses << " succeeded, " ! << numLocalFailures << " failed" << std::endl; } currentGroup = (*iter)->getGroup(); ! ! *getOutputStream() << ! "Group: " << (*iter)->getGroup() << std::endl; ! numLocalFailures = 0; numLocalSuccesses = 0; } ! (*iter)->run(mResult); *************** *** 182,197 **** if ( !currentGroup.empty() ) { ! *getOutputStream() << "Group results: " ! << numLocalSuccesses << " succeeded, " ! << numLocalFailures << " failed" << std::endl; } ! *getOutputStream() << "Overall results: " << (unsigned int)mTests.size() ! - numFailures << " succeeded, " << numFailures << " failed" << std::endl; ! *getOutputStream() ! << "[---------------- TESTS FINISHED ---------------]" << std::endl; } --- 182,197 ---- if ( !currentGroup.empty() ) { ! *getOutputStream() << "Group results: " ! << numLocalSuccesses << " succeeded, " ! << numLocalFailures << " failed" << std::endl; } ! *getOutputStream() << "Overall results: " << (unsigned int)mTests.size() ! - numFailures << " succeeded, " << numFailures << " failed" << std::endl; ! *getOutputStream() ! << "[---------------- TESTS FINISHED ---------------]" << std::endl; } *************** *** 207,211 **** } ! /// List of pointers to Tests. All tests are staticly allocated, /// so we don't need to destroy them manually. std::vector<Test*> mTests; --- 207,211 ---- } ! /// List of pointers to Tests. All tests are staticly allocated, /// so we don't need to destroy them manually. std::vector<Test*> mTests; *************** *** 227,235 **** quicktest::TestManager::instance().addTest(this);\ }\ ! void run(quicktest::TestResult& result);\ }testName##Instance;\ ! void testName##Test::run(quicktest::TestResult& result) ! /// Macro that runs all tests. #define QT_RUN_TESTS quicktest::TestManager::instance().runTests() --- 227,235 ---- quicktest::TestManager::instance().addTest(this);\ }\ ! void run(quicktest::TestResult& _result);\ }testName##Instance;\ ! void testName##Test::run(quicktest::TestResult& _result) ! /// Macro that runs all tests. #define QT_RUN_TESTS quicktest::TestManager::instance().runTests() *************** *** 243,247 **** if (!(condition))\ {\ ! recordFailure(result, __FILE__, __LINE__, #condition);\ }\ } --- 243,247 ---- if (!(condition))\ {\ ! recordFailure(_result, __FILE__, __LINE__, #condition);\ }\ } *************** *** 256,260 **** << std::endl << "should equal value2:" \ << std::endl << "(" << (value2) << ")";\ ! recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ } --- 256,260 ---- << std::endl << "should equal value2:" \ << std::endl << "(" << (value2) << ")";\ ! recordFailure(_result, __FILE__, __LINE__, oss.str());\ }\ } *************** *** 268,277 **** oss << "value1 (" << (value1) << ") should not equal "\ << "value2 (" << (value2) << ")";\ ! recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ } ! /// Checks whether the first parameter is within the given tolerance from ! /// the second parameter. This is useful for comparing floating point /// values. #define QT_CHECK_CLOSE(value1, value2, tolerance)\ --- 268,277 ---- oss << "value1 (" << (value1) << ") should not equal "\ << "value2 (" << (value2) << ")";\ ! recordFailure(_result, __FILE__, __LINE__, oss.str());\ }\ } ! /// Checks whether the first parameter is within the given tolerance from ! /// the second parameter. This is useful for comparing floating point /// values. #define QT_CHECK_CLOSE(value1, value2, tolerance)\ *************** *** 282,286 **** oss << "value1 (" << (value1) << ") should be close to "\ << "value2 (" << (value2) << ")";\ ! recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ } --- 282,286 ---- oss << "value1 (" << (value1) << ") should be close to "\ << "value2 (" << (value2) << ")";\ ! recordFailure(_result, __FILE__, __LINE__, oss.str());\ }\ } *************** *** 294,298 **** oss << "value1 (" << (value1) << ") should be less than "\ << "value2 (" << (value2) << ")";\ ! recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ } --- 294,298 ---- oss << "value1 (" << (value1) << ") should be less than "\ << "value2 (" << (value2) << ")";\ ! recordFailure(_result, __FILE__, __LINE__, oss.str());\ }\ } *************** *** 306,310 **** oss << "value1 (" << (value1) << ") should be less than or "\ << "equal to " << "value2 (" << (value2) << ")";\ ! recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ } --- 306,310 ---- oss << "value1 (" << (value1) << ") should be less than or "\ << "equal to " << "value2 (" << (value2) << ")";\ ! recordFailure(_result, __FILE__, __LINE__, oss.str());\ }\ } *************** *** 318,326 **** oss << "value1 (" << (value1) << ") should be greater than "\ << "value2 (" << (value2) << ")";\ ! recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ } ! /// Checks whether the first parameter is greater than or equal to the /// second. #define QT_CHECK_GREATER_OR_EQUAL(value1, value2)\ --- 318,326 ---- oss << "value1 (" << (value1) << ") should be greater than "\ << "value2 (" << (value2) << ")";\ ! recordFailure(_result, __FILE__, __LINE__, oss.str());\ }\ } ! /// Checks whether the first parameter is greater than or equal to the /// second. #define QT_CHECK_GREATER_OR_EQUAL(value1, value2)\ *************** *** 331,335 **** oss << "value1 (" << (value1) << ") should be greater than or "\ << "equal to " << "value2 (" << (value2) << ")";\ ! recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ } --- 331,335 ---- oss << "value1 (" << (value1) << ") should be greater than or "\ << "equal to " << "value2 (" << (value2) << ")";\ ! recordFailure(_result, __FILE__, __LINE__, oss.str());\ }\ } *************** *** 338,342 **** #define QT_FAIL(message)\ {\ ! recordFailure(result, __FILE__, __LINE__, (message));\ }\ --- 338,342 ---- #define QT_FAIL(message)\ {\ ! recordFailure(_result, __FILE__, __LINE__, (message));\ }\ |
|
From: Olex <ole...@us...> - 2005-11-21 13:59:32
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28046/src Modified Files: Makefile.am Makefile.in Added Files: testSimulator.cpp Log Message: Added more unit tests. Index: Makefile.in =================================================================== RCS file: /cvsroot/opal/opal/src/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.in 13 Nov 2005 18:51:20 -0000 1.2 --- Makefile.in 21 Nov 2005 13:59:16 -0000 1.3 *************** *** 66,70 **** PROGRAMS = $(bin_PROGRAMS) am_test_opal_OBJECTS = testopal.$(OBJEXT) testsolid.$(OBJEXT) \ ! testAccelerationSensor.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ --- 66,71 ---- PROGRAMS = $(bin_PROGRAMS) am_test_opal_OBJECTS = testopal.$(OBJEXT) testsolid.$(OBJEXT) \ ! testAccelerationSensor.$(OBJEXT) testRaycastSensor.$(OBJEXT) \ ! testSimulator.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ *************** *** 207,211 **** VolumeSensor.cpp ! test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode --- 208,214 ---- VolumeSensor.cpp ! test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp ! test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode *************** *** 311,314 **** --- 314,319 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VolumeSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testAccelerationSensor.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRaycastSensor.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSimulator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testopal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsolid.Po@am__quote@ --- NEW FILE: testSimulator.cpp --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ // system headers #include <quicktest.h> // project headers #include "opal.h" using namespace opal; namespace testSimulator { QT_TEST( multi ) { Simulator * sim1 = createSimulator(); Simulator * sim2 = createSimulator(); Simulator * sim3 = createSimulator(); Vec3r g( 0, -10, 0 ); sim1->setGravity( g ); sim2->setGravity( g ); sim3->setGravity( g ); Solid * s1 = sim1->createSolid(); Solid * s2 = sim2->createSolid(); Solid * s3 = sim3->createSolid(); SphereShapeData data; data.radius = 1; data.material.density = 1; s1->addShape( data ); s2->addShape( data ); s3->addShape( data ); s1->setPosition( 0, 0, 0 ); s2->setPosition( 0, 100, 0 ); s3->setPosition( 0, 10000, 0 ); int steps = 100; for ( int i = 0; i < steps; ++i ) { sim1->simulate( 0.1 ); } QT_CHECK_LESS( s1->getPosition() [ 1 ], 0 ); QT_CHECK_EQUAL( s2->getPosition() [ 1 ], 100 ); QT_CHECK_EQUAL( s3->getPosition() [ 1 ], 10000 ); for ( int i = 0; i < steps; ++i ) { sim2->simulate( 0.1 ); } QT_CHECK_LESS( s1->getPosition() [ 1 ], 0 ); QT_CHECK_LESS( s2->getPosition() [ 1 ], 100 ); QT_CHECK_EQUAL( s3->getPosition() [ 1 ], 10000 ); for ( int i = 0; i < steps; ++i ) { sim3->simulate( 0.1 ); } QT_CHECK_LESS( s1->getPosition() [ 1 ], 0 ); QT_CHECK_LESS( s2->getPosition() [ 1 ], 100 ); QT_CHECK_LESS( s3->getPosition() [ 1 ], 10000 ); sim1->destroySolid( s1 ); sim2->destroySolid( s2 ); sim3->destroySolid( s3 ); sim1->destroy(); sim2->destroy(); sim3->destroy(); } } Index: Makefile.am =================================================================== RCS file: /cvsroot/opal/opal/src/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 13 Nov 2005 18:51:20 -0000 1.2 --- Makefile.am 21 Nov 2005 13:59:16 -0000 1.3 *************** *** 15,19 **** VolumeSensor.cpp bin_PROGRAMS = test_opal ! test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode --- 15,20 ---- VolumeSensor.cpp bin_PROGRAMS = test_opal ! test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode |
|
From: Olex <ole...@us...> - 2005-11-21 13:59:32
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28046 Modified Files: changelog.txt Log Message: Added more unit tests. Index: changelog.txt =================================================================== RCS file: /cvsroot/opal/opal/changelog.txt,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** changelog.txt 19 Nov 2005 18:09:01 -0000 1.48 --- changelog.txt 21 Nov 2005 13:59:16 -0000 1.49 *************** *** 15,18 **** --- 15,20 ---- ------------------------------------------ + * 11-21-05: Added more unit tests. (Oleksandr Lozitksiy) + * 11-19-05: Fixed some warnings in ODE implementation and tinyxml. (Oleksandr Lozitskiy) |
|
From: Olex <ole...@us...> - 2005-11-20 17:15:58
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13118/src/ODE Added Files: ODETools.h Log Message: Added missing file. --- NEW FILE: ODETools.h --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ #ifndef OPAL_ODETOOLS_H #define OPAL_ODETOOLS_H #include "../opal.h" namespace opal { opal::Vec3r toVec3r( dVector3 vector ) { opal::real x, y, z; x = static_cast<opal::real>( vector[0] ); y = static_cast<opal::real>( vector[1] ); z = static_cast<opal::real>( vector[2] ); return opal::Vec3r( x, y, z ); } opal::Vec3r toVec3r( const dReal * vector ) { opal::real x, y, z; x = static_cast<opal::real>( vector[0] ); y = static_cast<opal::real>( vector[1] ); z = static_cast<opal::real>( vector[2] ); return opal::Vec3r( x, y, z ); } opal::Vec3r toVec3r_RadToDeg( dVector3 vector ) { opal::real x, y, z; x = opal::radToDeg( static_cast<opal::real>( vector[0] ) ); y = opal::radToDeg( static_cast<opal::real>( vector[1] ) ); z = opal::radToDeg( static_cast<opal::real>( vector[2] ) ); return opal::Vec3r( x, y, z ); } opal::Vec3r toVec3r_RadToDeg( const dReal * vector ) { opal::real x, y, z; x = opal::radToDeg( static_cast<opal::real>( vector[0] ) ); y = opal::radToDeg( static_cast<opal::real>( vector[1] ) ); z = opal::radToDeg( static_cast<opal::real>( vector[2] ) ); return opal::Vec3r( x, y, z ); } opal::Vec3r toVec3r_DegToRad( dVector3 vector ) { opal::real x, y, z; x = opal::degToRad( static_cast<opal::real>( vector[0] ) ); y = opal::degToRad( static_cast<opal::real>( vector[1] ) ); z = opal::degToRad( static_cast<opal::real>( vector[2] ) ); return opal::Vec3r( x, y, z ); } } #endif |
|
From: Olex <ole...@us...> - 2005-11-19 18:09:09
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24953/src/ODE Modified Files: ODEJoint.cpp ODESimulator.cpp ODESolid.cpp Log Message: Fixed some warnings in ODE implementation and tinyxml. Index: ODESimulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.cpp,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** ODESimulator.cpp 6 Aug 2005 05:58:24 -0000 1.106 --- ODESimulator.cpp 19 Nov 2005 18:09:01 -0000 1.107 *************** *** 471,481 **** e.thisSolid = solid0; e.otherSolid = solid1; ! e.pos[0] = contactArray[0].pos[0]; ! e.pos[1] = contactArray[0].pos[1]; ! e.pos[2] = contactArray[0].pos[2]; ! e.normal[0] = contactArray[0].normal[0]; ! e.normal[1] = contactArray[0].normal[1]; ! e.normal[2] = contactArray[0].normal[2]; ! e.depth = contactArray[0].depth; if (handler0) --- 471,481 ---- e.thisSolid = solid0; e.otherSolid = solid1; ! e.pos[0] = (real)contactArray[0].pos[0]; ! e.pos[1] = (real)contactArray[0].pos[1]; ! e.pos[2] = (real)contactArray[0].pos[2]; ! e.normal[0] = (real)contactArray[0].normal[0]; ! e.normal[1] = (real)contactArray[0].normal[1]; ! e.normal[2] = (real)contactArray[0].normal[2]; ! e.depth = (real)contactArray[0].depth; if (handler0) *************** *** 926,944 **** // other is the ray. ! Point3r intersection(contactArray[0].pos[0], ! contactArray[0].pos[1], contactArray[0].pos[2]); ! Vec3r normal(contactArray[0].normal[0], ! contactArray[0].normal[1], ! contactArray[0].normal[2]); if(geomData0) { sim->internal_setRaycastResult(geomData0->solid, ! intersection, normal, contactArray[0].depth); } else { sim->internal_setRaycastResult(geomData1->solid, ! intersection, normal, contactArray[0].depth); } } --- 926,945 ---- // other is the ray. ! Point3r intersection((real)contactArray[0].pos[0], ! (real)contactArray[0].pos[1], ! (real)contactArray[0].pos[2]); ! Vec3r normal((real)contactArray[0].normal[0], ! (real)contactArray[0].normal[1], ! (real)contactArray[0].normal[2]); if(geomData0) { sim->internal_setRaycastResult(geomData0->solid, ! intersection, normal, (real)contactArray[0].depth); } else { sim->internal_setRaycastResult(geomData1->solid, ! intersection, normal, (real)contactArray[0].depth); } } *************** *** 1084,1088 **** dVector3 g; dWorldGetGravity(mWorldID, g); ! Vec3r gravity(g[0], g[1], g[2]); return gravity; } --- 1085,1089 ---- dVector3 g; dWorldGetGravity(mWorldID, g); ! Vec3r gravity((real)g[0], (real)g[1], (real)g[2]); return gravity; } Index: ODESolid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESolid.cpp,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** ODESolid.cpp 6 Nov 2005 03:20:01 -0000 1.91 --- ODESolid.cpp 19 Nov 2005 18:09:01 -0000 1.92 *************** *** 28,31 **** --- 28,32 ---- #include "ODESolid.h" #include "ODESpace.h" + #include "ODETools.h" #include "../BoxShapeData.h" #include "../SphereShapeData.h" *************** *** 714,718 **** dVector3 localVel; dBodyVectorFromWorld(mBodyID, vel[0], vel[1], vel[2], localVel); ! return Vec3r(localVel[0], localVel[1], localVel[2]); } else --- 715,719 ---- dVector3 localVel; dBodyVectorFromWorld(mBodyID, vel[0], vel[1], vel[2], localVel); ! return toVec3r( localVel ); } else *************** *** 733,737 **** dBodyVectorFromWorld(mBodyID, result[0], result[1], result[2], result); ! return Vec3r(result[0], result[1], result[2]); } else --- 734,738 ---- dBodyVectorFromWorld(mBodyID, result[0], result[1], result[2], result); ! return toVec3r( result ); } else *************** *** 747,752 **** dVector3 worldVel; dBodyVectorToWorld(mBodyID, vel[0], vel[1], vel[2], worldVel); ! Vec3r velRad(degToRad(worldVel[0]), degToRad(worldVel[1]), ! degToRad(worldVel[2])); dBodySetAngularVel(mBodyID, velRad[0], velRad[1], velRad[2]); --- 748,752 ---- dVector3 worldVel; dBodyVectorToWorld(mBodyID, vel[0], vel[1], vel[2], worldVel); ! Vec3r velRad = toVec3r_DegToRad( worldVel ); dBodySetAngularVel(mBodyID, velRad[0], velRad[1], velRad[2]); *************** *** 765,770 **** dVector3 localVel; dBodyVectorFromWorld(mBodyID, vel[0], vel[1], vel[2], localVel); ! return Vec3r(radToDeg(localVel[0]), radToDeg(localVel[1]), ! radToDeg(localVel[2])); } else --- 765,769 ---- dVector3 localVel; dBodyVectorFromWorld(mBodyID, vel[0], vel[1], vel[2], localVel); ! return toVec3r_RadToDeg( localVel ); } else *************** *** 790,794 **** { const dReal* vel = dBodyGetLinearVel(mBodyID); ! return Vec3r(vel[0], vel[1], vel[2]); } else --- 789,793 ---- { const dReal* vel = dBodyGetLinearVel(mBodyID); ! return toVec3r( vel ); } else *************** *** 805,809 **** dVector3 result; dBodyGetRelPointVel(mBodyID, p[0], p[1], p[2], result); ! return Vec3r(result[0], result[1], result[2]); } else --- 804,808 ---- dVector3 result; dBodyGetRelPointVel(mBodyID, p[0], p[1], p[2], result); ! return toVec3r( result ); } else *************** *** 830,834 **** { const dReal* vel = dBodyGetAngularVel(mBodyID); ! return Vec3r(radToDeg(vel[0]), radToDeg(vel[1]), radToDeg(vel[2])); } else --- 829,833 ---- { const dReal* vel = dBodyGetAngularVel(mBodyID); ! return toVec3r_RadToDeg( vel ); } else *************** *** 934,940 **** dBodyGetMass(mBodyID, &mass); m.set( ! mass.I[0], mass.I[1], mass.I[2], 0, ! mass.I[4], mass.I[5], mass.I[6], 0, ! mass.I[8], mass.I[9], mass.I[10], 0, 0, 0, 0, 1); --- 933,939 ---- dBodyGetMass(mBodyID, &mass); m.set( ! (real)mass.I[0], (real)mass.I[1], (real)mass.I[2], 0, ! (real)mass.I[4], (real)mass.I[5], (real)mass.I[6], 0, ! (real)mass.I[8], (real)mass.I[9], (real)mass.I[10], 0, 0, 0, 0, 1); *************** *** 1121,1126 **** bool ODESolid::isInertiaNonSymmetric(const dMass& mass)const { ! if (!areEqual(mass.I[0], mass.I[5]) ! || !areEqual(mass.I[5], mass.I[10])) { return true; --- 1120,1125 ---- bool ODESolid::isInertiaNonSymmetric(const dMass& mass)const { ! if (!areEqual((real)mass.I[0], (real)mass.I[5]) ! || !areEqual((real)mass.I[5], (real)mass.I[10])) { return true; Index: ODEJoint.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODEJoint.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ODEJoint.cpp 27 Aug 2005 18:09:19 -0000 1.31 --- ODEJoint.cpp 19 Nov 2005 18:09:01 -0000 1.32 *************** *** 27,30 **** --- 27,31 ---- #include "ODEJoint.h" + //#include "ODETools.h" namespace opal *************** *** 498,502 **** // All data in this JointAxis is valid except for the direction // vector. ! axis.direction.set(direction[0], direction[1], direction[2]); return axis; --- 499,505 ---- // All data in this JointAxis is valid except for the direction // vector. ! axis.direction.set((real)direction[0], ! (real)direction[1], ! (real)direction[2]); return axis; *************** *** 533,537 **** } ! return Point3r(anchor[0], anchor[1], anchor[2]); } --- 536,540 ---- } ! return Point3r((real)anchor[0], (real)anchor[1], (real)anchor[2]); } *************** *** 961,968 **** { dJointFeedback* jf = dJointGetFeedback(mJointID); ! Vec3r f1(jf->f1[0], jf->f1[1], jf->f1[2]); ! Vec3r t1(jf->t1[0], jf->t1[1], jf->t1[2]); ! Vec3r f2(jf->f2[0], jf->f2[1], jf->f2[2]); ! Vec3r t2(jf->t2[0], jf->t2[1], jf->t2[2]); f1 -= f2; --- 964,971 ---- { dJointFeedback* jf = dJointGetFeedback(mJointID); ! Vec3r f1((real)jf->f1[0], (real)jf->f1[1], (real)jf->f1[2]); ! Vec3r t1((real)jf->t1[0], (real)jf->t1[1], (real)jf->t1[2]); ! Vec3r f2((real)jf->f2[0], (real)jf->f2[1], (real)jf->f2[2]); ! Vec3r t2((real)jf->t2[0], (real)jf->t2[1], (real)jf->t2[2]); f1 -= f2; |
|
From: Olex <ole...@us...> - 2005-11-19 18:09:09
|
Update of /cvsroot/opal/opal/src/external/tinyxml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24953/src/external/tinyxml Modified Files: tinyxml.cpp Log Message: Fixed some warnings in ODE implementation and tinyxml. Index: tinyxml.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/external/tinyxml/tinyxml.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tinyxml.cpp 24 Jun 2005 17:50:49 -0000 1.1 --- tinyxml.cpp 19 Nov 2005 18:09:01 -0000 1.2 *************** *** 124,128 **** if ( buffer ) { ! strcpy( buffer, str.c_str() ); } } --- 124,128 ---- if ( buffer ) { ! strncpy( buffer, str.c_str(), str.length() ); } } |
|
From: Olex <ole...@us...> - 2005-11-19 18:09:09
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24953 Modified Files: changelog.txt Log Message: Fixed some warnings in ODE implementation and tinyxml. Index: changelog.txt =================================================================== RCS file: /cvsroot/opal/opal/changelog.txt,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** changelog.txt 13 Nov 2005 18:48:52 -0000 1.47 --- changelog.txt 19 Nov 2005 18:09:01 -0000 1.48 *************** *** 15,20 **** ------------------------------------------ * 11-13-05: Added Solid and AccelerationSensor unit tests. Modified ! QuickTest header. * 11-6-06: Added KDevelop project files. Added skeleton for unit --- 15,22 ---- ------------------------------------------ + * 11-19-05: Fixed some warnings in ODE implementation and tinyxml. (Oleksandr Lozitskiy) + * 11-13-05: Added Solid and AccelerationSensor unit tests. Modified ! QuickTest header. (Oleksandr Lozitskiy) * 11-6-06: Added KDevelop project files. Added skeleton for unit |
|
From: Olex <ole...@us...> - 2005-11-15 03:32:52
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3176/src Modified Files: testsolid.cpp Added Files: testRaycastSensor.cpp Log Message: New unit tests. Index: testsolid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/testsolid.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testsolid.cpp 13 Nov 2005 18:51:20 -0000 1.2 --- testsolid.cpp 15 Nov 2005 03:32:43 -0000 1.3 *************** *** 68,71 **** --- 68,74 ---- f.s->setName( "baba" ); QT_CHECK_EQUAL( "baba", f.s->getName() ); + + f.s->setName( "another_baba" ); + QT_CHECK_EQUAL( "another_baba", f.s->getName() ); } --- NEW FILE: testRaycastSensor.cpp --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ // system headers #include <quicktest.h> // project headers #include "opal.h" using namespace opal; namespace testRayCastSensor { class Fixture { public: Fixture() { sim = createSimulator(); sim->setGravity( Vec3r( 0, -9.81, 0 ) ); caster = sim->createSolid(); caster->setName( "caster" ); { SphereShapeData data; data.radius = 1; caster->addShape( data ); } sensor = sim->createRaycastSensor(); plane = sim->createSolid(); plane->setName( "plane" ); plane->setStatic( true ); { PlaneShapeData data; real plane_params[ 4 ] = {1, 0, 1, 0}; for ( int i = 0; i < 4; ++i ) data.abcd[ i ] = plane_params[ i ]; plane->addShape( data ); } { RaycastSensorData data; data.solid = caster; data.ray.setOrigin( caster->getPosition() ); data.ray.setDir( Vec3r( 0, -1, 0 ) ); sensor->init( data ); } } ~Fixture() { sim->destroySensor( sensor ); sim->destroySolid( caster ); sim->destroy(); } Simulator * sim; Solid * caster; Solid * plane; RaycastSensor * sensor; }; QT_TEST( testRay_on_Plane ) { Fixture f; f.caster->setPosition( 0, 10, 0 ); RaycastResult r = f.sensor->fireRay(); Point3r hitPoint = r.intersection; QT_CHECK_EQUAL( hitPoint, Point3r( 0, 0, 0 ) ); real diff = r.distance; QT_CHECK_EQUAL( diff, 10 ); } QT_TEST( testRay_Sphere_before_Plane ) { Fixture f; f.caster->setPosition( 0, 10, 0 ); Solid * intheway = f.sim->createSolid(); intheway->setPosition( 0, 5, 0 ); intheway->setName( "in the way" ); { SphereShapeData data; data.radius = 1; intheway->addShape( data ); } intheway->setStatic( false ); RaycastResult r = f.sensor->fireRay(); Point3r hitPoint = r.intersection; Solid * hit = r.solid; real diff = r.distance; QT_CHECK_EQUAL( diff, 5 ); f.sim->destroySolid( intheway ); } } |
|
From: Olex <ole...@us...> - 2005-11-13 18:51:37
|
Update of /cvsroot/opal/opal/src/external/quicktest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22008/src/external/quicktest Modified Files: quicktest.h Log Message: Added Solid and AccelerationSensor unit tests. Cosmetic modifications to QuickTest header. Index: quicktest.h =================================================================== RCS file: /cvsroot/opal/opal/src/external/quicktest/quicktest.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** quicktest.h 6 Nov 2005 17:41:21 -0000 1.1 --- quicktest.h 13 Nov 2005 18:51:20 -0000 1.2 *************** *** 87,91 **** std::ostringstream oss; oss << fileStr << "(" << line << "): '" << mTestName ! << " from " << mTestGroup << " ' FAILED: " << message; result.push_back(oss.str()); } --- 87,91 ---- std::ostringstream oss; oss << fileStr << "(" << line << "): '" << mTestName ! << "' FAILED: " << message; result.push_back(oss.str()); } *************** *** 253,258 **** {\ std::ostringstream oss;\ ! oss << "value1 (" << (value1) << ") should equal "\ ! << "value2 (" << (value2) << ")";\ recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ --- 253,259 ---- {\ std::ostringstream oss;\ ! oss << "value1:" << std::endl << "(" << (value1) << ")" \ ! << std::endl << "should equal value2:" \ ! << std::endl << "(" << (value2) << ")";\ recordFailure(result, __FILE__, __LINE__, oss.str());\ }\ |
|
From: Olex <ole...@us...> - 2005-11-13 18:51:36
|
Update of /cvsroot/opal/opal/kdevelop In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22008/kdevelop Modified Files: opal.kdevelop Log Message: Added Solid and AccelerationSensor unit tests. Cosmetic modifications to QuickTest header. Index: opal.kdevelop =================================================================== RCS file: /cvsroot/opal/opal/kdevelop/opal.kdevelop,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** opal.kdevelop 6 Nov 2005 17:41:20 -0000 1.1 --- opal.kdevelop 13 Nov 2005 18:51:20 -0000 1.2 *************** *** 14,19 **** <projectdirectory>.</projectdirectory> <absoluteprojectpath>false</absoluteprojectpath> ! <description></description> ! <versioncontrol></versioncontrol> </general> <kdevautoproject> --- 14,19 ---- <projectdirectory>.</projectdirectory> <absoluteprojectpath>false</absoluteprojectpath> ! <description/> ! <versioncontrol/> </general> <kdevautoproject> *************** *** 30,34 **** </runarguments> <customdirectory>/</customdirectory> ! <programargs></programargs> <autocompile>true</autocompile> <envvars/> --- 30,34 ---- </runarguments> <customdirectory>/</customdirectory> ! <programargs/> <autocompile>true</autocompile> <envvars/> *************** *** 70,74 **** <numberofjobs>1</numberofjobs> <dontact>false</dontact> ! <makebin></makebin> <prio>0</prio> </make> --- 70,74 ---- <numberofjobs>1</numberofjobs> <dontact>false</dontact> ! <makebin/> <prio>0</prio> </make> *************** *** 142,146 **** <docsystem>Doxygen Documentation Collection</docsystem> <docurl>opal.tag</docurl> ! <usermanualurl></usermanualurl> </projectdoc> </kdevdocumentation> --- 142,146 ---- <docsystem>Doxygen Documentation Collection</docsystem> <docurl>opal.tag</docurl> ! <usermanualurl/> </projectdoc> </kdevdocumentation> *************** *** 180,184 **** </codecompletion> <creategettersetter> ! <prefixGet></prefixGet> <prefixSet>set</prefixSet> <prefixVariable>m_,_</prefixVariable> --- 180,184 ---- </codecompletion> <creategettersetter> ! <prefixGet/> <prefixSet>set</prefixSet> <prefixVariable>m_,_</prefixVariable> *************** *** 196,205 **** <kdevdebugger> <general> ! <programargs></programargs> ! <gdbpath></gdbpath> ! <dbgshell></dbgshell> ! <configGdbScript></configGdbScript> ! <runShellScript></runShellScript> ! <runGdbScript></runGdbScript> <breakonloadinglibs>true</breakonloadinglibs> <separatetty>false</separatetty> --- 196,205 ---- <kdevdebugger> <general> ! <programargs/> ! <gdbpath/> ! <dbgshell/> ! <configGdbScript/> ! <runShellScript/> ! <runGdbScript/> <breakonloadinglibs>true</breakonloadinglibs> <separatetty>false</separatetty> *************** *** 213,218 **** </kdevdebugger> <ctagspart> ! <customArguments></customArguments> ! <customTagfilePath></customTagfilePath> </ctagspart> </kdevelop> --- 213,218 ---- </kdevdebugger> <ctagspart> ! <customArguments/> ! <customTagfilePath/> </ctagspart> </kdevelop> |
|
From: Olex <ole...@us...> - 2005-11-13 18:51:36
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22008/src Modified Files: Makefile.am Makefile.in testsolid.cpp Added Files: testAccelerationSensor.cpp Log Message: Added Solid and AccelerationSensor unit tests. Cosmetic modifications to QuickTest header. Index: Makefile.in =================================================================== RCS file: /cvsroot/opal/opal/src/Makefile.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.in 6 Nov 2005 17:41:20 -0000 1.1 --- Makefile.in 13 Nov 2005 18:51:20 -0000 1.2 *************** *** 65,69 **** binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) ! am_test_opal_OBJECTS = testopal.$(OBJEXT) testsolid.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ --- 65,70 ---- binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) ! am_test_opal_OBJECTS = testopal.$(OBJEXT) testsolid.$(OBJEXT) \ ! testAccelerationSensor.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ *************** *** 206,210 **** VolumeSensor.cpp ! test_opal_SOURCES = testopal.cpp testsolid.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode --- 207,211 ---- VolumeSensor.cpp ! test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode *************** *** 309,312 **** --- 310,314 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThrusterMotor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VolumeSensor.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testAccelerationSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testopal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsolid.Po@am__quote@ Index: testsolid.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/testsolid.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testsolid.cpp 6 Nov 2005 17:41:20 -0000 1.1 --- testsolid.cpp 13 Nov 2005 18:51:20 -0000 1.2 *************** *** 37,56 **** namespace testSolid { ! struct SolidFixture { ! SolidFixture() ! { ! sim = createSimulator(); ! s = sim->createSolid(); ! } ! ~SolidFixture() ! { ! sim->destroySolid( s ); ! sim->destroy(); ! } ! Simulator * sim; ! Solid * s; }; --- 37,58 ---- namespace testSolid { ! class SolidFixture { ! public: ! SolidFixture() ! { ! sim = createSimulator(); ! sim->setGravity( Vec3r( 0, -9.81, 0 ) ); ! s = sim->createSolid(); ! } ! ~SolidFixture() ! { ! sim->destroySolid( s ); ! sim->destroy(); ! } ! Simulator * sim; ! Solid * s; }; *************** *** 58,63 **** { SolidFixture f; - QT_CHECK( f.sim != NULL ); QT_CHECK( f.s != NULL ); } } --- 60,204 ---- { SolidFixture f; QT_CHECK( f.s != NULL ); } + + QT_TEST( testNaming ) + { + SolidFixture f; + f.s->setName( "baba" ); + QT_CHECK_EQUAL( "baba", f.s->getName() ); + } + + class SolidBoxFixture : public SolidFixture + { + public: + SolidBoxFixture() : SolidFixture() + { + BoxShapeData data; + data.dimensions = Vec3r( 1, 1, 1 ); + data.material.density = 1; + s->addShape( data ); + } + }; + + QT_TEST( testEnablingTrue ) + { + SolidBoxFixture f; + + f.s->setEnabled( true ); + Point3r p = f.s->getPosition(); + + f.sim->simulate( 1 ); + + QT_CHECK_LESS( f.s->getPosition() [ 1 ], p[ 1 ] ); + } + + QT_TEST( testEnablingFalse ) + { + SolidBoxFixture f; + + f.s->setEnabled( false ); + Point3r p = f.s->getPosition(); + + f.sim->simulate( 1 ); + + QT_CHECK_CLOSE( f.s->getPosition() [ 1 ], p[ 1 ], 0.001 ); + } + + QT_TEST( testStaticTrue ) + { + SolidBoxFixture f; + + f.s->setStatic( true ); + Point3r p = f.s->getPosition(); + + f.sim->simulate( 1 ); + + QT_CHECK_CLOSE( f.s->getPosition() [ 1 ], p[ 1 ], 0.001 ); + } + + QT_TEST( testStaticFalse ) + { + SolidBoxFixture f; + + f.s->setStatic( false ); + Point3r p = f.s->getPosition(); + + f.sim->simulate( 1 ); + + QT_CHECK_LESS( f.s->getPosition() [ 1 ], p[ 1 ] ); + } + + QT_TEST( testSleepingTrue ) + { + SolidBoxFixture f; + + f.s->setSleeping( true ); + Point3r p = f.s->getPosition(); + + f.sim->simulate( 1 ); + + QT_CHECK_CLOSE( f.s->getPosition() [ 1 ], p[ 1 ], 0.001 ); + } + + QT_TEST( testSleepingFalse ) + { + SolidBoxFixture f; + + f.s->setSleeping( false ); + Point3r p = f.s->getPosition(); + + f.sim->simulate( 1 ); + + QT_CHECK_LESS( f.s->getPosition() [ 1 ], p[ 1 ] ); + } + + QT_TEST( testAddingForce ) + { + SolidBoxFixture f; + + Force force; + force.type = GLOBAL_FORCE; + force.vec = Vec3r( 0, 200, 0 ); + force.duration = 0.1; + f.s->addForce( force ); + + Point3r p = f.s->getPosition(); + + f.sim->simulate( 1 ); + + QT_CHECK_GREATER( f.s->getPosition() [ 1 ], p[ 1 ] ); + } + + QT_TEST( testZeroForces ) + { + SolidBoxFixture f; + + Force force; + force.type = GLOBAL_FORCE; + force.vec = Vec3r( 0, 200, 0 ); + force.duration = 0.1; + f.s->addForce( force ); + + f.s->zeroForces(); + + Point3r p = f.s->getPosition(); + + f.sim->simulate( 1 ); + + QT_CHECK_LESS( f.s->getPosition() [ 1 ], p[ 1 ] ); + } + + QT_TEST( testRotationViaIdentity ) + { + SolidBoxFixture f; + + Matrix44r m; + m.makeIdentity(); + + f.s->setTransform( m ); + Matrix44r current = f.s->getTransform(); + + QT_CHECK_EQUAL( current, m ); + } } Index: Makefile.am =================================================================== RCS file: /cvsroot/opal/opal/src/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 6 Nov 2005 17:41:20 -0000 1.1 --- Makefile.am 13 Nov 2005 18:51:20 -0000 1.2 *************** *** 15,19 **** VolumeSensor.cpp bin_PROGRAMS = test_opal ! test_opal_SOURCES = testopal.cpp testsolid.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode --- 15,19 ---- VolumeSensor.cpp bin_PROGRAMS = test_opal ! test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode --- NEW FILE: testAccelerationSensor.cpp --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ // system headers #include <quicktest.h> // project headers #include "opal.h" using namespace opal; namespace testAccelerationSensor { class Fixture { public: Fixture() { sim = createSimulator(); sim->setGravity( Vec3r( 0, -9.81, 0 ) ); s = sim->createSolid(); sensor = sim->createAccelerationSensor(); } ~Fixture() { sim->destroySensor( sensor ); sim->destroySolid( s ); sim->destroy(); } Simulator * sim; Solid * s; AccelerationSensor * sensor; }; QT_TEST( testCreation ) { Fixture f; QT_CHECK( f.sensor != NULL ); } QT_TEST( testNaming ) { Fixture f; f.sensor->setName( "baba" ); QT_CHECK_EQUAL( "baba", f.sensor->getName() ); } class SetupFixture : public Fixture { public: SetupFixture() { AccelerationSensorData data; data.solid = s; sensor->init( data ); } }; QT_TEST( testAcceleration ) { SetupFixture f; f.sim->simulate( 1 ); QT_CHECK( f.sensor->getGlobalLinearAccel() [ 1 ] < 0 ); } QT_TEST( testDisabled ) { SetupFixture f; f.sensor->setEnabled( false ); f.sim->simulate( 1 ); QT_CHECK_CLOSE( f.sensor->getGlobalLinearAccel() [ 1 ] , 0, 0.001 ); } } |
|
From: Olex <ole...@us...> - 2005-11-13 18:49:00
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21903 Modified Files: changelog.txt Log Message: Added Solid and AccelerationSensor unit tests. Cosmetic modifications to QuickTest header. Index: changelog.txt =================================================================== RCS file: /cvsroot/opal/opal/changelog.txt,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** changelog.txt 6 Nov 2005 17:41:20 -0000 1.46 --- changelog.txt 13 Nov 2005 18:48:52 -0000 1.47 *************** *** 15,18 **** --- 15,21 ---- ------------------------------------------ + * 11-13-05: Added Solid and AccelerationSensor unit tests. Modified + QuickTest header. + * 11-6-06: Added KDevelop project files. Added skeleton for unit tests. Added quicktest to external headers. (Oleksandr Lozitskiy) |
|
From: Alan F. <pal...@us...> - 2005-11-07 15:04:41
|
Update of /cvsroot/opal/opal/vc6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32649/vc6 Added Files: opal.dsw opal_ode.dsp Log Message: --- NEW FILE: opal_ode.dsp --- # Microsoft Developer Studio Project File - Name="opal_ode" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=opal_ode - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "opal_ode.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "opal_ode.mak" CFG="opal_ode - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "opal_ode - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "opal_ode - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "opal_ode - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OPAL_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OPAL_DLL_EXPORTING" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ode.lib /nologo /dll /machine:I386 !ELSEIF "$(CFG)" == "opal_ode - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OPAL_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OPAL_DLL_EXPORTING" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ode.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "opal_ode - Win32 Release" # Name "opal_ode - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\src\AccelerationSensor.cpp # End Source File # Begin Source File SOURCE=..\src\AttractorMotor.cpp # End Source File # Begin Source File SOURCE=..\src\Blueprint.cpp # End Source File # Begin Source File SOURCE=..\src\BlueprintInstance.cpp # End Source File # Begin Source File SOURCE=..\src\BlueprintManager.cpp # End Source File # Begin Source File SOURCE=..\src\CollisionEventHandler.cpp # End Source File # Begin Source File SOURCE=..\src\GearedMotor.cpp # End Source File # Begin Source File SOURCE=..\src\InclineSensor.cpp # End Source File # Begin Source File SOURCE=..\src\Joint.cpp # End Source File # Begin Source File SOURCE=..\src\Logger.cpp # End Source File # Begin Source File SOURCE=..\src\Motor.cpp # End Source File # Begin Source File SOURCE=..\src\RaycastSensor.cpp # End Source File # Begin Source File SOURCE=..\src\Sensor.cpp # End Source File # Begin Source File SOURCE=..\src\ServoMotor.cpp # End Source File # Begin Source File SOURCE=..\src\Simulator.cpp # End Source File # Begin Source File SOURCE=..\src\Solid.cpp # End Source File # Begin Source File SOURCE=..\src\SolidData.cpp # End Source File # Begin Source File SOURCE=..\src\Space.cpp # End Source File # Begin Source File SOURCE=..\src\SpringMotor.cpp # End Source File # Begin Source File SOURCE=..\src\ThrusterMotor.cpp # End Source File # Begin Source File SOURCE=..\src\VolumeSensor.cpp # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\src\AccelerationSensor.h # End Source File # Begin Source File SOURCE=..\src\AccelerationSensorData.h # End Source File # Begin Source File SOURCE=..\src\AttractorMotor.h # End Source File # Begin Source File SOURCE=..\src\AttractorMotorData.h # End Source File # Begin Source File SOURCE=..\src\Blueprint.h # End Source File # Begin Source File SOURCE=..\src\BlueprintInstance.h # End Source File # Begin Source File SOURCE=..\src\BlueprintManager.h # End Source File # Begin Source File SOURCE=..\src\BoxShapeData.h # End Source File # Begin Source File SOURCE=..\src\CapsuleShapeData.h # End Source File # Begin Source File SOURCE=..\src\CollisionEventHandler.h # End Source File # Begin Source File SOURCE=..\src\Defines.h # End Source File # Begin Source File SOURCE=..\src\EventHandler.h # End Source File # Begin Source File SOURCE=..\src\GearedMotor.h # End Source File # Begin Source File SOURCE=..\src\GearedMotorData.h # End Source File # Begin Source File SOURCE=..\src\InclineSensor.h # End Source File # Begin Source File SOURCE=..\src\InclineSensorData.h # End Source File # Begin Source File SOURCE=..\src\Joint.h # End Source File # Begin Source File SOURCE=..\src\JointBreakEventHandler.h # End Source File # Begin Source File SOURCE=..\src\JointData.h # End Source File # Begin Source File SOURCE=..\src\Logger.h # End Source File # Begin Source File SOURCE=..\src\Matrix44r.h # End Source File # Begin Source File SOURCE=..\src\MeshShapeData.h # End Source File # Begin Source File SOURCE=..\src\Motor.h # End Source File # Begin Source File SOURCE=..\src\MotorData.h # End Source File # Begin Source File SOURCE=..\src\opal.h # End Source File # Begin Source File SOURCE=..\src\OpalMath.h # End Source File # Begin Source File SOURCE=..\src\PlaneShapeData.h # End Source File # Begin Source File SOURCE=..\src\Point3r.h # End Source File # Begin Source File SOURCE=..\src\Portability.h # End Source File # Begin Source File SOURCE=..\src\PostStepEventHandler.h # End Source File # Begin Source File SOURCE=..\src\Quaternion.h # End Source File # Begin Source File SOURCE=..\src\RaycastSensor.h # End Source File # Begin Source File SOURCE=..\src\RaycastSensorData.h # End Source File # Begin Source File SOURCE=..\src\Rayr.h # End Source File # Begin Source File SOURCE=..\src\Sensor.h # End Source File # Begin Source File SOURCE=..\src\SensorData.h # End Source File # Begin Source File SOURCE=..\src\ServoMotor.h # End Source File # Begin Source File SOURCE=..\src\ServoMotorData.h # End Source File # Begin Source File SOURCE=..\src\ShapeData.h # End Source File # Begin Source File SOURCE=..\src\Simulator.h # End Source File # Begin Source File SOURCE=..\src\Singleton.h # End Source File # Begin Source File SOURCE=..\src\Solid.h # End Source File # Begin Source File SOURCE=..\src\SolidData.h # End Source File # Begin Source File SOURCE=..\src\Space.h # End Source File # Begin Source File SOURCE=..\src\SphereShapeData.h # End Source File # Begin Source File SOURCE=..\src\SpringMotor.h # End Source File # Begin Source File SOURCE=..\src\SpringMotorData.h # End Source File # Begin Source File SOURCE=..\src\ThrusterMotor.h # End Source File # Begin Source File SOURCE=..\src\ThrusterMotorData.h # End Source File # Begin Source File SOURCE=..\src\Vec3r.h # End Source File # Begin Source File SOURCE=..\src\VolumeSensor.h # End Source File # Begin Source File SOURCE=..\src\VolumeSensorData.h # End Source File # End Group # Begin Group "ODE-Specific" # PROP Default_Filter "" # Begin Source File SOURCE=..\src\ODE\ODEJoint.cpp # End Source File # Begin Source File SOURCE=..\src\ODE\ODEJoint.h # End Source File # Begin Source File SOURCE=..\src\ODE\ODESimulator.cpp # End Source File # Begin Source File SOURCE=..\src\ODE\ODESimulator.h # End Source File # Begin Source File SOURCE=..\src\ODE\ODESolid.cpp # End Source File # Begin Source File SOURCE=..\src\ODE\ODESolid.h # End Source File # Begin Source File SOURCE=..\src\ODE\ODESpace.cpp # End Source File # Begin Source File SOURCE=..\src\ODE\ODESpace.h # End Source File # End Group # Begin Group "TinyXml" # PROP Default_Filter "" # Begin Source File SOURCE=..\src\external\tinyxml\tinystr.cpp # End Source File # Begin Source File SOURCE=..\src\external\tinyxml\tinystr.h # End Source File # Begin Source File SOURCE=..\src\external\tinyxml\tinyxml.cpp # End Source File # Begin Source File SOURCE=..\src\external\tinyxml\tinyxml.h # End Source File # Begin Source File SOURCE=..\src\external\tinyxml\tinyxmlerror.cpp # End Source File # Begin Source File SOURCE=..\src\external\tinyxml\tinyxmlparser.cpp # End Source File # End Group # End Target # End Project --- NEW FILE: opal.dsw --- Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "opal_ode"=".\opal_ode.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### |
|
From: Olex <ole...@us...> - 2005-11-06 17:41:56
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12151/src/ODE Added Files: Makefile.am Makefile.in Log Message: Added KDevelop project files. Added skeleton for unit tests. Added quicktest to external headers. --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ODE DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libodeimpl_a_AR = $(AR) $(ARFLAGS) libodeimpl_a_LIBADD = am_libodeimpl_a_OBJECTS = ODEJoint.$(OBJEXT) ODESimulator.$(OBJEXT) \ ODESolid.$(OBJEXT) ODESpace.$(OBJEXT) libodeimpl_a_OBJECTS = $(am_libodeimpl_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libodeimpl_a_SOURCES) DIST_SOURCES = $(libodeimpl_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = $(all_includes) METASOURCES = AUTO noinst_HEADERS = ODEJoint.h ODESimulator.h ODESolid.h ODESpace.h noinst_LIBRARIES = libodeimpl.a libodeimpl_a_SOURCES = ODEJoint.cpp ODESimulator.cpp ODESolid.cpp ODESpace.cpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ODE/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ODE/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libodeimpl.a: $(libodeimpl_a_OBJECTS) $(libodeimpl_a_DEPENDENCIES) -rm -f libodeimpl.a $(libodeimpl_a_AR) libodeimpl.a $(libodeimpl_a_OBJECTS) $(libodeimpl_a_LIBADD) $(RANLIB) libodeimpl.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODEJoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODESimulator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODESolid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODESpace.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: Makefile.am --- INCLUDES = $(all_includes) METASOURCES = AUTO noinst_HEADERS = ODEJoint.h ODESimulator.h ODESolid.h ODESpace.h noinst_LIBRARIES = libodeimpl.a libodeimpl_a_SOURCES = ODEJoint.cpp ODESimulator.cpp ODESolid.cpp ODESpace.cpp |
|
From: Olex <ole...@us...> - 2005-11-06 17:41:55
|
Update of /cvsroot/opal/opal/src/external In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12151/src/external Added Files: Makefile.am Makefile.in Log Message: Added KDevelop project files. Added skeleton for unit tests. Added quicktest to external headers. --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/external DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = $(all_includes) METASOURCES = AUTO SUBDIRS = tinyxml quicktest all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/external/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/external/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: Makefile.am --- INCLUDES = $(all_includes) METASOURCES = AUTO SUBDIRS = tinyxml quicktest |
|
From: Olex <ole...@us...> - 2005-11-06 17:41:55
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12151/src Added Files: Makefile.am Makefile.in testopal.cpp testsolid.cpp Log Message: Added KDevelop project files. Added skeleton for unit tests. Added quicktest to external headers. --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = test_opal$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libopalode_a_AR = $(AR) $(ARFLAGS) libopalode_a_LIBADD = am_libopalode_a_OBJECTS = AccelerationSensor.$(OBJEXT) \ AttractorMotor.$(OBJEXT) Blueprint.$(OBJEXT) \ BlueprintInstance.$(OBJEXT) BlueprintManager.$(OBJEXT) \ CollisionEventHandler.$(OBJEXT) GearedMotor.$(OBJEXT) \ InclineSensor.$(OBJEXT) Joint.$(OBJEXT) Logger.$(OBJEXT) \ Motor.$(OBJEXT) RaycastSensor.$(OBJEXT) Sensor.$(OBJEXT) \ ServoMotor.$(OBJEXT) Simulator.$(OBJEXT) Solid.$(OBJEXT) \ SolidData.$(OBJEXT) Space.$(OBJEXT) SpringMotor.$(OBJEXT) \ ThrusterMotor.$(OBJEXT) VolumeSensor.$(OBJEXT) libopalode_a_OBJECTS = $(am_libopalode_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_test_opal_OBJECTS = testopal.$(OBJEXT) testsolid.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a \ $(top_builddir)/src/libopalode.a DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libopalode_a_SOURCES) $(test_opal_SOURCES) DIST_SOURCES = $(libopalode_a_SOURCES) $(test_opal_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # set the include path found by configure INCLUDES = -I$(top_srcdir)/src/ODE -I$(top_srcdir)/src/external/quicktest \ -I$(top_srcdir)/src/external/tinyxml $(all_includes) # the library search path. SUBDIRS = external ODE noinst_LIBRARIES = libopalode.a libopalode_a_SOURCES = AccelerationSensor.cpp AttractorMotor.cpp Blueprint.cpp\ BlueprintInstance.cpp BlueprintManager.cpp CollisionEventHandler.cpp\ GearedMotor.cpp InclineSensor.cpp Joint.cpp Logger.cpp Motor.cpp\ RaycastSensor.cpp Sensor.cpp ServoMotor.cpp Simulator.cpp Solid.cpp\ SolidData.cpp Space.cpp SpringMotor.cpp ThrusterMotor.cpp\ VolumeSensor.cpp test_opal_SOURCES = testopal.cpp testsolid.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode all: all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libopalode.a: $(libopalode_a_OBJECTS) $(libopalode_a_DEPENDENCIES) -rm -f libopalode.a $(libopalode_a_AR) libopalode.a $(libopalode_a_OBJECTS) $(libopalode_a_LIBADD) $(RANLIB) libopalode.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done test_opal$(EXEEXT): $(test_opal_OBJECTS) $(test_opal_DEPENDENCIES) @rm -f test_opal$(EXEEXT) $(CXXLINK) $(test_opal_LDFLAGS) $(test_opal_OBJECTS) $(test_opal_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AccelerationSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AttractorMotor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Blueprint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlueprintInstance.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlueprintManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CollisionEventHandler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GearedMotor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InclineSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Joint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Logger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Motor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RaycastSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ServoMotor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Simulator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Solid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SolidData.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Space.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SpringMotor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThrusterMotor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VolumeSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testopal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsolid.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LIBRARIES) $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES clean-recursive ctags ctags-recursive \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-recursive distclean-tags distdir \ dvi dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: testsolid.cpp --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ // system headers #include <quicktest.h> // project headers #include "opal.h" using namespace opal; namespace testSolid { struct SolidFixture { SolidFixture() { sim = createSimulator(); s = sim->createSolid(); } ~SolidFixture() { sim->destroySolid( s ); sim->destroy(); } Simulator * sim; Solid * s; }; QT_TEST( testCreation ) { SolidFixture f; QT_CHECK( f.sim != NULL ); QT_CHECK( f.s != NULL ); } } --- NEW FILE: Makefile.am --- # set the include path found by configure INCLUDES = -I$(top_srcdir)/src/ODE -I$(top_srcdir)/src/external/quicktest \ -I$(top_srcdir)/src/external/tinyxml $(all_includes) # the library search path. SUBDIRS = external ODE noinst_LIBRARIES = libopalode.a libopalode_a_SOURCES = AccelerationSensor.cpp AttractorMotor.cpp Blueprint.cpp\ BlueprintInstance.cpp BlueprintManager.cpp CollisionEventHandler.cpp\ GearedMotor.cpp InclineSensor.cpp Joint.cpp Logger.cpp Motor.cpp\ RaycastSensor.cpp Sensor.cpp ServoMotor.cpp Simulator.cpp Solid.cpp\ SolidData.cpp Space.cpp SpringMotor.cpp ThrusterMotor.cpp\ VolumeSensor.cpp bin_PROGRAMS = test_opal test_opal_SOURCES = testopal.cpp testsolid.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode --- NEW FILE: testopal.cpp --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ // system headers #include <quicktest.h> int main( int argc, char* argv[] ) { QT_RUN_TESTS; } |
|
From: Olex <ole...@us...> - 2005-11-06 17:41:55
|
Update of /cvsroot/opal/opal/src/external/tinyxml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12151/src/external/tinyxml Added Files: Makefile.am Makefile.in Log Message: Added KDevelop project files. Added skeleton for unit tests. Added quicktest to external headers. --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/external/tinyxml DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libtinyxml_a_AR = $(AR) $(ARFLAGS) libtinyxml_a_LIBADD = am_libtinyxml_a_OBJECTS = tinystr.$(OBJEXT) tinyxml.$(OBJEXT) \ tinyxmlerror.$(OBJEXT) tinyxmlparser.$(OBJEXT) libtinyxml_a_OBJECTS = $(am_libtinyxml_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libtinyxml_a_SOURCES) DIST_SOURCES = $(libtinyxml_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = $(all_includes) METASOURCES = AUTO noinst_LIBRARIES = libtinyxml.a libtinyxml_a_SOURCES = tinystr.cpp tinyxml.cpp tinyxmlerror.cpp\ tinyxmlparser.cpp noinst_HEADERS = tinystr.h tinyxml.h all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/external/tinyxml/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/external/tinyxml/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libtinyxml.a: $(libtinyxml_a_OBJECTS) $(libtinyxml_a_DEPENDENCIES) -rm -f libtinyxml.a $(libtinyxml_a_AR) libtinyxml.a $(libtinyxml_a_OBJECTS) $(libtinyxml_a_LIBADD) $(RANLIB) libtinyxml.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinystr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinyxml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinyxmlerror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinyxmlparser.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: Makefile.am --- INCLUDES = $(all_includes) METASOURCES = AUTO noinst_LIBRARIES = libtinyxml.a libtinyxml_a_SOURCES = tinystr.cpp tinyxml.cpp tinyxmlerror.cpp\ tinyxmlparser.cpp noinst_HEADERS = tinystr.h tinyxml.h |
|
From: Olex <ole...@us...> - 2005-11-06 17:41:51
|
Update of /cvsroot/opal/opal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12151 Modified Files: changelog.txt Log Message: Added KDevelop project files. Added skeleton for unit tests. Added quicktest to external headers. Index: changelog.txt =================================================================== RCS file: /cvsroot/opal/opal/changelog.txt,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** changelog.txt 6 Nov 2005 05:12:21 -0000 1.45 --- changelog.txt 6 Nov 2005 17:41:20 -0000 1.46 *************** *** 15,18 **** --- 15,21 ---- ------------------------------------------ + * 11-6-06: Added KDevelop project files. Added skeleton for unit + tests. Added quicktest to external headers. (Oleksandr Lozitskiy) + * 11-6-06: Refactoring Solid interface. Made a few method const. (Oleksandr Lozitskiy) |
|
From: Olex <ole...@us...> - 2005-11-06 17:41:51
|
Update of /cvsroot/opal/opal/kdevelop/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12151/kdevelop/templates Added Files: cpp h Log Message: Added KDevelop project files. Added skeleton for unit tests. Added quicktest to external headers. --- NEW FILE: cpp --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ --- NEW FILE: h --- /************************************************************************* * * * Open Physics Abstraction Layer * * Copyright (C) 2004-2005 * * Alan Fischer ala...@gm... * * Andres Reinot an...@re... * * Tyler Streeter tyl...@gm... * * Oleksandr Lozitskiy mr....@gm... * * All rights reserved. * * Web: opal.sourceforge.net * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file license-LGPL.txt. * * (2) The BSD-style license that is included with this library in * * the file license-BSD.txt. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * license-LGPL.txt and license-BSD.txt for more details. * * * *************************************************************************/ |