OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ProjectionMatrix.h File Reference

Header. More...

#include <osvr/Util/Rect.h>
#include <osvr/Util/EigenCoreGeometry.h>
#include <type_traits>

Go to the source code of this file.

Classes

struct  osvr::util::projection_detail::ThirdRow< options, bool >
 
struct  osvr::util::projection_detail::ThirdRow< options, true >
 
struct  osvr::util::projection_detail::LeftHandedCorrection< options, typename >
 Adjustment needed for left-handed input: dummy case of not requesting left-hand input. More...
 
struct  osvr::util::projection_detail::LeftHandedCorrection< options, typename std::enable_if< projection_options::IsLeftHandedInput< options >::value >::type >
 Adjustment needed for left-handed input. More...
 

Namespaces

 osvr
 <
 
 osvr::util
 The Util library: Functionality not necessarily coupled to any particular core library, serving more as a common base layer behind all systems.
 

Typedefs

typedef unsigned char osvr::util::projection_options::OptionType
 
template<OptionType Options, OptionType Bit>
using osvr::util::projection_options::CheckOptionBit = std::integral_constant< bool, static_cast< bool >(0!=(Options &Bit))>
 
template<OptionType Options>
using osvr::util::projection_options::IsZOutputUnsigned = CheckOptionBit< Options, ZOutputUnsignedBit >
 
template<OptionType Options>
using osvr::util::projection_options::IsLeftHandedInput = CheckOptionBit< Options, LeftHandedInputBit >
 

Enumerations

enum  OptMasks { ZOutputUnsignedBit = 0x1, LeftHandedInputBit = 0x2 }
 The bit masks for testing conditions - do not depend on these being equal to a given enum value of OptBits!
 
enum  OptBits { ZOutputSigned = 0, ZOutputUnsigned = ZOutputUnsignedBit, RightHandedInput = 0, LeftHandedInput = LeftHandedInputBit }
 The flags (combine with bitwise-or |) for specifying configuration - do not depend on these being equal to a given enum value of OptMasks!
 

Functions

Eigen::Matrix4d osvr::util::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. Result matrix maps [l, r] and [b, t] to [-1, 1], and [n, f] to [-1, 1] (should be configurable) More...
 
template<projection_options::OptionType options>
double osvr::util::projection_detail::get33 (double near, double far)
 
template<projection_options::OptionType options>
double osvr::util::projection_detail::get34 (double near, double far)
 
template<projection_options::OptionType options = projection_options::ZOutputSigned | projection_options::RightHandedInput>
Eigen::Matrix4d osvr::util::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. Result matrix maps [l, r] and [b, t] to [-1, 1], and [n, f] to [-1, 1] or [0, 1] depending on presence/absence of ZOutputUnsigned flag bit, taking in right- or left-handed input also as configured.
 

Detailed Description

Header.

Date
2015
Author
Sensics, Inc. http://sensics.com/osvr

Definition in file ProjectionMatrix.h.