OSVR-Core
Public Member Functions | List of all members
osvr::common::GeneralizedTransform Class Reference

Container for easy manipulation of nested transforms. More...

#include <GeneralizedTransform.h>

Inheritance diagram for osvr::common::GeneralizedTransform:

Public Member Functions

OSVR_COMMON_EXPORT GeneralizedTransform ()
 Empty transformation.
 
OSVR_COMMON_EXPORT GeneralizedTransform (Json::Value const &transform)
 Construct from a normalized alias/transform as Json. More...
 
OSVR_COMMON_EXPORT void nest (Json::Value const &transform)
 Process the given transform as "inner" to any existing transform. More...
 
OSVR_COMMON_EXPORT void wrap (Json::Value const &transform)
 Wrap a single new layer of transform around the existing ones, if any. More...
 
OSVR_COMMON_EXPORT bool empty () const
 Is this an empty transform?
 
OSVR_COMMON_EXPORT Json::Value get () const
 Get a "reconstituted" version of the transformation.
 
OSVR_COMMON_EXPORT Json::Value get (std::string const &leaf) const
 Get the reconstituted transformation with the specified leaf as the final child. More...
 
void resize (const_iterator newEnd)
 A shrinking resize.
 

Detailed Description

Container for easy manipulation of nested transforms.

Stores the levels of the transform in outer-inner order, with the "child" key/value removed and only re-created in get().

Constructor & Destructor Documentation

§ GeneralizedTransform()

osvr::common::GeneralizedTransform::GeneralizedTransform ( Json::Value const &  transform)

Construct from a normalized alias/transform as Json.

Must be one or more levels of nested objects (under the "child" key) with other arbitrary data in the object describing the transformation taking place at that level.

Member Function Documentation

§ get()

Json::Value osvr::common::GeneralizedTransform::get ( std::string const &  leaf) const

Get the reconstituted transformation with the specified leaf as the final child.

If leaf is empty, behaves like get()

§ nest()

void osvr::common::GeneralizedTransform::nest ( Json::Value const &  transform)

Process the given transform as "inner" to any existing transform.

We only nest objects, sorry.

§ wrap()

void osvr::common::GeneralizedTransform::wrap ( Json::Value const &  transform)

Wrap a single new layer of transform around the existing ones, if any.


The documentation for this class was generated from the following files: