UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
vec3 Struct Reference
Inheritance diagram for vec3:
Inheritance graph
Collaboration diagram for vec3:
Collaboration graph

Public Member Functions

__device__ vec3 (const uvec3 &v)
 
__device__ vec3 (const vec2 &v)
 
__device__ vec3 (float n=0.0f)
 
__device__ vec3 (float x, float y, float z)
 
__device__ vec2 gb () const
 
__device__ vec3 operator* (const float n) const
 
__device__ vec3 operator* (const vec3 &v) const
 
__device__ vec3 operator+ (const vec3 &o) const
 
__device__ vec3 operator- (const vec3 &o) const
 
__device__ vec3 operator/ (const float n) const
 
- Public Member Functions inherited from vec2
__device__ vec2 (const uvec2 &v)
 
__device__ vec2 (const vec3 &v)
 
__device__ vec2 (float n=0.0f)
 
__device__ vec2 (float x, float y)
 
__device__ vec2 operator* (const float n) const
 
__device__ vec2 operator* (const vec2 &v) const
 
__device__ vec2 operator+ (const vec2 &o) const
 
__device__ vec2 operator- (const vec2 &o) const
 
__device__ vec2 operator/ (const float n) const
 

Public Attributes

float b
 
- Public Attributes inherited from vec2
float g
 
float r
 

Detailed Description

Definition at line 55 of file cuda_dxt.cu.

Constructor & Destructor Documentation

◆ vec3() [1/4]

__device__ vec3::vec3 ( float x,
float y,
float z )
inline

Definition at line 57 of file cuda_dxt.cu.

57: vec2(x, y), b(z) {}
__device__ vec2(float x, float y)
Definition cuda_dxt.cu:27
float b
Definition cuda_dxt.cu:56

Referenced by operator*(), operator*(), and operator+().

◆ vec3() [2/4]

__device__ vec3::vec3 ( float n = 0.0f)
inline

Definition at line 58 of file cuda_dxt.cu.

58: vec2(n), b(n) {}

◆ vec3() [3/4]

__device__ vec3::vec3 ( const vec2 & v)
inline

Definition at line 59 of file cuda_dxt.cu.

59: vec2(v), b(0.0f) {}

◆ vec3() [4/4]

__device__ vec3::vec3 ( const uvec3 & v)
inline

Definition at line 60 of file cuda_dxt.cu.

60: vec2(v.r, v.g), b(v.b) {}
u32 g
Definition cuda_dxt.cu:19
u32 b
Definition cuda_dxt.cu:19
u32 r
Definition cuda_dxt.cu:19

Member Function Documentation

◆ gb()

__device__ vec2 vec3::gb ( ) const
inline

Definition at line 79 of file cuda_dxt.cu.

79 {
80 return vec2(g, b);
81 }
float g
Definition cuda_dxt.cu:26

References vec2::vec2(), b, and vec2::g.

Referenced by dxt_encode< 6 >(), and SelectYCoCgDiagonal().

Here is the call graph for this function:

◆ operator*() [1/2]

__device__ vec3 vec3::operator* ( const float n) const
inline

Definition at line 67 of file cuda_dxt.cu.

67 {
68 return *this * vec3(n);
69 }
__device__ vec3(float x, float y, float z)
Definition cuda_dxt.cu:57

References vec3().

Here is the call graph for this function:

◆ operator*() [2/2]

__device__ vec3 vec3::operator* ( const vec3 & v) const
inline

Definition at line 64 of file cuda_dxt.cu.

64 {
65 return vec3(r * v.r, g * v.g, b * v.b);
66 }
float r
Definition cuda_dxt.cu:26

References vec3(), b, vec2::g, and vec2::r.

Here is the call graph for this function:

◆ operator+()

__device__ vec3 vec3::operator+ ( const vec3 & o) const
inline

Definition at line 61 of file cuda_dxt.cu.

61 {
62 return vec3(r + o.r, g + o.g, b + o.b);
63 }

References vec3(), b, vec2::g, and vec2::r.

Here is the call graph for this function:

◆ operator-()

__device__ vec3 vec3::operator- ( const vec3 & o) const
inline

Definition at line 70 of file cuda_dxt.cu.

70 {
71 return *this + (o * -1.0f);
72 }

◆ operator/()

__device__ vec3 vec3::operator/ ( const float n) const
inline

Definition at line 73 of file cuda_dxt.cu.

73 {
74 return *this * (1.0f / n);
75 }

Member Data Documentation

◆ b

float vec3::b

Definition at line 56 of file cuda_dxt.cu.

Referenced by ConvertRGBToYCoCg(), dot(), dxt_encode< 6 >(), gb(), max(), min(), operator*(), operator+(), and round().


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