17 #ifndef GAZEBO_PHYSICS_BULLET_BULLETTYPES_HH_
18 #define GAZEBO_PHYSICS_BULLET_BULLETTYPES_HH_
20 #include <boost/shared_ptr.hpp>
21 #include <ignition/math/Vector4.hh>
37 class BulletCollision;
39 class BulletMotionState;
66 #pragma GCC diagnostic push
67 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
71 #pragma GCC diagnostic pop
81 return ignition::math::Vector3d(
82 _bt.getX(), _bt.getY(), _bt.getZ());
93 #pragma GCC diagnostic push
94 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
96 return btVector3(_vec.x, _vec.y, _vec.z);
98 #pragma GCC diagnostic pop
106 const ignition::math::Vector3d &_vec)
108 return btVector3(_vec.X(), _vec.Y(), _vec.Z());
119 #pragma GCC diagnostic push
120 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
122 return ConvertVector4dIgn(_bt);
124 #pragma GCC diagnostic pop
132 const btVector4 &_bt)
134 return ignition::math::Vector4d(_bt.getX(), _bt.getY(),
135 _bt.getZ(), _bt.getW());
146 #pragma GCC diagnostic push
147 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
149 return ConvertVector4dIgn(_vec.Ign());
151 #pragma GCC diagnostic pop
159 const ignition::math::Vector4d &_vec)
161 return btVector4(_vec.X(), _vec.Y(), _vec.Z(), _vec.W());
168 const btTransform &_bt)
170 ignition::math::Pose3d pose;
171 pose.Pos() = ConvertVector3Ign(_bt.getOrigin());
172 pose.Rot().W() = _bt.getRotation().getW();
173 pose.Rot().X() = _bt.getRotation().getX();
174 pose.Rot().Y() = _bt.getRotation().getY();
175 pose.Rot().Z() = _bt.getRotation().getZ();
187 #pragma GCC diagnostic push
188 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
190 return ConvertPoseIgn(_bt);
192 #pragma GCC diagnostic pop
204 #pragma GCC diagnostic push
205 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
207 return ConvertPose(_pose.Ign());
209 #pragma GCC diagnostic pop
217 const ignition::math::Pose3d &_pose)
221 trans.setOrigin(ConvertVector3(_pose.Pos()));
222 trans.setRotation(btQuaternion(_pose.Rot().X(), _pose.Rot().Y(),
223 _pose.Rot().Z(), _pose.Rot().W()));
boost::shared_ptr< BulletSurfaceParams > BulletSurfaceParamsPtr
Definition: BulletTypes.hh:49
static btTransform ConvertPose(const ignition::math::Pose3d &_pose)
Convert an ignition math pose to a bullet transform.
Definition: BulletTypes.hh:216
boost::shared_ptr< BulletMotionState > BulletMotionStatePtr
Definition: BulletTypes.hh:46
static btVector4 ConvertVector4dIgn(const ignition::math::Vector4d &_vec)
Convert an ignition math Vector4d to a bullet btVector4.
Definition: BulletTypes.hh:158
Encapsulates a position and rotation in three space.
Definition: Pose.hh:42
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
static btVector4 ConvertVector4(const math::Vector4 &_vec) GAZEBO_DEPRECATED(8.0)
Convert a gazebo Vector4 to a bullet btVector4.
Definition: BulletTypes.hh:142
static math::Vector4 ConvertVector4(const btVector4 &_bt) GAZEBO_DEPRECATED(8.0)
Convert a bullet btVector4 to a gazebo Vector4.
Definition: BulletTypes.hh:115
Bullet surface parameters.
Definition: BulletSurfaceParams.hh:35
boost::shared_ptr< BulletCollision > BulletCollisionPtr
Definition: BulletTypes.hh:42
static math::Vector3 ConvertVector3(const btVector3 &_bt) GAZEBO_DEPRECATED(8.0)
Convert a bullet btVector3 to a gazebo Vector3.
Definition: BulletTypes.hh:62
double Generic x, y, z, w vector
Definition: Vector4.hh:41
static btVector3 ConvertVector3(const math::Vector3 &_vec) GAZEBO_DEPRECATED(8.0)
Convert a gazebo Vector3 to a bullet btVector3.
Definition: BulletTypes.hh:89
static ignition::math::Pose3d ConvertPoseIgn(const btTransform &_bt)
Convert a bullet transform to an ignition math pose.
Definition: BulletTypes.hh:167
boost::shared_ptr< BulletPhysics > BulletPhysicsPtr
Definition: BulletTypes.hh:47
static ignition::math::Vector3d ConvertVector3Ign(const btVector3 &_bt)
Convert a bullet btVector3 to an ignition Vector3d.
Definition: BulletTypes.hh:78
static ignition::math::Vector4d ConvertVector4dIgn(const btVector4 &_bt)
Convert a bullet btVector4 to an ignition math Vector4d.
Definition: BulletTypes.hh:131
static btTransform ConvertPose(const math::Pose &_pose) GAZEBO_DEPRECATED(8.0)
Convert a gazebo pose to a bullet transform.
Definition: BulletTypes.hh:200
boost::shared_ptr< BulletLink > BulletLinkPtr
Definition: BulletTypes.hh:45
A set of functions for converting between the math types used by gazebo and bullet.
Definition: BulletTypes.hh:57
static math::Pose ConvertPose(const btTransform &_bt) GAZEBO_DEPRECATED(8.0)
Convert a bullet transform to a gazebo pose.
Definition: BulletTypes.hh:183
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
static btVector3 ConvertVector3(const ignition::math::Vector3d &_vec)
Convert an ignition Vector3d to a bullet btVector3.
Definition: BulletTypes.hh:105
boost::shared_ptr< BulletRayShape > BulletRayShapePtr
Definition: BulletTypes.hh:48