Project

General

Profile

SO3Engine

#include <SO3Window.h>

Inheritance diagram for SO3::SWindow:
SO3::SData

Public Types

enum  SelectorMode { SO3_SELECTOR_FAST , SO3_SELECTOR_LIMITED , SO3_SELECTOR_PRECISE }
 

Public Member Functions

 SWindow (SRoot *parent, const ScolWindowHandle &windowHandle, const std::string &windowName, const int &width, const int &height, const std::string &fsaa)
 
Ogre::RenderWindow * GetOgreRenderWindowPointer ()
 
 ~SWindow ()
 
void UpdateScreenPos ()
 
Ogre::Vector2 GetScreenPos ()
 
SRootGetParentRoot ()
 
ScolWindowHandle GetWindowHandle () const
 
void SetWindowHandle (ScolWindowHandle win)
 
void RefreshSelector (const bool &forceRefresh=false)
 
void SetSelectorEnable (const bool &state)
 
void SetSelectorMode (SelectorMode mode)
 
SelectorMode GetSelectorMode ()
 
void PauseWindow ()
 
void ResumeWindow ()
 
SViewPortCreateViewport (SCamera *camera, int priority, const float &x, const float &y, const float &w, const float &h)
 
void DeleteViewport (SViewPort *existingViewport)
 
const SViewPortListGetViewportList () const
 
SViewPortGetViewport (const int &priority) const
 
SViewPortGetViewport (const int &x, const int &y)
 
void windowMoved (Ogre::RenderWindow *rw)
 
void windowResized (Ogre::RenderWindow *rw)
 
void windowClosed (Ogre::RenderWindow *rw)
 
void windowFocusChange (Ogre::RenderWindow *rw)
 
int Size (const int &x, const int &y, const int &w, const int &h, const int &ext)
 
void WindowMovedOrResized ()
 
unsigned int GetWidth () const
 
unsigned int GetHeight () const
 
int GetLeft ()
 
int GetTop ()
 
void SetSizeDirty ()
 
bool GetSizeDirty ()
 
bool GetFullScreen ()
 
bool SetFullScreen (const bool &fullscreen, const int &width=0, const int &height=0)
 
bool CheckVideoMode (const int width, const int height)
 
void Update ()
 
unsigned int GetBatchCount ()
 
unsigned int GetTriangleCount ()
 
float GetBestFrameTime () const
 
float GetWorstFrameTime () const
 
float GetBestFPS () const
 
float GetWorstFPS () const
 
float GetAverageFPS () const
 
unsigned int GetFSAA () const
 
void SetStereoMode (const StereoManager::StereoMode &stereoMode)
 
StereoManager::StereoMode GetStereoMode ()
 
float GetStereoEyesSpacing ()
 
void SetStereoEyesSpacing (const float &eyesSpacing)
 
void SetStereoRotateView (const bool state)
 
bool GetStereoRotateView ()
 
void SetStereoProjectionOffset (const float &offset)
 
void SetStereoAspectRatio (const float &ratio)
 
void SetStereoFOVy (const float &fov)
 
void SetStereoDistortion (bool enable, Ogre::Vector4 dist)
 
void SetStereoChromaticAbCorrection (bool enable, Ogre::Vector4 chromAbC)
 
void SetStereoCustomProjectonMatrix (bool enable, const Ogre::Matrix4 &leftMatrix, const Ogre::Matrix4 &rightMatrix)
 
void GetStereoCustomProjectonMatrix (bool &enabled, Ogre::Matrix4 &leftMatrix, Ogre::Matrix4 &rightMatrix) const
 
void SetStereoTimeWarpMatrix (const Ogre::Matrix4 &leftStartMatrix, const Ogre::Matrix4 &leftEndMatrix, const Ogre::Matrix4 &rightStartMatrix, const Ogre::Matrix4 &rightEndMatrix)
 
void SetStereoMeshUVConfig (Ogre::Vector2 leftuvscale, Ogre::Vector2 leftuvoffset, Ogre::Vector2 rightuvscale, Ogre::Vector2 rightuvoffset)
 
void SetStereoMeshRttSize (SO3::SPoint< int > leftsize, SO3::SPoint< int > rightsize)
 
void SetStereoMeshLeft (std::vector< Ogre::Vector3 > vertices, std::vector< std::vector< Ogre::Vector2 > > uvs, std::vector< Ogre::Real > vignetteColor, std::vector< Ogre::Real > warp, std::vector< int > indexs)
 
void SetStereoMeshRight (std::vector< Ogre::Vector3 > vertices, std::vector< std::vector< Ogre::Vector2 > > uvs, std::vector< Ogre::Real > vignetteColor, std::vector< Ogre::Real > warp, std::vector< int > indexs)
 
void SetStereoWindow (SO3::SPoint< int > pos, SO3::SPoint< int > size, int index, bool state)
 
std::array< SCOL_PTR_TYPE, 2 > GetStereoTextures ()
 
std::array< SO3::SPoint< int >, 2 > GetStereoViewportSize ()
 
SRaycastResult RayCast (const int &pixelsX, const int &pixelsY)
 
SRaycastResult IndRayCast (const int &pixelsX, const int &pixelsY)
 
SRaycastResultGetLastRayCast ()
 
void InvalidateRayCast ()
 
void WriteContentsToFile (const std::string &path)
 
bool UpdateStereoCompositorState (SViewPort *viewport, const Ogre::String compname, bool state)
 
void RestoreStereoCamera (SViewPort *viewport)
 
void UpdateStereoCamera (SViewPort *viewport, Ogre::Camera *camera)
 
void UpdateStereoCameraMatrix (SViewPort *viewport, Ogre::Camera *camera)
 
void UnregisterStereoViewport (SViewPort *viewport)
 
void RegisterStereoViewport (SViewPort *viewport)
 
void SynchStereoViewportSetup (SViewPort *viewport, bool overlay=false, bool shadow=false)
 
bool IsStereoViewportRegistered (SViewPort *viewport)
 
void ToPixelPos (int &px, int &py)
 
void CleanViewports ()
 
- Public Member Functions inherited from SO3::SData
 SData (const std::string &dataName)
 
virtual ~SData ()
 
std::string GetName () const
 
SUserObjectBindingsGetUserObjectBindings ()
 
const SUserObjectBindingsGetUserObjectBindings () const
 

Protected Member Functions

void AddViewport (SViewPort *existingViewport)
 
void RemoveViewport (SViewPort *existingViewport)
 
virtual void preRenderTargetUpdate (const Ogre::RenderTargetEvent &evt)
 
virtual void postRenderTargetUpdate (const Ogre::RenderTargetEvent &evt)
 

Additional Inherited Members

- Protected Attributes inherited from SO3::SData
std::string name
 

Detailed Description

Definition at line 42 of file SO3Window.h.

Member Enumeration Documentation

◆ SelectorMode

Enumerator
SO3_SELECTOR_FAST 
SO3_SELECTOR_LIMITED 
SO3_SELECTOR_PRECISE 

Definition at line 47 of file SO3Window.h.

Constructor & Destructor Documentation

◆ SWindow()

SO3::SWindow::SWindow ( SRoot parent,
const ScolWindowHandle &  windowHandle,
const std::string &  windowName,
const int &  width,
const int &  height,
const std::string &  fsaa 
)

Constructor.

Definition at line 58 of file SO3Window.cpp.

◆ ~SWindow()

SO3::SWindow::~SWindow ( )

Destructor.

Definition at line 214 of file SO3Window.cpp.

Member Function Documentation

◆ AddViewport()

void SO3::SWindow::AddViewport ( SViewPort existingViewport)
protected

Add a SViewPort object to the list of handled viewports.

Definition at line 548 of file SO3Window.cpp.

◆ CheckVideoMode()

bool SO3::SWindow::CheckVideoMode ( const int  width,
const int  height 
)

Definition at line 989 of file SO3Window.cpp.

◆ CleanViewports()

void SO3::SWindow::CleanViewports ( )

Clean SViewPort object to del

Definition at line 490 of file SO3Window.cpp.

◆ CreateViewport()

SViewPort * SO3::SWindow::CreateViewport ( SCamera camera,
int  priority,
const float &  x,
const float &  y,
const float &  w,
const float &  h 
)

Create a new SViewPort Object

Definition at line 446 of file SO3Window.cpp.

◆ DeleteViewport()

void SO3::SWindow::DeleteViewport ( SViewPort existingViewport)

Delete an existing SViewPort Object

Definition at line 459 of file SO3Window.cpp.

◆ GetAverageFPS()

float SO3::SWindow::GetAverageFPS ( ) const

Gets the average frames per second (FPS) since the start of the rendering.

Definition at line 1075 of file SO3Window.cpp.

◆ GetBatchCount()

unsigned int SO3::SWindow::GetBatchCount ( )

Gets the number of batches rendered in the last Update() call.

Definition at line 1028 of file SO3Window.cpp.

◆ GetBestFPS()

float SO3::SWindow::GetBestFPS ( ) const

Gets the best frames per second (FPS) since the start of the rendering.

Definition at line 1065 of file SO3Window.cpp.

◆ GetBestFrameTime()

float SO3::SWindow::GetBestFrameTime ( ) const

Gets the best frame time

Definition at line 1055 of file SO3Window.cpp.

◆ GetFSAA()

unsigned int SO3::SWindow::GetFSAA ( ) const

Indicates whether multisampling is performed on rendering and at what level.

Definition at line 1080 of file SO3Window.cpp.

◆ GetFullScreen()

bool SO3::SWindow::GetFullScreen ( )

Definition at line 980 of file SO3Window.cpp.

◆ GetHeight()

unsigned int SO3::SWindow::GetHeight ( ) const

Definition at line 836 of file SO3Window.cpp.

◆ GetLastRayCast()

SRaycastResult & SO3::SWindow::GetLastRayCast ( )

Definition at line 1244 of file SO3Window.cpp.

◆ GetLeft()

int SO3::SWindow::GetLeft ( )

Definition at line 841 of file SO3Window.cpp.

◆ GetOgreRenderWindowPointer()

Ogre::RenderWindow * SO3::SWindow::GetOgreRenderWindowPointer ( )

Definition at line 441 of file SO3Window.cpp.

◆ GetParentRoot()

SRoot * SO3::SWindow::GetParentRoot ( )

Definition at line 436 of file SO3Window.cpp.

◆ GetScreenPos()

Ogre::Vector2 SO3::SWindow::GetScreenPos ( )

Definition at line 259 of file SO3Window.cpp.

◆ GetSelectorMode()

SWindow::SelectorMode SO3::SWindow::GetSelectorMode ( )

Definition at line 403 of file SO3Window.cpp.

◆ GetSizeDirty()

bool SO3::SWindow::GetSizeDirty ( )

Definition at line 305 of file SO3Window.cpp.

◆ GetStereoCustomProjectonMatrix()

void SO3::SWindow::GetStereoCustomProjectonMatrix ( bool &  enabled,
Ogre::Matrix4 &  leftMatrix,
Ogre::Matrix4 &  rightMatrix 
) const

Definition at line 1148 of file SO3Window.cpp.

◆ GetStereoEyesSpacing()

float SO3::SWindow::GetStereoEyesSpacing ( )

Definition at line 1098 of file SO3Window.cpp.

◆ GetStereoMode()

StereoManager::StereoMode SO3::SWindow::GetStereoMode ( )

Definition at line 1093 of file SO3Window.cpp.

◆ GetStereoRotateView()

bool SO3::SWindow::GetStereoRotateView ( )

Definition at line 1113 of file SO3Window.cpp.

◆ GetStereoTextures()

std::array< SCOL_PTR_TYPE, 2 > SO3::SWindow::GetStereoTextures ( )

Definition at line 1183 of file SO3Window.cpp.

◆ GetStereoViewportSize()

std::array< SO3::SPoint< int >, 2 > SO3::SWindow::GetStereoViewportSize ( )

Definition at line 1188 of file SO3Window.cpp.

◆ GetTop()

int SO3::SWindow::GetTop ( )

Definition at line 849 of file SO3Window.cpp.

◆ GetTriangleCount()

unsigned int SO3::SWindow::GetTriangleCount ( )

Gets the number of triangles rendered in the last Update() call.

Definition at line 1042 of file SO3Window.cpp.

◆ GetViewport() [1/2]

SViewPort * SO3::SWindow::GetViewport ( const int &  priority) const

Get the viewport at zorder.

Definition at line 585 of file SO3Window.cpp.

◆ GetViewport() [2/2]

SViewPort * SO3::SWindow::GetViewport ( const int &  x,
const int &  y 
)

Get the viewport under the given window internal position;

Definition at line 601 of file SO3Window.cpp.

◆ GetViewportList()

const SViewPortList & SO3::SWindow::GetViewportList ( ) const

Get a list of the handled viewport.

Definition at line 580 of file SO3Window.cpp.

◆ GetWidth()

unsigned int SO3::SWindow::GetWidth ( ) const

Definition at line 831 of file SO3Window.cpp.

◆ GetWindowHandle()

ScolWindowHandle SO3::SWindow::GetWindowHandle ( ) const

Definition at line 426 of file SO3Window.cpp.

◆ GetWorstFPS()

float SO3::SWindow::GetWorstFPS ( ) const

Definition at line 1070 of file SO3Window.cpp.

◆ GetWorstFrameTime()

float SO3::SWindow::GetWorstFrameTime ( ) const

Gets the worst frame time

Definition at line 1060 of file SO3Window.cpp.

◆ IndRayCast()

SRaycastResult SO3::SWindow::IndRayCast ( const int &  pixelsX,
const int &  pixelsY 
)

Definition at line 1223 of file SO3Window.cpp.

◆ InvalidateRayCast()

void SO3::SWindow::InvalidateRayCast ( )

Definition at line 1238 of file SO3Window.cpp.

◆ IsStereoViewportRegistered()

bool SO3::SWindow::IsStereoViewportRegistered ( SViewPort viewport)

Definition at line 540 of file SO3Window.cpp.

◆ PauseWindow()

void SO3::SWindow::PauseWindow ( )

Definition at line 408 of file SO3Window.cpp.

◆ postRenderTargetUpdate()

void SO3::SWindow::postRenderTargetUpdate ( const Ogre::RenderTargetEvent &  evt)
protectedvirtual

Definition at line 310 of file SO3Window.cpp.

◆ preRenderTargetUpdate()

void SO3::SWindow::preRenderTargetUpdate ( const Ogre::RenderTargetEvent &  evt)
protectedvirtual

Definition at line 235 of file SO3Window.cpp.

◆ RayCast()

SRaycastResult SO3::SWindow::RayCast ( const int &  pixelsX,
const int &  pixelsY 
)

Definition at line 1210 of file SO3Window.cpp.

◆ RefreshSelector()

void SO3::SWindow::RefreshSelector ( const bool &  forceRefresh = false)

Definition at line 327 of file SO3Window.cpp.

◆ RegisterStereoViewport()

void SO3::SWindow::RegisterStereoViewport ( SViewPort viewport)

Definition at line 528 of file SO3Window.cpp.

◆ RemoveViewport()

void SO3::SWindow::RemoveViewport ( SViewPort existingViewport)
protected

Remove a SViewPort object from the list of handled viewports.

Definition at line 564 of file SO3Window.cpp.

◆ RestoreStereoCamera()

void SO3::SWindow::RestoreStereoCamera ( SViewPort viewport)

Definition at line 504 of file SO3Window.cpp.

◆ ResumeWindow()

void SO3::SWindow::ResumeWindow ( )

Definition at line 418 of file SO3Window.cpp.

◆ SetFullScreen()

bool SO3::SWindow::SetFullScreen ( const bool &  fullscreen,
const int &  width = 0,
const int &  height = 0 
)

True if success, false if an error occurs or aborting (ask fullScreen whenever it's always in fullscreen).

Definition at line 857 of file SO3Window.cpp.

◆ SetSelectorEnable()

void SO3::SWindow::SetSelectorEnable ( const bool &  state)

Definition at line 334 of file SO3Window.cpp.

◆ SetSelectorMode()

void SO3::SWindow::SetSelectorMode ( SelectorMode  mode)

Definition at line 359 of file SO3Window.cpp.

◆ SetSizeDirty()

void SO3::SWindow::SetSizeDirty ( )

Definition at line 264 of file SO3Window.cpp.

◆ SetStereoAspectRatio()

void SO3::SWindow::SetStereoAspectRatio ( const float &  ratio)

Definition at line 1123 of file SO3Window.cpp.

◆ SetStereoChromaticAbCorrection()

void SO3::SWindow::SetStereoChromaticAbCorrection ( bool  enable,
Ogre::Vector4  chromAbC 
)

Definition at line 1138 of file SO3Window.cpp.

◆ SetStereoCustomProjectonMatrix()

void SO3::SWindow::SetStereoCustomProjectonMatrix ( bool  enable,
const Ogre::Matrix4 &  leftMatrix,
const Ogre::Matrix4 &  rightMatrix 
)

Definition at line 1143 of file SO3Window.cpp.

◆ SetStereoDistortion()

void SO3::SWindow::SetStereoDistortion ( bool  enable,
Ogre::Vector4  dist 
)

Definition at line 1133 of file SO3Window.cpp.

◆ SetStereoEyesSpacing()

void SO3::SWindow::SetStereoEyesSpacing ( const float &  eyesSpacing)

Definition at line 1103 of file SO3Window.cpp.

◆ SetStereoFOVy()

void SO3::SWindow::SetStereoFOVy ( const float &  fov)

Definition at line 1128 of file SO3Window.cpp.

◆ SetStereoMeshLeft()

void SO3::SWindow::SetStereoMeshLeft ( std::vector< Ogre::Vector3 >  vertices,
std::vector< std::vector< Ogre::Vector2 > >  uvs,
std::vector< Ogre::Real >  vignetteColor,
std::vector< Ogre::Real >  warp,
std::vector< int >  indexs 
)

Definition at line 1173 of file SO3Window.cpp.

◆ SetStereoMeshRight()

void SO3::SWindow::SetStereoMeshRight ( std::vector< Ogre::Vector3 >  vertices,
std::vector< std::vector< Ogre::Vector2 > >  uvs,
std::vector< Ogre::Real >  vignetteColor,
std::vector< Ogre::Real >  warp,
std::vector< int >  indexs 
)

Definition at line 1178 of file SO3Window.cpp.

◆ SetStereoMeshRttSize()

void SO3::SWindow::SetStereoMeshRttSize ( SO3::SPoint< int >  leftsize,
SO3::SPoint< int >  rightsize 
)

Definition at line 1163 of file SO3Window.cpp.

◆ SetStereoMeshUVConfig()

void SO3::SWindow::SetStereoMeshUVConfig ( Ogre::Vector2  leftuvscale,
Ogre::Vector2  leftuvoffset,
Ogre::Vector2  rightuvscale,
Ogre::Vector2  rightuvoffset 
)

Definition at line 1158 of file SO3Window.cpp.

◆ SetStereoMode()

void SO3::SWindow::SetStereoMode ( const StereoManager::StereoMode stereoMode)

Definition at line 1085 of file SO3Window.cpp.

◆ SetStereoProjectionOffset()

void SO3::SWindow::SetStereoProjectionOffset ( const float &  offset)

Definition at line 1118 of file SO3Window.cpp.

◆ SetStereoRotateView()

void SO3::SWindow::SetStereoRotateView ( const bool  state)

Definition at line 1108 of file SO3Window.cpp.

◆ SetStereoTimeWarpMatrix()

void SO3::SWindow::SetStereoTimeWarpMatrix ( const Ogre::Matrix4 &  leftStartMatrix,
const Ogre::Matrix4 &  leftEndMatrix,
const Ogre::Matrix4 &  rightStartMatrix,
const Ogre::Matrix4 &  rightEndMatrix 
)

Definition at line 1153 of file SO3Window.cpp.

◆ SetStereoWindow()

void SO3::SWindow::SetStereoWindow ( SO3::SPoint< int >  pos,
SO3::SPoint< int >  size,
int  index,
bool  state 
)

Definition at line 1168 of file SO3Window.cpp.

◆ SetWindowHandle()

void SO3::SWindow::SetWindowHandle ( ScolWindowHandle  win)

Definition at line 431 of file SO3Window.cpp.

◆ Size()

int SO3::SWindow::Size ( const int &  x,
const int &  y,
const int &  w,
const int &  h,
const int &  ext 
)

Definition at line 643 of file SO3Window.cpp.

◆ SynchStereoViewportSetup()

void SO3::SWindow::SynchStereoViewportSetup ( SViewPort viewport,
bool  overlay = false,
bool  shadow = false 
)

Definition at line 534 of file SO3Window.cpp.

◆ ToPixelPos()

void SO3::SWindow::ToPixelPos ( int &  px,
int &  py 
)

Definition at line 1193 of file SO3Window.cpp.

◆ UnregisterStereoViewport()

void SO3::SWindow::UnregisterStereoViewport ( SViewPort viewport)

Definition at line 522 of file SO3Window.cpp.

◆ Update()

void SO3::SWindow::Update ( )
Remarks
, Warning, this implementation swap buffers!

Definition at line 1016 of file SO3Window.cpp.

◆ UpdateScreenPos()

void SO3::SWindow::UpdateScreenPos ( )

Definition at line 246 of file SO3Window.cpp.

◆ UpdateStereoCamera()

void SO3::SWindow::UpdateStereoCamera ( SViewPort viewport,
Ogre::Camera *  camera 
)

Definition at line 510 of file SO3Window.cpp.

◆ UpdateStereoCameraMatrix()

void SO3::SWindow::UpdateStereoCameraMatrix ( SViewPort viewport,
Ogre::Camera *  camera 
)

Definition at line 516 of file SO3Window.cpp.

◆ UpdateStereoCompositorState()

bool SO3::SWindow::UpdateStereoCompositorState ( SViewPort viewport,
const Ogre::String  compname,
bool  state 
)

Definition at line 499 of file SO3Window.cpp.

◆ windowClosed()

void SO3::SWindow::windowClosed ( Ogre::RenderWindow *  rw)

Definition at line 635 of file SO3Window.cpp.

◆ windowFocusChange()

void SO3::SWindow::windowFocusChange ( Ogre::RenderWindow *  rw)

Definition at line 639 of file SO3Window.cpp.

◆ windowMoved()

void SO3::SWindow::windowMoved ( Ogre::RenderWindow *  rw)

Definition at line 627 of file SO3Window.cpp.

◆ WindowMovedOrResized()

void SO3::SWindow::WindowMovedOrResized ( )

Definition at line 700 of file SO3Window.cpp.

◆ windowResized()

void SO3::SWindow::windowResized ( Ogre::RenderWindow *  rw)

Definition at line 631 of file SO3Window.cpp.

◆ WriteContentsToFile()

void SO3::SWindow::WriteContentsToFile ( const std::string &  path)

Definition at line 1276 of file SO3Window.cpp.


The documentation for this class was generated from the following files: