RandomSpherePointGenerator.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_PARTICLES_RANDOMSPHEREPOINTGENERATOR_H
17 #define SURGSIM_PARTICLES_RANDOMSPHEREPOINTGENERATOR_H
18 
19 #include "SurgSim/Math/Vector.h"
21 
22 namespace SurgSim
23 {
24 
25 namespace Math
26 {
27 class Shape;
28 }
29 
30 namespace Particles
31 {
32 
35 {
36 public:
39 
40  SurgSim::Math::Vector3d pointInShape(std::shared_ptr<SurgSim::Math::Shape> shape) override;
41  SurgSim::Math::Vector3d pointOnShape(std::shared_ptr<SurgSim::Math::Shape> shape) override;
42 };
43 
44 }; // namespace Particles
45 }; // namespace SurgSim
46 
47 #endif // SURGSIM_PARTICLES_RANDOMSPHEREPOINTGENERATOR_H
SurgSim::Particles::RandomSpherePointGenerator::pointOnShape
SurgSim::Math::Vector3d pointOnShape(std::shared_ptr< SurgSim::Math::Shape > shape) override
Generates one point on the surface of the given shape.
Definition: RandomSpherePointGenerator.cpp:40
Vector.h
SurgSim::Math::Vector3d
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Particles::RandomSpherePointGenerator::~RandomSpherePointGenerator
virtual ~RandomSpherePointGenerator()
Destructor.
Definition: RandomSpherePointGenerator.cpp:26
SurgSim::Particles::PointGenerator
PointGenerator is used to generate points inside or on the surface of a given shape.
Definition: PointGenerator.h:37
SurgSim::Particles::RandomSpherePointGenerator::pointInShape
SurgSim::Math::Vector3d pointInShape(std::shared_ptr< SurgSim::Math::Shape > shape) override
Generates one point inside the given shape.
Definition: RandomSpherePointGenerator.cpp:30
SurgSim::Particles::Particles
DataStructures::Vertices< ParticleData > Particles
Definition: Particles.h:53
PointGenerator.h
SurgSim::Particles::RandomSpherePointGenerator
Class to generate points inside or on the surface of a sphere.
Definition: RandomSpherePointGenerator.h:34