OSVR-Core
JSONTransformVisitor.h
Go to the documentation of this file.
1 
11 // Copyright 2014 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_JSONTransformVisitor_h_GUID_35872365_9953_479F_C548_86F8BDAE030B
26 #define INCLUDED_JSONTransformVisitor_h_GUID_35872365_9953_479F_C548_86F8BDAE030B
27 
28 // Internal Includes
29 #include <osvr/Common/Export.h>
30 #include <osvr/Util/UniquePtr.h>
31 #include <osvr/Common/Transform.h>
32 
33 // Library/third-party includes
35 #include <json/value.h>
36 
37 // Standard includes
38 #include <string>
39 
40 namespace osvr {
41 namespace common {
42  class JSONTransformData;
44  public:
47  OSVR_COMMON_EXPORT JSONTransformVisitor(Json::Value const &root);
48  OSVR_COMMON_EXPORT ~JSONTransformVisitor();
49 
50  OSVR_COMMON_EXPORT Transform const &getTransform() const;
51 
52  OSVR_COMMON_EXPORT Json::Value const &getLeaf() const;
53 
54  private:
55  Transform m_transform;
56  Json::Value m_leaf;
57  };
58 } // namespace common
59 } // namespace osvr
60 
61 #endif // INCLUDED_JSONTransformVisitor_h_GUID_35872365_9953_479F_C548_86F8BDAE030B
Handles spatial transformations.
Definition: SerializationTraitExample_Complicated.h:40
Header.
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Header wrapping include of <Eigen/Core> and <Eigen/Geometry> for warning quieting.
Header to bring unique_ptr into the osvr namespace.
OSVR_COMMON_EXPORT JSONTransformVisitor(Json::Value const &root)
Parses json describing a transformation to compute the overall transformation.
Definition: JSONTransformVisitor.cpp:172
Definition: JSONTransformVisitor.h:43
Spatial transformation, consisting of both pre and post components.
Definition: Transform.h:44