TriangleMeshTriangleMeshContact.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013-2015, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_COLLISION_TRIANGLEMESHTRIANGLEMESHCONTACT_H
#define SURGSIM_COLLISION_TRIANGLEMESHTRIANGLEMESHCONTACT_H
#include <memory>
#include "SurgSim/Collision/ShapeShapeContactCalculation.h"
#include "SurgSim/Math/MeshShape.h"
namespace SurgSim
{
namespace Collision
{
class CollisionPair;
class TriangleMeshTriangleMeshContact : public ShapeShapeContactCalculation<Math::MeshShape, Math::MeshShape>
{
public:
using ContactCalculation::calculateDcdContact;
std::list<std::shared_ptr<Contact>> calculateDcdContact(
const Math::MeshShape& mesh1,
const Math::RigidTransform3d& mesh1Pose,
const Math::MeshShape& mesh2,
const Math::RigidTransform3d& mesh2Pose) const override;
std::pair<int, int> getShapeTypes() override;
};
}; // namespace Collision
}; // namespace SurgSim
#endif // SURGSIM_COLLISION_TRIANGLEMESHTRIANGLEMESHCONTACT_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
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::Math::MeshShape
Mesh shape: shape made of a triangle mesh The triangle mesh needs to be watertight to produce valid v...
Definition: MeshShape.h:54
SurgSim::Collision::ShapeShapeContactCalculation
Class that can automate the type conversion and provides a consistent interface to the typed call Tak...
Definition: ShapeShapeContactCalculation.h:31
SurgSim::Collision::TriangleMeshTriangleMeshContact::calculateDcdContact
std::list< std::shared_ptr< Contact > > calculateDcdContact(const Math::MeshShape &mesh1, const Math::RigidTransform3d &mesh1Pose, const Math::MeshShape &mesh2, const Math::RigidTransform3d &mesh2Pose) const override
Definition: TriangleMeshTriangleMeshContact.cpp:139
MeshShape.h
SurgSim::Math::RigidTransform3d
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
ShapeShapeContactCalculation.h
SurgSim::Collision::TriangleMeshTriangleMeshContact::getShapeTypes
std::pair< int, int > getShapeTypes() override
Virtual function that returns the shapes that this ContactCalculation class handles.
Definition: TriangleMeshTriangleMeshContact.cpp:39
SurgSim::Collision::TriangleMeshTriangleMeshContact
Class to calculate intersections between a triangle mesh and a triangle mesh.
Definition: TriangleMeshTriangleMeshContact.h:33