00001 00051 #ifndef INC_GRE_GROUPVIEW_H 00052 #define INC_GRE_GROUPVIEW_H 00053 00054 #ifndef INC_GRE_BASE_H 00055 #include <gre/base.h> 00056 #endif 00057 00058 #ifndef INC_MI32_RENDERBUFFER_H 00059 #include <mi32/renderbuffer.h> 00060 #endif 00061 00062 #ifndef INC_MI32_ZVIEW_H 00063 #include <mi32/zview.h> 00064 #endif 00065 00066 00067 namespace GRE { 00068 00069 //=================================================================================================================== 00070 00072 class GROUPVIEW { 00073 public: 00074 00076 enum RENDERTYPE { 00077 RENDERTYPE_Group = 0, 00078 RENDERTYPE_ActiveElems, 00079 RENDERTYPE_Matte, 00080 RENDERTYPE_COUNT 00081 }; 00082 00084 GROUPVIEW ( 00085 GRE::GROUP *group, 00086 GRE::VIEW *view 00087 ); 00088 00089 ~GROUPVIEW (); 00090 00092 void CheckRendered (); 00093 00095 ERRVALUE ComputeStereoValues (); 00096 00098 ERRVALUE ComputeTrans (); 00099 00101 ERRVALUE DrawActiveOverlay (); 00102 00104 const GRE::VIEWPOINT3D* Get3dViewPoint ( 00105 ) const { return (m_pViewPoint3D); } 00106 00111 const LRECT2D& GetDeviceRectUsed ( 00112 ) const { return (m_CurDevRectUsed); } 00113 00115 GRE::GROUP* GetGroup ( 00116 ) const { return (m_group); } 00117 00119 const RENDERBUFFER& GetRenderBuffer ( 00120 RENDERTYPE RenderType 00121 ) const { return (m_RenderBuffer[RenderType]); } 00122 00124 RENDERBUFFER& GetRenderBuffer ( 00125 RENDERTYPE RenderType 00126 ) { return (m_RenderBuffer[RenderType]); } 00127 00129 double GetRotationAngle ( 00130 ) const { return (m_RotationAngle); } 00131 00133 double GetRotationCos ( 00134 ) const { return (m_RotationCos); } 00135 00137 double GetRotationSin ( 00138 ) const { return (m_RotationSin); } 00139 00141 bool GetStereoInterlaceStartRight ( 00142 ) const { return (m_StereoInterlaceStartRight); } 00143 00144 const STEREOSHIFT& GetStereoShift () const 00145 { return (m_ZView.GetStereoShift()); } 00146 00148 GRE::VIEW* GetView ( 00149 ) const { return (m_view); } 00150 00152 const ZVIEW& GetZView () const 00153 { return (m_ZView); } 00154 00156 void InvalidateStereo2D ( 00157 ) { m_ZView.InvalidateStereoShift(); } 00158 00160 bool Is3D ( 00161 ) const { return (m_Is3D); } 00162 00164 bool IsGroupOverlappedDevice ( 00165 ) const { return (m_GroupOverlapsDevice); } 00166 00168 void ResetRendered ( 00169 GRE::RENDERTARGET target = GRE::RENDERTARGET_GroupAll 00170 ); 00171 00172 private: 00173 #ifndef GENERATING_DOXYGEN_OUTPUT 00174 GRE::GROUP *m_group; 00175 GRE::VIEW *m_view; 00176 RENDERBUFFER m_RenderBuffer[RENDERTYPE_COUNT]; 00177 GRE::VIEWPOINT3D *m_pViewPoint3D; // 3D viewpoint 00178 DRECT2D m_NewTgtRectFull; // New full rectangle in target device coordinates, based on transformation 00179 DRECT2D m_CurTgtRectFull; // Current full rectangle in target device coordinates used by layer 00180 LRECT2D m_NewDevRectUsed; // New clipped rectangle on device used, based on transformation 00181 LRECT2D m_CurDevRectUsed; // Current clipped rectangle on device used 00182 double m_RotationAngle; // Rotation angle 00183 double m_RotationCos; // Rotation angle cosine 00184 double m_RotationSin; // Rotation angle sine 00185 ZVIEW m_ZView; 00186 bool m_Is3D; // Set if drawing in 3D 00187 bool m_GroupOverlapsDevice; 00188 bool m_StereoInterlaceStartRight; // Set if first row/column of device is for right eye of interlaced stereo rendering 00189 00190 GROUPVIEW (const GROUPVIEW&); 00191 GROUPVIEW& operator= (const GROUPVIEW&); 00192 00193 #endif // GENERATING_DOXYGEN_OUTPUT 00194 }; 00195 00196 //=================================================================================================================== 00197 00198 } // End namespace GRE 00199 00200 #endif // INC_GRE_GROUPVIEW_H
1.6.1