LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
Macros | Functions
WeaverC.h File Reference
#include "WeaverTypes.h"
Include dependency graph for WeaverC.h:

Go to the source code of this file.

Macros

#define DIMENCOSR_API_C
 

Functions

DIMENCOSR_API_C void SetGlobalParameters (struct FLOAT3 userPos)
 Set global shader parameters needed for weaving. More...
 
DIMENCOSR_API_C void SetGlobalParametersFromConfig (const char *configPath, struct FLOAT3 userPos)
 Set global shader parameters needed for weaving, using a different .ini file. More...
 
DIMENCOSR_API_C enum WeaverErrorCode LoadTexture (enum WeaverTextureType type, unsigned char **out_pTexture, int *out_width, int *out_height, int *out_channels, int *out_bitsPerPixel)
 Load a weaver texture. More...
 
DIMENCOSR_API_C enum WeaverErrorCode LoadTextureFlipped (enum WeaverTextureType type, unsigned char **out_pTexture, int *out_width, int *out_height, int *out_channels, int *out_bitsPerPixel)
 Load a weaver texture and flip it vertically. More...
 
DIMENCOSR_API_C void UnLoadCorrectionTexture (unsigned char **in_pTexture)
 Unloads a texture. More...
 
DIMENCOSR_API_C void FillInterpolators (struct FLOAT2 TextureRes, struct FLOAT4 *phases_offset, struct FLOAT4 *phases_scale_x, struct FLOAT4 *phases_scale_y, struct FLOAT4 *dxy_offset, struct FLOAT4 *dxy_scale_x, struct FLOAT4 *dxy_scale_y, struct FLOAT2 *ScreenPos_scale, struct FLOAT2 *ScreenPos_offset_x, struct FLOAT2 *ScreenPos_scale_y, struct FLOAT2 *WeaverVars_offset, struct FLOAT2 *WeaverVars_scale_x, struct FLOAT2 *WeaverVars_scale_y)
 
DIMENCOSR_API_C float GetXTalkFactor ()
 
DIMENCOSR_API_C float GetViewfilterSlope ()
 
DIMENCOSR_API_C float GetPattern ()
 
DIMENCOSR_API_C float GetSlant ()
 Returns slant as a coëfficiënt. More...
 
DIMENCOSR_API_C float GetPx ()
 Returns pitch in x direction in pixels. More...
 
DIMENCOSR_API_C float GetN ()
 Returns the refractive index N. More...
 
DIMENCOSR_API_C float GetDoN ()
 Returns D over N in millimeters. More...
 

Macro Definition Documentation

◆ DIMENCOSR_API_C

#define DIMENCOSR_API_C

Copyright (C) 2025 Leia, Inc.

Function Documentation

◆ FillInterpolators()

DIMENCOSR_API_C void FillInterpolators ( struct FLOAT2  TextureRes,
struct FLOAT4 phases_offset,
struct FLOAT4 phases_scale_x,
struct FLOAT4 phases_scale_y,
struct FLOAT4 dxy_offset,
struct FLOAT4 dxy_scale_x,
struct FLOAT4 dxy_scale_y,
struct FLOAT2 ScreenPos_scale,
struct FLOAT2 ScreenPos_offset_x,
struct FLOAT2 ScreenPos_scale_y,
struct FLOAT2 WeaverVars_offset,
struct FLOAT2 WeaverVars_scale_x,
struct FLOAT2 WeaverVars_scale_y 
)

◆ GetDoN()

DIMENCOSR_API_C float GetDoN ( )

Returns D over N in millimeters.

◆ GetN()

DIMENCOSR_API_C float GetN ( )

Returns the refractive index N.

◆ GetPattern()

DIMENCOSR_API_C float GetPattern ( )

◆ GetPx()

DIMENCOSR_API_C float GetPx ( )

Returns pitch in x direction in pixels.

◆ GetSlant()

DIMENCOSR_API_C float GetSlant ( )

Returns slant as a coëfficiënt.

◆ GetViewfilterSlope()

DIMENCOSR_API_C float GetViewfilterSlope ( )

◆ GetXTalkFactor()

DIMENCOSR_API_C float GetXTalkFactor ( )

◆ LoadTexture()

DIMENCOSR_API_C enum WeaverErrorCode LoadTexture ( enum WeaverTextureType  type,
unsigned char **  out_pTexture,
int *  out_width,
int *  out_height,
int *  out_channels,
int *  out_bitsPerPixel 
)

Load a weaver texture.

Parameters
[in]typeWeaver texture type.
[out]out_pTexturePointer to a texture.
[out]out_widthWidth in pixels.
[out]out_heightHeight in pixels.
[out]out_channelsAmount of channels.
[out]out_bitsPerPixelBits per pixel.
Returns
Error code

◆ LoadTextureFlipped()

DIMENCOSR_API_C enum WeaverErrorCode LoadTextureFlipped ( enum WeaverTextureType  type,
unsigned char **  out_pTexture,
int *  out_width,
int *  out_height,
int *  out_channels,
int *  out_bitsPerPixel 
)

Load a weaver texture and flip it vertically.

Parameters
[in]typeWeaver texture type.
[out]out_pTexturePointer to a texture.
[out]out_widthWidth in pixels.
[out]out_heightHeight in pixels.
[out]out_channelsAmount of channels.
[out]out_bitsPerPixelBits per pixel.
Returns
Error code

◆ SetGlobalParameters()

DIMENCOSR_API_C void SetGlobalParameters ( struct FLOAT3  userPos)

Set global shader parameters needed for weaving.

Parameters
userPosCentered location between the left-and right eye.

◆ SetGlobalParametersFromConfig()

DIMENCOSR_API_C void SetGlobalParametersFromConfig ( const char *  configPath,
struct FLOAT3  userPos 
)

Set global shader parameters needed for weaving, using a different .ini file.

Parameters
configPathCustom path for loading shader parameters.
userPosCentered location between the left-and right eye.

◆ UnLoadCorrectionTexture()

DIMENCOSR_API_C void UnLoadCorrectionTexture ( unsigned char **  in_pTexture)

Unloads a texture.

Parameters
in_pTexturePointer to a texture.