File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
1616
1717#pragma once
1818
19+ #include < iostream>
1920#include < cmath>
2021#include < algorithm>
2122
@@ -38,12 +39,18 @@ namespace RadeonProRender
3839 float3& operator *= (float3 const & o) { x*=o.x ; y*=o.y ; z*= o.z ; return *this ;}
3940 float3& operator *= (float c) { x*=c; y*=c; z*= c; return *this ;}
4041 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);
4143
4244 float x, y, z, w;
4345 };
4446
4547 typedef float3 float4;
4648
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+ }
4754
4855 inline float3 operator +(float3 const & v1, float3 const & v2)
4956 {
You can’t perform that action at this time.
0 commit comments