BoxDoubleSidedPlaneContact.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013-2015, SimQuest Solutions Inc.
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 #ifndef SURGSIM_COLLISION_BOXDOUBLESIDEDPLANECONTACT_H
17 #define SURGSIM_COLLISION_BOXDOUBLESIDEDPLANECONTACT_H
18 
19 #include <memory>
20 
22 #include "SurgSim/Math/BoxShape.h"
25 
26 namespace SurgSim
27 {
28 namespace Collision
29 {
30 
31 class CollisionPair;
32 
34 class BoxDoubleSidedPlaneContact : public ShapeShapeContactCalculation<Math::BoxShape, Math::DoubleSidedPlaneShape>
35 {
36 public:
38 
39  std::list<std::shared_ptr<Contact>> calculateDcdContact(
40  const SurgSim::Math::BoxShape& boxShape,
41  const SurgSim::Math::RigidTransform3d& boxPose,
42  const SurgSim::Math::DoubleSidedPlaneShape& planeShape,
43  const SurgSim::Math::RigidTransform3d& planePose) const override;
44 
45  std::pair<int, int> getShapeTypes() override;
46 };
47 
48 }; // namespace Collision
49 }; // namespace SurgSim
50 
51 #endif
SurgSim::Collision::BoxDoubleSidedPlaneContact
Class to calculate intersections between Boxes and Planes.
Definition: BoxDoubleSidedPlaneContact.h:35
ShapeShapeContactCalculation.h
BoxShape.h
SurgSim::Math::RigidTransform3d
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
SurgSim::Math::DoubleSidedPlaneShape
DoubleSidedPlaneShape: The XZ plane (d = 0) with normal pointing along positive Y axis.
Definition: DoubleSidedPlaneShape.h:32
SurgSim
Definition: CompoundShapeToGraphics.cpp:30
RigidTransform.h
Definitions of 2x2 and 3x3 rigid (isometric) transforms.
SurgSim::Collision::BoxDoubleSidedPlaneContact::getShapeTypes
std::pair< int, int > getShapeTypes() override
Virtual function that returns the shapes that this ContactCalculation class handles.
Definition: BoxDoubleSidedPlaneContact.cpp:34
DoubleSidedPlaneShape.h
SurgSim::Collision::ContactCalculation::calculateDcdContact
std::list< std::shared_ptr< Contact > > calculateDcdContact(const Math::PosedShape< std::shared_ptr< Math::Shape >> posedShape1, const Math::PosedShape< std::shared_ptr< Math::Shape >> posedShape2)
Calculate the dcd contacts between two posed/transformed shapes.
Definition: ContactCalculation.cpp:74
SurgSim::Collision::BoxDoubleSidedPlaneContact::calculateDcdContact
std::list< std::shared_ptr< Contact > > calculateDcdContact(const Math::PosedShape< std::shared_ptr< Math::Shape >> posedShape1, const Math::PosedShape< std::shared_ptr< Math::Shape >> posedShape2)
Calculate the dcd contacts between two posed/transformed shapes.
Definition: ContactCalculation.cpp:74
SurgSim::Math::BoxShape
Box shape: box centered on (0 0 0), aligned with the axis with different sizes along X,...
Definition: BoxShape.h:34
SurgSim::Collision::ShapeShapeContactCalculation
Class that can automate the type conversion and provides a consistent interface to the typed call Tak...
Definition: ShapeShapeContactCalculation.h:32