Quaternion.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T),
5  * Karlsruhe Institute of Technology (KIT), all rights reserved.
6  *
7  * ArmarX is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * ArmarX is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * @author Fabian Peller-Konrad (fabian dot peller-konrad at kit dot edu)
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 #pragma once
25 
26 // STD/STL
27 #include <map>
28 #include <string>
29 
30 // Base class
31 #include "../detail/NDArrayVariant.h"
32 
33 namespace armarx::aron::type
34 {
35  /**
36  * @brief The Qaternion class. It represents the quaternion type
37  * A Quaternion has dimension 1x4 and a varying type
38  */
39  class Quaternion : public detail::NDArrayVariant<type::dto::Quaternion, Quaternion>
40  {
41  public:
42  // constructors
43  Quaternion(const Path& path = Path());
44  Quaternion(const type::dto::Quaternion&, const Path& path);
45 
46  // public member functions
49 
51 
52  // virtual implementations
53  virtual std::string getShortName() const override;
54  virtual std::string getFullName() const override;
55 
56  static const std::map<quaternion::ElementType, std::string> Elementtype2String;
57  static const std::map<std::string, quaternion::ElementType> String2Elementtype;
58  };
59 } // namespace armarx::aron::type
armarx::aron::type::Quaternion::Quaternion
Quaternion(const Path &path=Path())
Definition: Quaternion.cpp:38
armarx::aron::type::Quaternion::getShortName
virtual std::string getShortName() const override
get a short name of this specific type
Definition: Quaternion.cpp:71
armarx::VariantType::Quaternion
const VariantTypeId Quaternion
Definition: Pose.h:39
armarx::aron::type::Quaternion
The Qaternion class.
Definition: Quaternion.h:39
armarx::aron::Path
The Path class.
Definition: Path.h:36
armarx::aron::type::Quaternion::Elementtype2String
static const std::map< quaternion::ElementType, std::string > Elementtype2String
Definition: Quaternion.h:56
armarx::aron::type::Quaternion::getFullName
virtual std::string getFullName() const override
get the full name of this specific type
Definition: Quaternion.cpp:77
armarx::aron::type::detail::NDArrayVariant
Definition: NDArrayVariant.h:39
armarx::aron::type::Quaternion::getElementType
type::quaternion::ElementType getElementType() const
Definition: Quaternion.cpp:58
armarx::aron::type
A convenience header to include all aron files (full include, not forward declared)
Definition: aron_conversions.cpp:9
armarx::ElementTypes::ElementType
ElementType
Definition: AbstractObjectSerializer.h:32
armarx::aron::type::Quaternion::String2Elementtype
static const std::map< std::string, quaternion::ElementType > String2Elementtype
Definition: Quaternion.h:57
armarx::aron::type::Quaternion::toQuaternionDTO
type::dto::QuaternionPtr toQuaternionDTO() const
Definition: Quaternion.cpp:52
armarx::armem::server::ltm::detail::mixin::Path
std::filesystem::path Path
Definition: DiskStorageMixin.h:17
armarx::aron::type::Variant::path
const Path path
Definition: Variant.h:139
armarx::aron::type::QuaternionPtr
std::shared_ptr< class Quaternion > QuaternionPtr
Definition: forward_declarations.h:21
armarx::aron::type::Quaternion::setElementType
void setElementType(type::quaternion::ElementType)
Definition: Quaternion.cpp:64