Geometry.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Rhys Mainwaring
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 */
17 
21 
22 #ifndef _WAVE_GAZEBO_PLUGINS_GEOMETRY_HH_
23 #define _WAVE_GAZEBO_PLUGINS_GEOMETRY_HH_
24 
25 #include <ignition/math/Vector2.hh>
26 #include <ignition/math/Vector3.hh>
27 
28 namespace asv
29 {
31 // Geometry
32 
34  class Geometry
35  {
40  public: static ignition::math::Vector2d
41  Normalize(const ignition::math::Vector2d& _v);
42 
47  public: static ignition::math::Vector3d
48  Normalize(const ignition::math::Vector3d& _v);
49 
57  public: static ignition::math::Vector3d Normal(
58  const ignition::math::Vector3d& _v0,
59  const ignition::math::Vector3d& _v1,
60  const ignition::math::Vector3d& _v2);
61  };
62 }
63 
64 #endif // _WAVE_GAZEBO_PLUGINS_GEOMETRY_HH_
static ignition::math::Vector3d Normal(const ignition::math::Vector3d &_v0, const ignition::math::Vector3d &_v1, const ignition::math::Vector3d &_v2)
Compute the (normalised) normal to the plane defined by a triangle.
Definition: Geometry.cc:77
static ignition::math::Vector2d Normalize(const ignition::math::Vector2d &_v)
Normalise a Vector2 (i.e. ensure it has unit length)
Definition: Geometry.cc:58
A collection of static methods concerning linear geometry.
Definition: Geometry.hh:34
Definition: Geometry.hh:28


wave_gazebo_plugins
Author(s): Rhys Mainwaring
autogenerated on Thu May 7 2020 03:54:44