Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
WeaverTypes.h
Go to the documentation of this file.
1
10#pragma once
11
12#ifdef WIN32
13# ifdef COMPILING_DLL_DimencoWeaving
14# define DIMENCOSR_API __declspec(dllexport)
15# else
16# define DIMENCOSR_API __declspec(dllimport)
17# endif
18#else
19# define DIMENCOSR_API
20#endif
21
25};
26
32};
33
35 float x, y;
36#ifdef __cplusplus
37 FLOAT2(float x = 0, float y = 0) : x(x), y(y) {}
38 FLOAT2 operator/(const float a) const { return { x / a , y / a }; }
39 FLOAT2 operator+(const FLOAT2& a) const { return { x + a.x, y + a.y }; }
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#endif
43};
44
46 float x, y, z;
47#ifdef __cplusplus
48 FLOAT3(float x = 0, float y = 0, float z = 0) : x(x), y(y), z(z) {}
49 FLOAT3 operator/(const float a) const { return {x / a, y / a, z / a}; }
50#endif
51};
52
54 float x, y, z, w;
55#ifdef __cplusplus
56 FLOAT4(float x = 0, float y = 0, float z = 0, float w = 0) : x(x), y(y), z(z), w(w) {}
57 FLOAT4(FLOAT3 v) : x(v.x), y(v.y), z(v.z), w(0.0) {}
58 FLOAT4(FLOAT2 v) : x(v.x), y(v.y), z(0.0), w(0.0) {}
59
60 FLOAT4 operator/(const float a) const { return {x / a, y / a, z / a, w / a}; }
61 FLOAT4 operator+(const FLOAT4& a) const { return {x + a.x, y + a.y, z + a.z, w + a.w}; }
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#endif
65};
66
67#undef DIMENCOSR_API
enum DIMENCOSR_API WeaverTextureType
Definition: WeaverTypes.h:22
#define DIMENCOSR_API
Definition: WeaverTypes.h:19
CorrectionB
Definition: WeaverTypes.h:24
WeaverTextureUnknownPixelFormat
Definition: WeaverTypes.h:31
enum DIMENCOSR_API WeaverErrorCode
Definition: WeaverTypes.h:27
WeaverTextureFailedToLoad
Definition: WeaverTypes.h:30
CorrectionA
Definition: WeaverTypes.h:23
WeaverTextureNotFound
Definition: WeaverTypes.h:29
WeaverSuccess
Definition: WeaverTypes.h:28
Definition: WeaverTypes.h:34
FLOAT2(float x=0, float y=0)
Definition: WeaverTypes.h:37
float x
Definition: WeaverTypes.h:35
FLOAT2 operator+(const FLOAT2 &a) const
Definition: WeaverTypes.h:39
FLOAT2 operator-(const FLOAT2 &a) const
Definition: WeaverTypes.h:40
float y
Definition: WeaverTypes.h:35
FLOAT2 operator*(const FLOAT2 &a) const
Definition: WeaverTypes.h:41
FLOAT2 operator/(const float a) const
Definition: WeaverTypes.h:38
Definition: WeaverTypes.h:45
FLOAT3 operator/(const float a) const
Definition: WeaverTypes.h:49
FLOAT3(float x=0, float y=0, float z=0)
Definition: WeaverTypes.h:48
float x
Definition: WeaverTypes.h:46
Definition: WeaverTypes.h:53
FLOAT4 operator+(const FLOAT4 &a) const
Definition: WeaverTypes.h:61
FLOAT4(float x=0, float y=0, float z=0, float w=0)
Definition: WeaverTypes.h:56
FLOAT4 operator*(const FLOAT4 &a) const
Definition: WeaverTypes.h:63
float w
Definition: WeaverTypes.h:54
float x
Definition: WeaverTypes.h:54
FLOAT4(FLOAT3 v)
Definition: WeaverTypes.h:57
float y
Definition: WeaverTypes.h:54
FLOAT4 operator/(const float a) const
Definition: WeaverTypes.h:60
FLOAT4(FLOAT2 v)
Definition: WeaverTypes.h:58
FLOAT4 operator-(const FLOAT4 &a) const
Definition: WeaverTypes.h:62
float z
Definition: WeaverTypes.h:54