SRSDK  0.10.39
Loading...
Searching...
No Matches
Interlacer Class Reference

C++ wrapper for leia_interlacer. More...

#include <interlacer.hpp>

Inheritance diagram for Interlacer:
InterlacerD3D11 InterlacerD3D12 InterlacerOpenGL InterlacerVulkan

Public Member Functions

 Interlacer ()
 
 ~Interlacer ()
 
 Interlacer (Interlacer const &)=delete
 
Interlaceroperator= (Interlacer const &)=delete
 
 Interlacer (Interlacer &&other)
 
Interlaceroperator= (Interlacer &&other)
 
 operator bool () const
 
void SetLayerCount (int layerCount)
 Sets the number of layers to interlace.
 
LEIA_NODISCARD int GetLayerCount () const
 Gets the current number of layers.
 
void SetNumTiles (int32_t tx, int32_t ty)
 
void GetNumTiles (int32_t *tx, int32_t *ty) const
 
void SetTileLayout (TileLayout tileLayout)
 
void SetOutputAsTiles (bool enable)
 
void SetBaselineScaling (float baseline)
 
LEIA_NODISCARD float GetBaselineScaling ()
 
LEIA_NODISCARD float GetConvergenceDistance ()
 
void SetConvergenceDistance (float distance)
 
float GetPhc ()
 
void SetPhc (float phase)
 
void GetConvergedOrthographicViewInfo (int32_t viewIndex, LEIA_CONST_FLOAT_SLICE(3) cameraPos, LEIA_CONST_FLOAT_SLICE(3) cameraDir, LEIA_CONST_FLOAT_SLICE(3) cameraUp, float width, float height, float nearPlane, float farPlane, LEIA_FLOAT_SLICE(3) viewPos, LEIA_FLOAT_SLICE(16) viewProjectionMatrix, float *viewShearX, float *viewShearY)
 
void GetConvergedPerspectiveViewInfo (int32_t viewIndex, LEIA_CONST_FLOAT_SLICE(3) cameraPos, LEIA_CONST_FLOAT_SLICE(3) cameraDir, LEIA_CONST_FLOAT_SLICE(3) cameraUp, float fieldOfView, float aspectRatio, float nearPlane, float farPlane, LEIA_FLOAT_SLICE(3) viewPos, LEIA_FLOAT_SLICE(16) viewProjectionMatrix, float *viewFieldOfView, float *viewShearX, float *viewShearY)
 
void SetFitMode (FitMode mode)
 
LEIA_NODISCARD FitMode GetFitMode ()
 
void GetRectMatrix (LEIA_FLOAT_SLICE(16) transformMatrix)
 
void SetLocalMatrix (LEIA_CONST_FLOAT_SLICE(16) transformMatrix)
 
void SetCustomTextureMatrix (LEIA_CONST_FLOAT_SLICE(16) textureTransform)
 
void EnableUserMatrix (bool enabled)
 
void GetUserMatrix (LEIA_FLOAT_SLICE(16) transformMatrix)
 
void SetUserMatrix (LEIA_CONST_FLOAT_SLICE(16) transformMatrix)
 
void SetAlpha (float alpha)
 
void SetFlipInputUvVertical (bool flip)
 
void SetSingleViewMode (bool setSingleView, int32_t singleViewIndex)
 
void SetSingleViewModeListener (InterlacerSingleViewModeListener const *listener)
 
void SetSourceViewsSize (int32_t sourceWidth, int32_t sourceHeight, bool isHorizontalViews)
 
void GetSourceViewsSize (int32_t *sourceWidth, int32_t *sourceHeight, bool *isHorizontalViews)
 
void SetSourceMediaIsVideo (bool isVideo)
 
void SetSourceMediaScale (float scaleX, float scaleY)
 
void SetSourceViewsSRGB (bool isSRGB)
 
void SetInShaderSRGBConversion (bool sRGBRead, bool sRGBWrite)
 
void SetViewportScreenPosition (int32_t posX, int32_t posY)
 
void SetViewport (int32_t posX, int32_t posY, int32_t width, int32_t height)
 
void EnableReconvergence (bool enable)
 
LEIA_NODISCARD bool IsReconvergenceEnabled ()
 
LEIA_NODISCARD float GetReconvergence (int layer=0)
 Get the reconvergence amount.
 
void SetReconvergence (float value, int layer=0)
 Set the reconvergence amount.
 
void SetReconvergenceZoom (bool zoomX, bool zoomXY, int layer=0)
 Set what directions reconvergence is calculated for.
 
void SetUseAtlasForViews (bool useAtlasForViews)
 
LEIA_NODISCARD bool GetUseAtlasForViews ()
 
void GetViewOffset (int32_t view, LEIA_FLOAT_SLICE(3) offset)
 
void SetInvertScreenTextureCoordinates (bool invert)
 
LEIA_NODISCARD GraphicsAPI GetGraphicsAPI ()
 
LEIA_NODISCARD leia_interlacerGetHandle () const
 

Protected Member Functions

 Interlacer (leia_interlacer *interlacer, bool isInterlacerOwned)
 

Protected Attributes

leia_interlacer_interlacer
 
bool _isInterlacerOwned
 

Detailed Description

C++ wrapper for leia_interlacer.

Constructor & Destructor Documentation

◆ Interlacer() [1/4]

Interlacer ( )
inline

◆ ~Interlacer()

~Interlacer ( )
inline

◆ Interlacer() [2/4]

Interlacer ( Interlacer const &  )
delete

◆ Interlacer() [3/4]

Interlacer ( Interlacer &&  other)
inline

◆ Interlacer() [4/4]

Interlacer ( leia_interlacer interlacer,
bool  isInterlacerOwned 
)
inlineprotected

Member Function Documentation

◆ operator=() [1/2]

Interlacer & operator= ( Interlacer const &  )
delete

◆ operator=() [2/2]

Interlacer & operator= ( Interlacer &&  other)
inline

◆ operator bool()

operator bool ( ) const
inlineexplicit

◆ SetLayerCount()

void SetLayerCount ( int  layerCount)
inline

Sets the number of layers to interlace.

Use this method to set the number of layers you want to be interlaced.

See also
GetLayerCount
Parameters
layerCountNumber of layers.

◆ GetLayerCount()

LEIA_NODISCARD int GetLayerCount ( ) const
inline

Gets the current number of layers.

See also
SetLayerCount
Returns
The number of layers that will be interlaced.

◆ SetNumTiles()

void SetNumTiles ( int32_t  tx,
int32_t  ty 
)
inline

◆ GetNumTiles()

void GetNumTiles ( int32_t *  tx,
int32_t *  ty 
) const
inline

◆ SetTileLayout()

void SetTileLayout ( TileLayout  tileLayout)
inline

◆ SetOutputAsTiles()

void SetOutputAsTiles ( bool  enable)
inline

◆ SetBaselineScaling()

void SetBaselineScaling ( float  baseline)
inline

◆ GetBaselineScaling()

LEIA_NODISCARD float GetBaselineScaling ( )
inline

◆ GetConvergenceDistance()

LEIA_NODISCARD float GetConvergenceDistance ( )
inline

◆ SetConvergenceDistance()

void SetConvergenceDistance ( float  distance)
inline

◆ GetPhc()

float GetPhc ( )
inline

◆ SetPhc()

void SetPhc ( float  phase)
inline

◆ GetConvergedOrthographicViewInfo()

void GetConvergedOrthographicViewInfo ( int32_t  viewIndex,
LEIA_CONST_FLOAT_SLICE(3)  cameraPos,
LEIA_CONST_FLOAT_SLICE(3)  cameraDir,
LEIA_CONST_FLOAT_SLICE(3)  cameraUp,
float  width,
float  height,
float  nearPlane,
float  farPlane,
LEIA_FLOAT_SLICE(3)  viewPos,
LEIA_FLOAT_SLICE(16)  viewProjectionMatrix,
float *  viewShearX,
float *  viewShearY 
)
inline

◆ GetConvergedPerspectiveViewInfo()

void GetConvergedPerspectiveViewInfo ( int32_t  viewIndex,
LEIA_CONST_FLOAT_SLICE(3)  cameraPos,
LEIA_CONST_FLOAT_SLICE(3)  cameraDir,
LEIA_CONST_FLOAT_SLICE(3)  cameraUp,
float  fieldOfView,
float  aspectRatio,
float  nearPlane,
float  farPlane,
LEIA_FLOAT_SLICE(3)  viewPos,
LEIA_FLOAT_SLICE(16)  viewProjectionMatrix,
float *  viewFieldOfView,
float *  viewShearX,
float *  viewShearY 
)
inline

◆ SetFitMode()

void SetFitMode ( FitMode  mode)
inline

◆ GetFitMode()

LEIA_NODISCARD FitMode GetFitMode ( )
inline

◆ GetRectMatrix()

void GetRectMatrix ( LEIA_FLOAT_SLICE(16)  transformMatrix)
inline

◆ SetLocalMatrix()

void SetLocalMatrix ( LEIA_CONST_FLOAT_SLICE(16)  transformMatrix)
inline

◆ SetCustomTextureMatrix()

void SetCustomTextureMatrix ( LEIA_CONST_FLOAT_SLICE(16)  textureTransform)
inline

◆ EnableUserMatrix()

void EnableUserMatrix ( bool  enabled)
inline

◆ GetUserMatrix()

void GetUserMatrix ( LEIA_FLOAT_SLICE(16)  transformMatrix)
inline

◆ SetUserMatrix()

void SetUserMatrix ( LEIA_CONST_FLOAT_SLICE(16)  transformMatrix)
inline

◆ SetAlpha()

void SetAlpha ( float  alpha)
inline

◆ SetFlipInputUvVertical()

void SetFlipInputUvVertical ( bool  flip)
inline

◆ SetSingleViewMode()

void SetSingleViewMode ( bool  setSingleView,
int32_t  singleViewIndex 
)
inline

◆ SetSingleViewModeListener()

void SetSingleViewModeListener ( InterlacerSingleViewModeListener const *  listener)
inline

◆ SetSourceViewsSize()

void SetSourceViewsSize ( int32_t  sourceWidth,
int32_t  sourceHeight,
bool  isHorizontalViews 
)
inline

◆ GetSourceViewsSize()

void GetSourceViewsSize ( int32_t *  sourceWidth,
int32_t *  sourceHeight,
bool *  isHorizontalViews 
)
inline

◆ SetSourceMediaIsVideo()

void SetSourceMediaIsVideo ( bool  isVideo)
inline

◆ SetSourceMediaScale()

void SetSourceMediaScale ( float  scaleX,
float  scaleY 
)
inline

◆ SetSourceViewsSRGB()

void SetSourceViewsSRGB ( bool  isSRGB)
inline

◆ SetInShaderSRGBConversion()

void SetInShaderSRGBConversion ( bool  sRGBRead,
bool  sRGBWrite 
)
inline

◆ SetViewportScreenPosition()

void SetViewportScreenPosition ( int32_t  posX,
int32_t  posY 
)
inline

◆ SetViewport()

void SetViewport ( int32_t  posX,
int32_t  posY,
int32_t  width,
int32_t  height 
)
inline

◆ EnableReconvergence()

void EnableReconvergence ( bool  enable)
inline

◆ IsReconvergenceEnabled()

LEIA_NODISCARD bool IsReconvergenceEnabled ( )
inline

◆ GetReconvergence()

LEIA_NODISCARD float GetReconvergence ( int  layer = 0)
inline

Get the reconvergence amount.

Use this method to retrieve the reconvergence amount set via SetReconvergence().

See also
IsReconvergenceEnabled, EnableReconvergence, SetReconvergence, SetReconvergenceZoom
Parameters
[in]layerLayer for the reconverergence (default is 0)
Returns
The current reconvergence amount.

◆ SetReconvergence()

void SetReconvergence ( float  value,
int  layer = 0 
)
inline

Set the reconvergence amount.

Using reconvergence allows shifting the views to account for disparity.

See also
GetReconvergence, IsReconvergenceEnabled, EnableReconvergence, SetReconvergenceZoom
Parameters
[in]valueAmount of reconvergence.
[in]layerLayer for the reconverergence (default is 0)

◆ SetReconvergenceZoom()

void SetReconvergenceZoom ( bool  zoomX,
bool  zoomXY,
int  layer = 0 
)
inline

Set what directions reconvergence is calculated for.

Use this method to specify whether you wish to apply reconvergence horizontally or horizontally and vertically.

See also
GetReconvergence, IsReconvergenceEnabled, EnableReconvergence, SetReconvergence
Parameters
[in]zoomXWhether to apply reconvergence in the horizontal direction.
[in]zoomXYWhether to apply reconvergence in the horizontal and vertical direction.
[in]layerLayer for the reconverergence (default is 0)

◆ SetUseAtlasForViews()

void SetUseAtlasForViews ( bool  useAtlasForViews)
inline

◆ GetUseAtlasForViews()

LEIA_NODISCARD bool GetUseAtlasForViews ( )
inline

◆ GetViewOffset()

void GetViewOffset ( int32_t  view,
LEIA_FLOAT_SLICE(3)  offset 
)
inline

◆ SetInvertScreenTextureCoordinates()

void SetInvertScreenTextureCoordinates ( bool  invert)
inline

◆ GetGraphicsAPI()

LEIA_NODISCARD GraphicsAPI GetGraphicsAPI ( )
inline

◆ GetHandle()

LEIA_NODISCARD leia_interlacer * GetHandle ( ) const
inline

Field Documentation

◆ _interlacer

leia_interlacer* _interlacer
protected

◆ _isInterlacerOwned

bool _isInterlacerOwned
protected

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