OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::common::GeneralizedTransform Class Reference

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

#include <osvr/Common/GeneralizedTransform.h>

Inheritance diagram for osvr::common::GeneralizedTransform:

Public Member Functions

 GeneralizedTransform ()
 Empty transformation.
 
 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.
 
void nest (Json::Value const &transform)
 Process the given transform as "inner" to any existing transform. More...
 
void wrap (Json::Value const &transform)
 Wrap a single new layer of transform around the existing ones, if any.
 
bool empty () const
 Is this an empty transform?
 
Json::Value get () const
 Get a "reconstituted" version of the transformation.
 
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().

Definition at line 45 of file GeneralizedTransform.h.

Member Function Documentation

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

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

We only nest objects, sorry.

Definition at line 42 of file GeneralizedTransform.cpp.

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()

Definition at line 67 of file GeneralizedTransform.cpp.


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