OSVR-Core
ParseArticulation.h
Go to the documentation of this file.
1 
11 // Copyright 2015 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_ParseArticulation_h_GUID_A3F32F4D_D900_46BB_027D_C45E437E1F8C
26 #define INCLUDED_ParseArticulation_h_GUID_A3F32F4D_D900_46BB_027D_C45E437E1F8C
27 
28 // Internal Includes
29 #include <osvr/Common/Export.h>
30 
31 // Library/third-party includes
32 #include <json/value.h>
33 
34 // Standard includes
35 #include <string>
36 
37 namespace osvr {
38 namespace common {
40  public:
42  OSVR_COMMON_EXPORT ParsedArticulation(std::string const &src);
43 
45  ParsedArticulation(Json::Value src);
46 
49  OSVR_COMMON_EXPORT bool isValid() const;
50 
53  OSVR_COMMON_EXPORT std::string getBoneName() const;
54 
57  OSVR_COMMON_EXPORT std::string getArticulationType() const;
58 
62  OSVR_COMMON_EXPORT std::string getTrackerPath() const;
63 
67  OSVR_COMMON_EXPORT void
68  setTrackerPath(std::string const &fullTrackerPath);
69 
70  private:
71  void m_parse(std::string const &src);
72  void m_parse(Json::Value &val);
73  std::string m_boneName;
74  std::string m_articulationType;
75  std::string m_trackerPath;
76  Json::Value m_value;
77  };
78 } // namespace common
79 } // namespace osvr
80 
81 #endif // INCLUDED_ParseArticulation_h_GUID_A3F32F4D_D900_46BB_027D_C45E437E1F8C
Handles spatial transformations.
Definition: SerializationTraitExample_Complicated.h:40
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
OSVR_COMMON_EXPORT void setTrackerPath(std::string const &fullTrackerPath)
Sets the tracker path.
Definition: ParseArticulation.cpp:63
OSVR_COMMON_EXPORT std::string getArticulationType() const
Get the type of articulation.
Definition: ParseArticulation.cpp:53
OSVR_COMMON_EXPORT ParsedArticulation(std::string const &src)
Constructor - performs parse and normalization of format.
Definition: ParseArticulation.cpp:37
OSVR_COMMON_EXPORT bool isValid() const
Will return false if trackerPath is not specified.
Definition: ParseArticulation.cpp:43
OSVR_COMMON_EXPORT std::string getTrackerPath() const
Get the tracker path to sensor that corresponds to current articulation.
Definition: ParseArticulation.cpp:58
OSVR_COMMON_EXPORT std::string getBoneName() const
Get the ultimate source/leaf of the articulation.
Definition: ParseArticulation.cpp:48
Definition: ParseArticulation.h:39