DoubleSidedPlaneShape.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_MATH_DOUBLESIDEDPLANESHAPE_H
17 #define SURGSIM_MATH_DOUBLESIDEDPLANESHAPE_H
18 
20 #include "SurgSim/Math/Shape.h"
21 
22 namespace SurgSim
23 {
24 
25 namespace Math
26 {
27 SURGSIM_STATIC_REGISTRATION(DoubleSidedPlaneShape);
28 
32 {
33 public:
36 
38 
40  virtual int getType() override;
41 
44  virtual double getVolume() const override;
45 
48  virtual Vector3d getCenter() const override;
49 
53  virtual Matrix33d getSecondMomentOfVolume() const override;
54 
57  double getD() const;
58 
61  Vector3d getNormal() const;
62 
65  virtual bool isValid() const override;
66 };
67 
68 }; // Math
69 }; // SurgSim
70 
71 #endif // SURGSIM_MATH_DOUBLESIDEDPLANESHAPE_H
virtual Matrix33d getSecondMomentOfVolume() const override
Get the second central moment of the volume, commonly used to calculate the moment of inertia matrix...
Definition: DoubleSidedPlaneShape.cpp:43
Definition: DriveElementFromInputBehavior.cpp:27
SURGSIM_STATIC_REGISTRATION(BoxShape)
::SurgSim::Math::Vector3d Vector3d
Definition: Shape.h:62
virtual int getType() override
Definition: DoubleSidedPlaneShape.cpp:28
double getD() const
Gets the d of the plane equation.
Definition: DoubleSidedPlaneShape.cpp:48
virtual double getVolume() const override
Get the volume of the shape.
Definition: DoubleSidedPlaneShape.cpp:33
SURGSIM_CLASSNAME(SurgSim::Math::DoubleSidedPlaneShape)
DoubleSidedPlaneShape()
Constructor.
Definition: DoubleSidedPlaneShape.cpp:24
::SurgSim::Math::Matrix33d Matrix33d
Definition: Shape.h:63
Vector3d getNormal() const
Gets the normal of the plane equation.
Definition: DoubleSidedPlaneShape.cpp:53
DoubleSidedPlaneShape: The XZ plane (d = 0) with normal pointing along positive Y axis...
Definition: DoubleSidedPlaneShape.h:31
virtual bool isValid() const override
A DoubleSidedPlaneShape is always valid.
Definition: DoubleSidedPlaneShape.cpp:58
Generic rigid shape class defining a shape.
Definition: Shape.h:59
virtual Vector3d getCenter() const override
Get the volumetric center of the shape.
Definition: DoubleSidedPlaneShape.cpp:38