The Util library: Functionality not necessarily coupled to any particular core library, serving more as a common base layer behind all systems.
More...
|
| class | AlignedAllocDeleter |
| | Deleter class matching alignedAlloc. More...
|
| |
| class | AnyMap |
| | A data structure storing "any" by name, to reduce coupling. More...
|
| |
| class | BasicKeyedOwnershipContainer |
| | Holds on to smart pointers by value, and lets you free them by providing the corresponding void *. More...
|
| |
| class | CallbackWrapper |
| | A class template turning a callback with some number of arguments, with a userdata pointer last, into a function object. More...
|
| |
| class | CellGroupProxy |
| | A class that exists to make it easier to output composite data structures to CSV. More...
|
| |
| struct | Conditional |
| | Quick C++11-aligned conditional (if/then/elese) implementation. More...
|
| |
| struct | Conditional< false, Then, Else > |
| |
| class | CSV |
| | The "traditional" CSV class: get all your data set up ahead of time. More...
|
| |
| class | CSVBase |
| | (Base) Class for easily outputting CSV files. More...
|
| |
| class | DefaultBool |
| | A class template primarily useful for flags, that has a defined value at default initialization. More...
|
| |
| class | Deletable |
| | Base class for objects that just need to be generically deletable. More...
|
| |
| class | DummyGuard |
| |
| struct | EnableIf |
| | Quick C++11-aligned enable_if implementation. More...
|
| |
| struct | EnableIf< true, T > |
| |
| class | FinalTask |
| | Allows you to run a callable something at the end of a scope. More...
|
| |
| class | Flag |
| | A class that lightly wraps a bool, in order to provide easier maintenance of a "dirty" flag, for example, with sensible default initialization and no short-circuiting. More...
|
| |
| class | GuardInterface |
| | An interface to a (deferred) guard class: after instantiation and lock returning true, some resource is locked and available until destruction. More...
|
| |
| struct | HashIdAggregate |
| | Template specialized for common aggregates of TypeSafeIds, with the intent that you can simply open namespace std and derive your specialization of struct hash from this. More...
|
| |
| struct | HashIdAggregate< std::pair< TypeSafeId< FirstTag >, TypeSafeId< SecondTag > > > |
| |
| class | IndentingStream |
| | A boost::iostreams::filtering_ostream with a constructor that automatically sets it up to indent the first character after a newline the given number of spaces and forward the output to a std::ostream. More...
|
| |
| class | MultipleReferenceOwnershipPolicy |
| |
| class | NumberTypeData |
| | Runtime data on numeric types. More...
|
| |
| class | PointerWrapper |
| | A wrapper to easily define structures that exist just to hold a pointer. More...
|
| |
| class | Rect |
| |
| class | ResourcePath |
| | Class representing a host and resource path in the OSVR logical system. More...
|
| |
| class | SingleOwnershipPolicy |
| |
| class | StreamCSV |
| | A CSV object taking a reference to an ostream that should remain valid throughout the entire lifetime of this object. More...
|
| |
| class | StringBufferBuilder |
| | A utility class to adapt APIs that first provide a length, then place a string in a user-allocated buffer, to nearly transparently handle the buffer and convert into a std::string. More...
|
| |
| class | TypeSafeId |
| |
| class | TypeSafeIdBase |
| | A generic typesafe (as long as you use differing tag types) wrapper for identifiers (typically integers). More...
|
| |
| class | TypeSafeIdRefAccessorBase |
| |
| class | UniqueContainer |
| | A "Unique Container" designed for composition, not inheritance. More...
|
| |
| class | UniqueContainerBase |
| | A policy-based generic "Unique Container", that wraps ContainerWrapper (and thus an underlying container) with set-like semantics/invariant: at most one instance of a value is in the container at a time. More...
|
| |
| class | ValueOrRange |
| | Class providing a unified container-like interface to either a single value or a range of integers. More...
|
| |
|
|
using | AlignedPtr = unique_ptr< void, AlignedAllocDeleter > |
| |
|
using | AlignedImageBufferPtr = unique_ptr< OSVR_ImageBufferElement, AlignedAllocDeleter > |
| |
|
template<typename System , typename Y = double> |
| using | AngleGeneric = boost::units::quantity< boost::units::unit< boost::units::plane_angle_dimension, System >, Y > |
| | Convenience template alias for a plane_angle quantity in an arbitrary system with arbitrary scalar.
|
| |
|
template<typename Y > |
| using | AngleRadians = boost::units::quantity< boost::units::si::plane_angle, Y > |
| | Alias for an angle in radians with arbitrary scalar type.
|
| |
|
template<typename Y > |
| using | AngleDegrees = boost::units::quantity< boost::units::degree::plane_angle, Y > |
| | Alias for an angle in degrees with arbitrary scalar type.
|
| |
|
typedef AngleRadians< double > | AngleRadiansd |
| |
|
typedef AngleDegrees< double > | AngleDegreesd |
| |
|
typedef AngleRadiansd | Angle |
| | Default angle type.
|
| |
| template<typename Container , typename... Args> |
| using | ContainerWrapper = detail::ContainerWrapper_t< Container, Args... > |
| | Parent class to inherit from to get a container with some functionality exposed. More...
|
| |
|
using | ColMatrix44d = Eigen::Matrix4d |
| |
|
using | ColVector3d = Eigen::Vector3d |
| |
|
using | ColVector4d = Eigen::Vector4d |
| |
|
using | RowMatrix44d = Eigen::Matrix< double, 4, 4, Eigen::RowMajor > |
| |
|
template<typename Scalar > |
| using | Isometry3 = Eigen::Transform< Scalar, 3, Eigen::Isometry > |
| |
|
template<typename Scalar > |
| using | Translation3 = Eigen::Translation< Scalar, 3 > |
| |
|
typedef unique_ptr< util::GuardInterface > | GuardPtr |
| |
|
typedef BasicKeyedOwnershipContainer< SingleOwnershipPolicy > | KeyedOwnershipContainer |
| |
|
typedef BasicKeyedOwnershipContainer< MultipleReferenceOwnershipPolicy > | MultipleKeyedOwnershipContainer |
| |
|
typedef Rect | Rectd |
| |
| template<std::size_t minBytes, bool isSigned = false> |
| using | sized_int_t = typename detail::sized_int< minBytes, isSigned >::type |
| | Alias providing an integer type (signed or unsigned, your choice) containing at least as many bytes as you requested. More...
|
| |
|
typedef shared_ptr< Deletable > | DeletablePtr |
| | Shared-ownership smart pointer to a Deletable.
|
| |
|
typedef ::std::vector< DeletablePtr > | DeletableList |
| | Vector of shared-ownership smart pointers.
|
| |
|
typedef TypeSafeId< LocalStringIdTag > | StringID |
| |
|
typedef TypeSafeId< PeerStringIdTag > | PeerStringID |
| |
|
| void * | alignedAlloc (size_t bytes, size_t alignment=OSVR_DEFAULT_ALIGN_SIZE) |
| | Aligned allocation function, gives a pointer to a block of memory aligned to a memory boundary. More...
|
| |
| void | alignedFree (void *p) |
| | Aligned deallocation function, uses the pointer to the original memory block to deallocate it. More...
|
| |
|
AlignedPtr | makeAlignedBuffer (size_t bytes, size_t alignment=OSVR_DEFAULT_ALIGN_SIZE) |
| |
|
AlignedImageBufferPtr | makeAlignedImageBuffer (size_t bytes, size_t alignment=OSVR_DEFAULT_ALIGN_SIZE) |
| |
|
template<typename System , typename Y > |
| Y | getRadians (AngleGeneric< System, Y > const angle) |
| | Get the raw scalar value of your angle in radians.
|
| |
|
template<typename System , typename Y > |
| Y | getDegrees (AngleGeneric< System, Y > const angle) |
| | Get the raw scalar value of your angle in degrees.
|
| |
| OSVR_UTIL_EXPORT std::string | getBinaryLocation () |
| | Get this binary's location, often as a step in finding the "root" and search paths. More...
|
| |
|
template<typename T > |
| detail::Cell< T > | cell (const char *header, T const &data) |
| | Helper free function to make a CSV cell.
|
| |
|
template<typename T > |
| detail::Cell< T > | cell (std::string const &header, T const &data) |
| | Helper free function to make a CSV cell.
|
| |
| template<typename RowProxyType , typename GroupTag , typename... CellArgs> |
| CellGroupProxy< RowProxyType, GroupTag > & | operator<< (CellGroupProxy< RowProxyType, GroupTag > &group, detail::Cell< CellArgs... > &¤tCell) |
| | Handles user results from overloading operator<<(CellGroupProxy<RowProxyType, GroupTag> &group, TheirThing) and sending in cell calls within it. More...
|
| |
|
template<typename T > |
| detail::CellGroup< T > | cellGroup (const char *groupHeader, T const &data) |
| | Helper function to create a cell group with a group header prefix.
|
| |
|
template<typename T > |
| detail::CellGroup< T, std::string > | cellGroup (std::string const &groupHeader, T const &data) |
| | Helper function to create a cell group with a group header prefix.
|
| |
| template<typename Tag , typename T > |
| detail::CellGroup< T, const char *, Tag > | cellGroup (const char *groupHeader, T const &data, Tag *=static_cast< Tag *>(nullptr)) |
| | Helper function to create a cell group with a group header prefix and explicit (non-default) tag. More...
|
| |
| template<typename Tag , typename T > |
| detail::CellGroup< T, std::string, Tag > | cellGroup (std::string const &groupHeader, T const &data, Tag *=static_cast< Tag *>(nullptr)) |
| | Helper function to create a cell group with a group header prefix and explicit (non-default) tag. More...
|
| |
|
template<typename T > |
| detail::CellGroup< T > | cellGroup (T const &data) |
| | Helper function to create a cell group with no group header prefix - warning: column headers must be unique!
|
| |
|
template<typename Tag , typename T > |
| detail::CellGroup< T, const char *, Tag > | cellGroup (T const &data, Tag *=static_cast< Tag *>(nullptr)) |
| | Helper function to create a cell group with no group header prefix and explicit (non-default) tag - warning: column headers must be unique!
|
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, DefaultGroupTag > &group, time::TimeValue const &tv) |
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, AbbreviatedTimeMemberFieldsTag > &group, time::TimeValue const &tv) |
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, DecimalTimeFieldTag > &group, time::TimeValue const &tv) |
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, DefaultGroupTag > &group, OSVR_Vec3 const &v) |
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, DefaultGroupTag > &group, OSVR_Quaternion const &q) |
| |
| template<typename Derived > |
| detail::SameLayoutVector< 4, Derived > | makeHomogeneousPoint (Eigen::MatrixBase< Derived > const &vec) |
| | Makes a 3D vector into a 4D homogeneous point, with the same options (scalar, row vs col vector) as the input. More...
|
| |
| template<typename Derived > |
| detail::SameLayoutVector< 4, Derived > | makeHomogeneousVector (Eigen::MatrixBase< Derived > const &vec) |
| | Makes a 3D vector into a 4D homogeneous vector, with the same options (scalar, row vs col vector) as the input. More...
|
| |
| template<typename Derived > |
| detail::SameLayoutVector< 3, Derived > | extractPoint (Eigen::MatrixBase< Derived > const &homogenous) |
| | Pulls the 3D point or vector from a 4D vec, performing division by w if it is nonzero. More...
|
| |
| template<typename Derived1 , typename Derived2 > |
| Isometry3< typename Derived1::Scalar > | makeIsometry (Eigen::MatrixBase< Derived1 > const &translation, Eigen::RotationBase< Derived2, 3 > const &rotation) |
| | A simpler, functional-style alternative to .fromPositionOrientationScale when no scaling is performed. More...
|
| |
|
Eigen::Quaterniond | flipQuatSignToMatch (Eigen::Quaterniond const &refQ, Eigen::Quaterniond const &q) |
| |
| Eigen::Map< Eigen::Vector3d > | vecMap (OSVR_Vec3 &vec) |
| | Wrap an OSVR_Vec3 in an Eigen object that allows it to interoperate with Eigen as though it were an Eigen::Vector3d. More...
|
| |
| Eigen::Map< const Eigen::Vector3d > | vecMap (OSVR_Vec3 const &vec) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. For constant vectors. More...
|
| |
|
Eigen::Quaterniond | fromQuat (OSVR_Quaternion const &q) |
| | Convert an OSVR_Quaternion to an Eigen::Quaterniond.
|
| |
|
void | toQuat (Eigen::Quaterniond const &src, OSVR_Quaternion &q) |
| | Convert an Eigen::Quaterniond to a OSVR_Quaternion.
|
| |
| Eigen::Isometry3d | fromPose (OSVR_Pose3 const &pose) |
| | Turn an OSVR_Pose3 into an Eigen::Transform. More...
|
| |
| void | toPose (Eigen::Isometry3d const &xform, OSVR_Pose3 &pose) |
| | Turn an Eigen::Isometry3d (transform) into an OSVR_Pose3. More...
|
| |
| void | toPose (Eigen::Matrix4d const &mat, OSVR_Pose3 &pose) |
| | Turn an Eigen::Matrix4d (transform) into an OSVR_Pose3. More...
|
| |
| template<typename T > |
| auto | extractYaw (T const &quat) -> decltype(std::atan(quat.w())) |
| | A utility function to extract "yaw" out of a quaternion, of any representation as long as it responds to .w(), .x(), .y(), and .z(). More...
|
| |
| template<typename F > |
| FinalTask< F > | finally (F &&f) |
| | Creation free function for final tasks to run on scope exit. More...
|
| |
| template<typename F > |
| FinalTask< F > | finally (F const &f) |
| |
| template<typename T > |
| void | generic_deleter (void *obj) |
| | Generic deleter function, wrapping the stock delete call. More...
|
| |
| OSVR_UTIL_EXPORT boost::optional< std::string > | getEnvironmentVariable (std::string const &var) |
| | Gets an environment variable's value. More...
|
| |
| template<typename Scalar , typename T > |
| void | matrixEigenAssign (T const &src, OSVR_MatrixConventions flags, Scalar *dest) |
| | Helper function template to assign/convert matrices as required. More...
|
| |
| template<typename Functor > |
| bool | opencvTypeDispatch (int openCVType, Functor &f) |
| | Given an OpenCV type depth and a reference to a functor, calls that functor with a single parameter: the corresponding type wrapped in boost::mpl::identity. More...
|
| |
|
NumberTypeData | opencvNumberTypeData (int openCVType) |
| |
| int | cvTypeFromData (bool isSigned, bool isFloat, size_t depth) |
| | Computes the OpenCV "type" (also known as depth - as in CV_8U) for a given combination of signed, float, and byte depth. More...
|
| |
|
int | computeOpenCVMatType (OSVR_ImagingMetadata const &metadata) |
| | Computes the OpenCV matrix type (as in CV_8UC3) from a metadata struct.
|
| |
|
std::pair< std::string, std::string > | convertProgramOptionShowHideIntoTrueFalse (std::string s) |
| | An "additional parser" for Boost.Program_options that will turn any –hide-xyz into –xyz false and –show-xyz into –xyz true.
|
| |
| Eigen::Matrix4d | createProjectionMatrix (Rectd const &bounds, double near, double far) |
| | Takes in points at the near clipping plane, as well as the near and far clipping planes. More...
|
| |
| template<projection_options::OptionType options = projection_options::ZOutputSigned | projection_options::RightHandedInput> |
| Eigen::Matrix4d | parameterizedCreateProjectionMatrix (Rectd const &bounds, double near, double far) |
| | Takes in points at the near clipping plane, as well as the near and far clipping planes. More...
|
| |
|
template<typename System > |
| Rectd | computeSymmetricFOVRect (AngleGeneric< System > hFov, AngleGeneric< System > vFov) |
| | Compute a rectangle at unit distance for the given fov values.
|
| |
| template<typename System > |
| Rectd | computeSymmetricFOVRect (AngleGeneric< System > hFov, AngleGeneric< System > vFov, double near) |
| | Compute a rectangle at the near clipping plane for the given fov values. More...
|
| |
| template<typename System > |
| Eigen::Matrix4d | createSymmetricProjectionMatrix (AngleGeneric< System > hFov, AngleGeneric< System > vFov, double near, double far) |
| |
|
template<typename StreamType , typename Scalar > |
| StreamType & | operator<< (StreamType &os, Rect< Scalar > const &rect) |
| |
|
template<typename RangeType > |
| void | resetPointerRange (RangeType range) |
| | Reset every smart pointer in a container one by one.
|
| |
| template<size_t N> |
| std::string | makeString (const char(&arrayLiteral)[N]) |
| | Safely and easily convert a literal array of characters (like from osvr_json_to_c) into a std::string. More...
|
| |
| template<typename Tag , typename T > |
| detail::CellGroup< T, Tag > | cellGroup (const char *groupHeader, T const &data, Tag *=static_cast< Tag *>(nullptr)) |
| | Helper function to create a cell group with a group header prefix and explicit (non-default) tag. More...
|
| |
|
template<typename Tag , typename T > |
| detail::CellGroup< T, Tag > | cellGroup (T const &data, Tag *=static_cast< Tag *>(nullptr)) |
| | Helper function to create a cell group with no group header prefix and explicit (non-default) tag - warning: column headers must be unique!
|
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, DefaultGroupTag > &group, Eigen::Vector3d const &v) |
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, DefaultGroupTag > &group, Eigen::Quaterniond const &q) |
| |
| Eigen::Vector3d | getEuler (Eigen::Quaterniond const &q) |
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, QuatAsEulerTag > &group, Eigen::Vector3d const &euler) |
| |
|
template<typename T > |
| void | operator<< (CellGroupProxy< T, QuatAsEulerTag > &group, Eigen::Quaterniond const &q) |
| |