PlaneShape.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_MATH_PLANESHAPE_H
#define SURGSIM_MATH_PLANESHAPE_H
#include "SurgSim/Framework/ObjectFactory.h"
#include "SurgSim/Math/Shape.h"
namespace SurgSim
{
namespace Math
{
SURGSIM_STATIC_REGISTRATION(PlaneShape);
class PlaneShape: public Shape
{
public:
PlaneShape();
SURGSIM_CLASSNAME(SurgSim::Math::PlaneShape);
int getType() const override;
double getVolume() const override;
Vector3d getCenter() const override;
Matrix33d getSecondMomentOfVolume() const override;
double getD() const;
Vector3d getNormal() const;
bool isValid() const override;
};
}; // Math
}; // SurgSim
#endif // SURGSIM_MATH_PLANESHAPE_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Math::PlaneShape::getVolume
double getVolume() const override
Get the volume of the shape.
Definition: PlaneShape.cpp:33
SurgSim::Math::PlaneShape::getSecondMomentOfVolume
Matrix33d getSecondMomentOfVolume() const override
Get the second central moment of the volume, commonly used to calculate the moment of inertia matrix...
Definition: PlaneShape.cpp:43
SurgSim::Math::PlaneShape::getCenter
Vector3d getCenter() const override
Get the volumetric center of the shape.
Definition: PlaneShape.cpp:38
SurgSim::Math::Shape::Vector3d
::SurgSim::Math::Vector3d Vector3d
Definition: Shape.h:68
ObjectFactory.h
SurgSim::Math::PlaneShape::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Math::PlaneShape)
SurgSim::Math::PlaneShape::isValid
bool isValid() const override
A PlaneShape is always valid.
Definition: PlaneShape.cpp:58
SurgSim::Math::PlaneShape::getD
double getD() const
Gets the d of the plane equation.
Definition: PlaneShape.cpp:48
SurgSim::Math::Shape::Matrix33d
::SurgSim::Math::Matrix33d Matrix33d
Definition: Shape.h:69
SurgSim::Math::PlaneShape::getNormal
Vector3d getNormal() const
Gets the normal of the plane equation.
Definition: PlaneShape.cpp:53
SurgSim::Math::PlaneShape
The XZ plane (d = 0) with normal pointing along positive Y axis.
Definition: PlaneShape.h:36
Shape.h
SurgSim::Math::PlaneShape::PlaneShape
PlaneShape()
Constructor: No members to initialize.
Definition: PlaneShape.cpp:24
SurgSim::Math::Shape
Generic rigid shape class defining a shape.
Definition: Shape.h:65
SurgSim::Math::PlaneShape::getType
int getType() const override
Definition: PlaneShape.cpp:28