CompoundShapeContact.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_COMPOUNDSHAPECONTACT_H
#define SURGSIM_COLLISION_COMPOUNDSHAPECONTACT_H
#include "SurgSim/Collision/ContactCalculation.h"
namespace SurgSim
{
namespace Collision
{
class CompoundShapeContact : public ContactCalculation
{
public:
explicit CompoundShapeContact(const std::pair<int, int>& types);
protected:
std::pair<int, int> getShapeTypes() override;
std::list<std::shared_ptr<Contact>> doCalculateDcdContact(
const Math::PosedShape<std::shared_ptr<Math::Shape>>& posedShape1,
const Math::PosedShape<std::shared_ptr<Math::Shape>>& posedShape2) override;
std::list<std::shared_ptr<SurgSim::Collision::Contact>> doCalculateCcdContact(
const Math::PosedShapeMotion<std::shared_ptr<Math::Shape>>& shape1,
const Math::PosedShapeMotion<std::shared_ptr<Math::Shape>>& shape2) override;
std::pair<int, int> m_types;
};
}
}
#endif
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Collision::CompoundShapeContact
Definition: CompoundShapeContact.h:27
SurgSim::Collision::CompoundShapeContact::doCalculateCcdContact
std::list< std::shared_ptr< SurgSim::Collision::Contact > > doCalculateCcdContact(const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &shape1, const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &shape2) override
Virtual function receives the call from the public interface, usually will type the shapes statically...
Definition: CompoundShapeContact.cpp:79
SurgSim::Collision::CompoundShapeContact::doCalculateDcdContact
std::list< std::shared_ptr< Contact > > doCalculateDcdContact(const Math::PosedShape< std::shared_ptr< Math::Shape >> &posedShape1, const Math::PosedShape< std::shared_ptr< Math::Shape >> &posedShape2) override
Virtual function receives the call from the public interface, usually will type the shapes statically...
Definition: CompoundShapeContact.cpp:38
SurgSim::Collision::ContactCalculation
Base class responsible for calculating contact data between two objects.
Definition: ContactCalculation.h:41
SurgSim::Collision::CompoundShapeContact::getShapeTypes
std::pair< int, int > getShapeTypes() override
Virtual function that returns the shapes that this ContactCalculation class handles.
Definition: CompoundShapeContact.cpp:33
SurgSim::Math::PosedShape
PosedShape is a transformed shape with a record of the pose used to transform it. ...
Definition: Shape.h:117
SurgSim::Collision::CompoundShapeContact::CompoundShapeContact
CompoundShapeContact(const std::pair< int, int > &types)
Constructor.
Definition: CompoundShapeContact.cpp:28
SurgSim::Math::PosedShapeMotion
PosedShapeMotion is embedding the motion of a PosedShape, providing a posed shape at 2 different inst...
Definition: Shape.h:145
ContactCalculation.h
SurgSim::Collision::CompoundShapeContact::m_types
std::pair< int, int > m_types
Local shape types for this instance, these can be set to match the expected shapes.
Definition: CompoundShapeContact.h:45