File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVE
16
16
17
17
#pragma once
18
18
19
+ #include < iostream>
19
20
#include < cmath>
20
21
#include < algorithm>
21
22
@@ -38,12 +39,18 @@ namespace RadeonProRender
38
39
float3& operator *= (float3 const & o) { x*=o.x ; y*=o.y ; z*= o.z ; return *this ;}
39
40
float3& operator *= (float c) { x*=c; y*=c; z*= c; return *this ;}
40
41
float3& operator /= (float c) { float cinv = 1 .f /c; x*=cinv; y*=cinv; z*=cinv; return *this ;}
42
+ friend std::ostream& operator <<(std::ostream& os, const float3& o);
41
43
42
44
float x, y, z, w;
43
45
};
44
46
45
47
typedef float3 float4;
46
48
49
+ inline std::ostream& operator <<(std::ostream& os, const float3& o)
50
+ {
51
+ os << " [" << o.x << " , " << o.y << " , " << o.z << " , " << o.w << " ]" ;
52
+ return os;
53
+ }
47
54
48
55
inline float3 operator +(float3 const & v1, float3 const & v2)
49
56
{
You can’t perform that action at this time.
0 commit comments