SimbodyCollision.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef GAZEBO_PHYSICS_SIMBODY_SIMBODYCOLLISION_HH_
19 #define GAZEBO_PHYSICS_SIMBODY_SIMBODYCOLLISION_HH_
20 
21 #include <string>
22 
25 #include "gazebo/util/system.hh"
26 
27 namespace SimTK
28 {
29  class ContactGeometry;
30 }
31 
32 namespace gazebo
33 {
34  namespace physics
35  {
39 
41  class GZ_PHYSICS_VISIBLE SimbodyCollision : public Collision
42  {
44  public: explicit SimbodyCollision(LinkPtr _parent);
45 
47  public: virtual ~SimbodyCollision();
48 
49  // Documentation inherited
50  public: virtual void Load(sdf::ElementPtr _ptr);
51 
52  // Documentation inherited
53  public: virtual void OnPoseChange();
54 
55  // Documentation inherited
56  public: virtual void SetCategoryBits(unsigned int _bits);
57 
58  // Documentation inherited
59  public: virtual void SetCollideBits(unsigned int _bits);
60 
61  // Documentation inherited
62  public: virtual ignition::math::AxisAlignedBox BoundingBox() const;
63 
67  public: void SetCollisionShape(SimTK::ContactGeometry *_shape);
68 
71  public: SimTK::ContactGeometry *GetCollisionShape() const;
72 
74  private: SimTK::ContactGeometry *collisionShape;
75  };
77  }
78 }
79 #endif
Base class for all collision entities.
Definition: Collision.hh:38
Forward declarations for the common classes.
Definition: Animation.hh:26
virtual void SetCollideBits(unsigned int _bits)
Set the collide bits, used during collision detection.
Definition: SimbodyCollision.hh:27
default namespace for gazebo
virtual ~SimbodyCollision()
Destructor.
SimTK::ContactGeometry * GetCollisionShape() const
Get the simbody collision shape.
virtual ignition::math::AxisAlignedBox BoundingBox() const
Get the bounding box for this collision.
virtual void Load(sdf::ElementPtr _ptr)
Load the collision.
void SetCollisionShape(SimTK::ContactGeometry *_shape)
Set the collision shape.
virtual void OnPoseChange()
This function is called when the entity's (or one of its parents) pose of the parent has changed.
virtual void SetCategoryBits(unsigned int _bits)
Set the category bits, used during collision detection.
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:110
SimbodyCollision(LinkPtr _parent)
Constructor.
Simbody collisions.
Definition: SimbodyCollision.hh:41