RigidLocalization.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, 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_PHYSICS_RIGIDLOCALIZATION_H
#define SURGSIM_PHYSICS_RIGIDLOCALIZATION_H
#include "SurgSim/Physics/Localization.h"
#include "SurgSim/Math/RigidTransform.h"
#include "SurgSim/Math/Vector.h"
namespace SurgSim
{
namespace Physics
{
class RigidLocalization: public Localization
{
public:
RigidLocalization();
explicit RigidLocalization(std::shared_ptr<Representation> representation);
virtual ~RigidLocalization();
void setLocalPosition(const SurgSim::Math::Vector3d& p);
const SurgSim::Math::Vector3d& getLocalPosition() const;
bool isValidRepresentation(std::shared_ptr<Representation> representation) override;
private:
SurgSim::Math::Vector3d doCalculatePosition(double time) const;
SurgSim::Math::Vector3d doCalculateVelocity(double time) const;
SurgSim::Math::Vector3d m_position;
};
}; // namespace Physics
}; // namespace SurgSim
#endif // SURGSIM_PHYSICS_RIGIDLOCALIZATION_H
SurgSim::Physics::RigidLocalization::doCalculatePosition
SurgSim::Math::Vector3d doCalculatePosition(double time) const
Calculates the global position of this localization.
Definition: RigidLocalization.cpp:52
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Physics::RigidLocalization::isValidRepresentation
bool isValidRepresentation(std::shared_ptr< Representation > representation) override
Query if &#39;representation&#39; is valid representation.
Definition: RigidLocalization.cpp:111
Localization.h
SurgSim::Physics::RigidLocalization::m_position
SurgSim::Math::Vector3d m_position
3D position in local coordinates.
Definition: RigidLocalization.h:67
SurgSim::Physics::RigidLocalization::RigidLocalization
RigidLocalization()
Default constructor.
Definition: RigidLocalization.cpp:24
SurgSim::Physics::RigidLocalization
This class implements the localization on a RigidRepresentationBase, as a local position.
Definition: RigidLocalization.h:31
RigidTransform.h
Definitions of 2x2 and 3x3 rigid (isometric) transforms.
Vector.h
Definitions of small fixed-size vector types.
SurgSim::Physics::RigidLocalization::setLocalPosition
void setLocalPosition(const SurgSim::Math::Vector3d &p)
Sets the local position.
Definition: RigidLocalization.cpp:42
SurgSim::Physics::RigidLocalization::~RigidLocalization
virtual ~RigidLocalization()
Destructor.
Definition: RigidLocalization.cpp:37
SurgSim::Physics::Localization
This class localize a point on a representation (representation specific)
Definition: Localization.h:39
SurgSim::Math::Vector3d
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
SurgSim::Physics::RigidLocalization::doCalculateVelocity
SurgSim::Math::Vector3d doCalculateVelocity(double time) const
Calculates the global velocity of this localization.
Definition: RigidLocalization.cpp:81
SurgSim::Physics::RigidLocalization::getLocalPosition
const SurgSim::Math::Vector3d & getLocalPosition() const
Gets the local position.
Definition: RigidLocalization.cpp:47