//------------------------ init Stereo Manager -------------------------- StereoManager::StereoManager(void) { stereo_mode_ = SM_NONE; debug_plane_ = NULL; debug_plane_node_ = NULL; left_viewport_ = NULL; right_viewport_ = NULL; camera_ = NULL; compositor_instance_ = NULL; focal_plane_fixed_ = false; scrn_width_ = 1.0f; eye_spacing_ = 0.06f; pix_offset_ = 0.0f; focal_length_ = 10.0f; infinite_focal_length_ = false; is_inversed_ = false; is_custom_projection_ = false; left_custom_projection_ = Ogre::Matrix4::IDENTITY; right_custom_projection_ = Ogre::Matrix4::IDENTITY; right_mask_ = ~((Ogre::uint32)0); left_mask_ = ~((Ogre::uint32)0); available_nodes_[SM_ANAGLYPH] = StereoModeDescription("ANAGLYPH_RED_CYAN", "Stereo/Anaglyph"); available_nodes_[SM_INTERLACED_H] = StereoModeDescription("INTERLACED_HORIZONTAL", "Stereo/HorizontalInterlace"); available_nodes_[SM_INTERLACED_V] = StereoModeDescription("INTERLACED_VERTICAL", "Stereo/VerticalInterlace"); available_nodes_[SM_INTERLACED_CB] = StereoModeDescription("INTERLACED_CHECKBOARD", "Stereo/CheckboardInterlace"); available_nodes_[SM_DUALOUTPUT] = StereoModeDescription("DUALOUTPUT"); available_nodes_[SM_SHUTTER] = StereoModeDescription("SHUTTER"); available_nodes_[SM_NONE] = StereoModeDescription("NONE"); }
//------------------------ init Stereo Manager -------------------------- StereoManager::StereoManager(void) { mStereoMode = SM_NONE; mDebugPlane = NULL; mDebugPlaneNode = NULL; mLeftViewport = NULL; mRightViewport = NULL; mCamera = NULL; mCompositorInstance = NULL; mIsFocalPlaneFixed = false; mScreenWidth = 1.0f; mEyesSpacing = 0.06f; mFocalLength = 10.0f; mFocalLengthInfinite = false; mIsInversed = false; mIsCustomProjection = false; mLeftCustomProjection = Ogre::Matrix4::IDENTITY; mRightCustomProjection = Ogre::Matrix4::IDENTITY; mRightMask = ~((Ogre::uint32)0); mLeftMask = ~((Ogre::uint32)0); // mAvailableModes[SM_ANAGLYPH] = StereoModeDescription("ANAGLYPH", "Stereo/RedCyanAnaglyph"); mAvailableModes[SM_ANAGLYPH_RC] = StereoModeDescription("ANAGLYPH_RED_CYAN", "Stereo/RedCyanAnaglyph"); mAvailableModes[SM_ANAGLYPH_YB] = StereoModeDescription("ANAGLYPH_YELLOW_BLUE", "Stereo/YellowBlueAnaglyph"); mAvailableModes[SM_INTERLACED_H] = StereoModeDescription("INTERLACED_HORIZONTAL", "Stereo/HorizontalInterlace"); mAvailableModes[SM_INTERLACED_V] = StereoModeDescription("INTERLACED_VERTICAL", "Stereo/VerticalInterlace"); mAvailableModes[SM_INTERLACED_CB] = StereoModeDescription("INTERLACED_CHECKBOARD", "Stereo/CheckboardInterlace"); mAvailableModes[SM_DUALOUTPUT] = StereoModeDescription("DUALOUTPUT"); mAvailableModes[SM_NONE] = StereoModeDescription("NONE"); }