00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00034 #ifndef __SO3VIEWPORT_H__
00035 #define __SO3VIEWPORT_H__
00036
00037 #include "../SCOLBasic/SO3Std.h"
00038 #include "StereoManager.h"
00039
00040 namespace SO3
00041 {
00042
00045 class SViewPort
00046 {
00047 public:
00048 SWindow* currentWindow;
00049 int channel;
00050 protected:
00051 private:
00052 bool bClearDepth;
00053 bool bClearColor;
00054 SWindow* scolWindow;
00055 SCamera* scolCamera;
00056 Ogre::Viewport* O3ViewPort;
00057 SCompositorMap compList;
00058
00059 public:
00063 SViewPort(SWindow* parent, SCamera* targetCamera, int priority, float x, float y, float w, float h);
00064
00068 ~SViewPort();
00069
00072 Ogre::Viewport* GetOgreViewPortPointer();
00073
00076 const SWindow* GetParentWindow() const;
00077
00080 std::string GetMaterialScheme();
00081
00084 void SetMaterialScheme(std::string existingScheme);
00085
00088 void SetPositionAndSize(float x, float y, float w, float h);
00089
00092 void ResizeToWindow(float w, float h);
00093
00096 float GetLeft();
00097
00100 float GetTop();
00101
00104 float GetWidth();
00105
00108 float GetHeight();
00109
00112 int GetLeftPixels();
00113
00116 int GetTopPixels();
00117
00120 int GetWidthPixels();
00121
00124 int GetHeightPixels();
00125
00128 int GetPriority();
00129
00132 bool GetShadowsEnabled();
00133
00136 void SetShadowsEnabled(bool enableShadows);
00137
00140 void SetBackgroundColour(int backgroundColor);
00141
00144 int GetBackgroundColor();
00145
00148 SCamera* GetCamera();
00149
00152 void SetCamera(SCamera* camera);
00153
00156 bool GetClearDepth();
00157
00160 void SetClearDepth(bool state);
00161
00164 bool GetClearColor();
00165
00168 void SetClearColor(bool value);
00169
00172 void SetSkyEnable(bool value);
00173
00176 bool GetSkyEnable();
00177
00180 void SetOverlayEnable(bool value);
00181
00184 bool GetOverlayEnable();
00185
00188 void SetVisibilityMask(Ogre::uint32 mask);
00189
00192 Ogre::uint32 GetVisibilityMask();
00193
00196 void Update();
00197
00201 SCompositor* CreateCompositor(std::string newCompositorName, std::string newSchemeName);
00202
00206 void DeleteCompositor(SCompositor* existingCompositor);
00207
00210 void DeleteCompositor(std::string existingCompositorName);
00211
00215 SCompositor* GetCompositor(std::string compositorName);
00216
00220 const SCompositorMap& GetCompositorList() const;
00221
00225 void ClearCompositors();
00226
00231 SRaycastResult RayCast(int pixelsX, int pixelsY, SSubEntitySelectorBuffer* subEntitySelector);
00232
00237 SRaycastResult RayCast(int pixelsX, int pixelsY);
00238 protected:
00242 void AddCompositor(SCompositor* existingCompositor);
00243
00247 void RemoveCompositor(SCompositor* existingCompositor);
00248
00252 void RemoveCompositor(std::string compositorName);
00253 private:
00257 SViewPort();
00258 };
00259
00260 }
00261
00262 #endif