LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
WeaverC.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "WeaverTypes.h"
8
9#ifdef WIN32
10#ifdef __cplusplus
11# ifdef COMPILING_DLL_DimencoWeaving
12# define DIMENCOSR_API_C extern "C" __declspec(dllexport)
13# else
14# define DIMENCOSR_API_C extern "C" __declspec(dllimport)
15# endif
16#else
17# ifdef COMPILING_DLL_DimencoWeaving
18# error Trying to compile DimencoWeaving.dll using a non-C++ compiler! Use a C++ compiler instead!
19# else
20# define DIMENCOSR_API_C __declspec(dllimport)
21# endif
22#endif
23#else
24# define DIMENCOSR_API_C
25#endif
26
32
38DIMENCOSR_API_C void SetGlobalParametersFromConfig(const char* configPath, struct FLOAT3 userPos);
39
50DIMENCOSR_API_C enum WeaverErrorCode LoadTexture(enum WeaverTextureType type, unsigned char** out_pTexture, int* out_width, int* out_height, int* out_channels, int* out_bitsPerPixel);
51
62DIMENCOSR_API_C enum WeaverErrorCode LoadTextureFlipped(enum WeaverTextureType type, unsigned char** out_pTexture, int* out_width, int* out_height, int* out_channels, int* out_bitsPerPixel);
63
68DIMENCOSR_API_C void UnLoadCorrectionTexture(unsigned char** in_pTexture);
69
70
72 struct FLOAT4* phases_offset, struct FLOAT4* phases_scale_x, struct FLOAT4* phases_scale_y,
73 struct FLOAT4* dxy_offset, struct FLOAT4* dxy_scale_x, struct FLOAT4* dxy_scale_y,
74 struct FLOAT2* ScreenPos_scale, struct FLOAT2* ScreenPos_offset_x, struct FLOAT2* ScreenPos_scale_y,
75 struct FLOAT2* WeaverVars_offset, struct FLOAT2* WeaverVars_scale_x, struct FLOAT2* WeaverVars_scale_y);
76
80
85
90
95
100
101#undef DIMENCOSR_API_C
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 void SetGlobalParametersFromConfig(const char *configPath, struct FLOAT3 userPos)
Set global shader parameters needed for weaving, using a different .ini file.
DIMENCOSR_API_C float GetPx()
Returns pitch in x direction in pixels.
DIMENCOSR_API_C void UnLoadCorrectionTexture(unsigned char **in_pTexture)
Unloads a texture.
DIMENCOSR_API_C float GetDoN()
Returns D over N in millimeters.
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.
DIMENCOSR_API_C float GetSlant()
Returns slant as a coëfficiënt.
DIMENCOSR_API_C void SetGlobalParameters(struct FLOAT3 userPos)
Set global shader parameters needed for weaving.
#define DIMENCOSR_API_C
Definition: WeaverC.h:24
DIMENCOSR_API_C float GetN()
Returns the refractive index N.
DIMENCOSR_API_C float GetXTalkFactor()
DIMENCOSR_API_C float GetPattern()
DIMENCOSR_API_C float GetViewfilterSlope()
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.
enum DIMENCOSR_API WeaverTextureType
Definition: WeaverTypes.h:17
enum DIMENCOSR_API WeaverErrorCode
Definition: WeaverTypes.h:22
Definition: WeaverTypes.h:35
Definition: WeaverTypes.h:46
Definition: WeaverTypes.h:54