OctreeCapsuleContact.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_OCTREECAPSULECONTACT_H
#define SURGSIM_COLLISION_OCTREECAPSULECONTACT_H
#include "SurgSim/Collision/BoxCapsuleContact.h"
#include "SurgSim/Collision/OctreeContact.h"
namespace SurgSim
{
namespace Collision
{
class OctreeCapsuleContact : public OctreeContact
{
public:
std::pair<int, int> getShapeTypes() override;
protected:
std::list<std::shared_ptr<Contact>> boxContactCalculation(const SurgSim::Math::BoxShape& boxShape,
const SurgSim::Math::RigidTransform3d& boxPose, const SurgSim::Math::Shape& otherShape,
const SurgSim::Math::RigidTransform3d& otherPose) override;
private:
BoxCapsuleContact m_calculator;
};
};
};
#endif //SURGSIM_COLLISION_OCTREECAPSULECONTACT_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
BoxCapsuleContact.h
SurgSim::Math::BoxShape
Box shape: box centered on (0 0 0), aligned with the axis with different sizes along X...
Definition: BoxShape.h:33
SurgSim::Collision::OctreeContact
Abstract base class to calculate intersections between an Octree and other shapes.
Definition: OctreeContact.h:38
OctreeContact.h
SurgSim::Collision::OctreeCapsuleContact::getShapeTypes
std::pair< int, int > getShapeTypes() override
Virtual function that returns the shapes that this ContactCalculation class handles.
Definition: OctreeCapsuleContact.cpp:26
SurgSim::Collision::BoxCapsuleContact
Class to calculate intersections between Boxes and Capsules.
Definition: BoxCapsuleContact.h:32
SurgSim::Collision::OctreeCapsuleContact
Definition: OctreeCapsuleContact.h:27
SurgSim::Math::RigidTransform3d
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
SurgSim::Collision::OctreeCapsuleContact::boxContactCalculation
std::list< std::shared_ptr< Contact > > boxContactCalculation(const SurgSim::Math::BoxShape &boxShape, const SurgSim::Math::RigidTransform3d &boxPose, const SurgSim::Math::Shape &otherShape, const SurgSim::Math::RigidTransform3d &otherPose) override
Do the calculation between an octree node (BoxShape) and the other shape.
Definition: OctreeCapsuleContact.cpp:31
SurgSim::Math::Shape
Generic rigid shape class defining a shape.
Definition: Shape.h:65
SurgSim::Collision::OctreeCapsuleContact::m_calculator
BoxCapsuleContact m_calculator
Definition: OctreeCapsuleContact.h:38