LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
WeaverTypes.h
Go to the documentation of this file.
1
5#pragma once
6
7#ifdef WIN32
8# ifdef COMPILING_DLL_DimencoWeaving
9# define DIMENCOSR_API __declspec(dllexport)
10# else
11# define DIMENCOSR_API __declspec(dllimport)
12# endif
13#else
14# define DIMENCOSR_API
15#endif
16
20};
21
27};
28
30 Off = 0,
31 Static = 1,
32 Dynamic = 2
33};
34
36 float x, y;
37#ifdef __cplusplus
38 FLOAT2(float x = 0, float y = 0) : x(x), y(y) {}
39 FLOAT2 operator/(const float a) const { return { x / a , y / a }; }
40 FLOAT2 operator+(const FLOAT2& a) const { return { x + a.x, y + a.y }; }
41 FLOAT2 operator-(const FLOAT2& a) const { return { x - a.x, y - a.y }; }
42 FLOAT2 operator*(const FLOAT2& a) const { return { x * a.x, y * a.y }; }
43#endif
44};
45
47 float x, y, z;
48#ifdef __cplusplus
49 FLOAT3(float x = 0, float y = 0, float z = 0) : x(x), y(y), z(z) {}
50 FLOAT3 operator/(const float a) const { return {x / a, y / a, z / a}; }
51#endif
52};
53
55 float x, y, z, w;
56#ifdef __cplusplus
57 FLOAT4(float x = 0, float y = 0, float z = 0, float w = 0) : x(x), y(y), z(z), w(w) {}
58 FLOAT4(FLOAT3 v) : x(v.x), y(v.y), z(v.z), w(0.0) {}
59 FLOAT4(FLOAT2 v) : x(v.x), y(v.y), z(0.0), w(0.0) {}
60
61 FLOAT4 operator/(const float a) const { return {x / a, y / a, z / a, w / a}; }
62 FLOAT4 operator+(const FLOAT4& a) const { return {x + a.x, y + a.y, z + a.z, w + a.w}; }
63 FLOAT4 operator-(const FLOAT4& a) const { return {x - a.x, y - a.y, z - a.z, w - a.w}; }
64 FLOAT4 operator*(const FLOAT4& a) const { return {x * a.x, y * a.y, z * a.z, w * a.w}; }
65#endif
66};
67
68#undef DIMENCOSR_API
enum DIMENCOSR_API WeaverTextureType
Definition: WeaverTypes.h:17
#define DIMENCOSR_API
Definition: WeaverTypes.h:14
CorrectionB
Definition: WeaverTypes.h:19
enum DIMENCOSR_API WeaverACTMode
Definition: WeaverTypes.h:29
WeaverTextureUnknownPixelFormat
Definition: WeaverTypes.h:26
Static
Definition: WeaverTypes.h:31
enum DIMENCOSR_API WeaverErrorCode
Definition: WeaverTypes.h:22
Off
Definition: WeaverTypes.h:30
WeaverTextureFailedToLoad
Definition: WeaverTypes.h:25
CorrectionA
Definition: WeaverTypes.h:18
WeaverTextureNotFound
Definition: WeaverTypes.h:24
WeaverSuccess
Definition: WeaverTypes.h:23
Definition: WeaverTypes.h:35
FLOAT2(float x=0, float y=0)
Definition: WeaverTypes.h:38
float x
Definition: WeaverTypes.h:36
FLOAT2 operator+(const FLOAT2 &a) const
Definition: WeaverTypes.h:40
FLOAT2 operator-(const FLOAT2 &a) const
Definition: WeaverTypes.h:41
float y
Definition: WeaverTypes.h:36
FLOAT2 operator*(const FLOAT2 &a) const
Definition: WeaverTypes.h:42
FLOAT2 operator/(const float a) const
Definition: WeaverTypes.h:39
Definition: WeaverTypes.h:46
FLOAT3 operator/(const float a) const
Definition: WeaverTypes.h:50
FLOAT3(float x=0, float y=0, float z=0)
Definition: WeaverTypes.h:49
float x
Definition: WeaverTypes.h:47
Definition: WeaverTypes.h:54
FLOAT4 operator+(const FLOAT4 &a) const
Definition: WeaverTypes.h:62
FLOAT4(float x=0, float y=0, float z=0, float w=0)
Definition: WeaverTypes.h:57
FLOAT4 operator*(const FLOAT4 &a) const
Definition: WeaverTypes.h:64
float w
Definition: WeaverTypes.h:55
float x
Definition: WeaverTypes.h:55
FLOAT4(FLOAT3 v)
Definition: WeaverTypes.h:58
float y
Definition: WeaverTypes.h:55
FLOAT4 operator/(const float a) const
Definition: WeaverTypes.h:61
FLOAT4(FLOAT2 v)
Definition: WeaverTypes.h:59
FLOAT4 operator-(const FLOAT4 &a) const
Definition: WeaverTypes.h:63
float z
Definition: WeaverTypes.h:55