Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Structures | Typedefs | Enumerations | Functions
omni::proj Namespace Reference

Namespace for projector related classes. More...

Data Structures

class  AngleSetup
 Basic projector setup with three euler angles and no positioning offsets. More...
 
class  Calibration
 Calibration generated from a tuning Calibration has output mode with either UVW or TEXCOORDS. More...
 
class  ChannelCorrection
 Brightness, contrast and gamma correction for a single color channel. More...
 
class  ColorCorrection
 Color correction for RGB color space. More...
 
class  FreeSetup
 Free projector setup with euler angles and positioning. More...
 
class  Frustum
 Frustum helper struct constructed from a projector. More...
 
class  PeripheralSetup
 Setup in which projector rotates with yaw angle around center point. More...
 
class  Projector
 A projector with a transformation matrix and setup. More...
 
class  ScreenSetup
 Singleton class which manages the current screen setup. More...
 
class  Setup
 Interface for a projector setup. More...
 
class  Tuning
 A projector tuning holds adjustment and distorsion data for a single projector and screen A tuning consists of a projector, warp grid, blend mask and color correction. It holds a color as well. It can render a projector calibration. More...
 
class  TuningList
 Tuning List contains a list of tunings Tuning List is serializable via QDataStream. More...
 

Typedefs

typedef AbstractFactory< SetupSetupFactory
 Typedef for our factory. More...
 

Enumerations

enum  CalibrationMode { CalibrationMode::TEXCOORDS, CalibrationMode::UVW, CalibrationMode::MAPPED_INPUT }
 Defines which type of data is in a calibration. More...
 
enum  Channel { Channel::ALL, Channel::RED, Channel::GREEN, Channel::BLUE }
 

Functions

bool operator== (ChannelCorrection const &_lhs, ChannelCorrection const &_rhs)
 Test for equality. More...
 
bool operator== (ColorCorrection const &_lhs, ColorCorrection const &_rhs)
 
bool operator== (Projector const &_lhs, Projector const &_rhs)
 
bool operator== (Tuning const &_lhs, Tuning const &_rhs)
 
bool operator== (TuningList const &_lhs, TuningList const &_rhs)
 
static mapping::OutputMode calibrationModeToMappingOutputMode (CalibrationMode _calibMode)
 
static int imageHeightMultiplier (CalibrationMode _calibMode)
 

Detailed Description

Namespace for projector related classes.

Typedef Documentation

Typedef for our factory.

Enumeration Type Documentation

Defines which type of data is in a calibration.

Enumerator
TEXCOORDS 
UVW 
MAPPED_INPUT 
enum omni::proj::Channel
strong
Enumerator
ALL 
RED 
GREEN 
BLUE 

Function Documentation

static mapping::OutputMode omni::proj::calibrationModeToMappingOutputMode ( CalibrationMode  _calibMode)
inlinestatic
33  {
34  switch (_calibMode) {
35  default:
36  case CalibrationMode::TEXCOORDS:
37  return mapping::OutputMode::TEXCOORDS;
38  case CalibrationMode::UVW:
39  return mapping::OutputMode::UVW;
40  case CalibrationMode::MAPPED_INPUT:
41  return mapping::OutputMode::MAPPED_INPUT;
42  }
43  // Return texcoords by default
44  return mapping::OutputMode::TEXCOORDS;
45  }
static int omni::proj::imageHeightMultiplier ( CalibrationMode  _calibMode)
inlinestatic
47  {
48  switch (_calibMode) {
49  default:
50  case CalibrationMode::TEXCOORDS:
51  return 2;
52  case CalibrationMode::UVW:
53  return 3;
54  case CalibrationMode::MAPPED_INPUT:
55  return 1;
56  }
57  return 2;
58  }
bool omni::proj::operator== ( ChannelCorrection const &  _lhs,
ChannelCorrection const &  _rhs 
)

Test for equality.

85  {
86  return
87  OMNI_TEST_MEMBER_EQUAL(gamma_) &&
88  OMNI_TEST_MEMBER_EQUAL(brightness_) &&
89  OMNI_TEST_MEMBER_EQUAL(contrast_) &&
90  OMNI_TEST_MEMBER_EQUAL(multiplier_);
91  }
#define OMNI_TEST_MEMBER_EQUAL(member)
Definition: util.h:125
bool omni::proj::operator== ( ColorCorrection const &  _lhs,
ColorCorrection const &  _rhs 
)
128  {
129  return
130  OMNI_TEST_MEMBER_EQUAL(isUsed_) &&
131  OMNI_TEST_MEMBER_EQUAL(all_) &&
132  OMNI_TEST_MEMBER_EQUAL(red_) &&
133  OMNI_TEST_MEMBER_EQUAL(green_) &&
134  OMNI_TEST_MEMBER_EQUAL(blue_);
135  }
#define OMNI_TEST_MEMBER_EQUAL(member)
Definition: util.h:125
bool omni::proj::operator== ( TuningList const &  _lhs,
TuningList const &  _rhs 
)
140  {
141  // Lambda for testing if pointers of two tunings are equal
142  auto _tuningsEqual = [](Tuning const* _a, Tuning const* _b) -> bool
143  {
144  return _a && _b // Test if pointer have same address
145  ?
146  // Derefence pointers and use equality operator to test equality
147  ((*_a) == (*_b))
148  :
149  // Compare pointers and if test of pointer are not nullptrs
150  (_a == _b);
151  };
152 
153  return
154  OMNI_TEST_MEMBER_EQUAL(currentIdx_) &&
155  util::testPtrVectorEqual(_lhs,_rhs,_tuningsEqual);
156  }
#define OMNI_TEST_MEMBER_EQUAL(member)
Definition: util.h:125
bool testPtrVectorEqual(T const &_a, T const &_b, F f)
Test if two vectors which hold unique_ptr's of SerializationInterfaces.
Definition: util.h:78
bool omni::proj::operator== ( Projector const &  _lhs,
Projector const &  _rhs 
)
153  {
154  return
155  OMNI_TEST_MEMBER_EQUAL(matrix_) &&
156  OMNI_TEST_MEMBER_EQUAL(fov_) &&
157  OMNI_TEST_MEMBER_EQUAL(keystone_) &&
158  OMNI_TEST_MEMBER_EQUAL(aspectRatio_) &&
160  }
#define OMNI_TEST_MEMBER_EQUAL(member)
Definition: util.h:125
#define OMNI_TEST_PTR_MEMBER_EQUAL(member)
Definition: util.h:128
bool omni::proj::operator== ( Tuning const &  _lhs,
Tuning const &  _rhs 
)
270  {
271  return
272  OMNI_TEST_MEMBER_EQUAL(color_) &&
273  OMNI_TEST_MEMBER_EQUAL(projector_) &&
274  OMNI_TEST_MEMBER_EQUAL(warpGrid_) &&
275  OMNI_TEST_MEMBER_EQUAL(blendMask_) &&
276  OMNI_TEST_MEMBER_EQUAL(outputDisabled_) &&
277  OMNI_TEST_MEMBER_EQUAL(overlapOpacity_) &&
278  OMNI_TEST_MEMBER_EQUAL(colorCorrection_);
279  }
#define OMNI_TEST_MEMBER_EQUAL(member)
Definition: util.h:125