30 #ifndef __optixu_optixu_math_stream_namespace_h__
31 #define __optixu_optixu_math_stream_namespace_h__
45 inline std::ostream& operator<<(std::ostream& os,
const optix::float4& v) { os <<
'[' << v.x <<
", " << v.y <<
", " << v.z <<
", " << v.w <<
']';
return os; }
46 inline std::istream& operator>>(std::istream& is, optix::float4& v) {
char st; is >> st >> v.x >> st >> v.y >> st >> v.z >> st >> v.w >> st;
return is; }
47 inline std::ostream& operator<<(std::ostream& os,
const optix::float3& v) { os <<
'[' << v.x <<
", " << v.y <<
", " << v.z <<
']';
return os; }
48 inline std::istream& operator>>(std::istream& is, optix::float3& v) {
char st; is >> st >> v.x >> st >> v.y >> st >> v.z >> st;
return is; }
49 inline std::ostream& operator<<(std::ostream& os,
const optix::float2& v) { os <<
'[' << v.x <<
", " << v.y <<
']';
return os; }
50 inline std::istream& operator>>(std::istream& is, optix::float2& v) {
char st; is >> st >> v.x >> st >> v.y >> st;
return is; }
57 inline std::ostream& operator<<(std::ostream& os,
const optix::int4& v) { os <<
'[' << v.x <<
", " << v.y <<
", " << v.z <<
", " << v.w <<
']';
return os; }
58 inline std::istream& operator>>(std::istream& is, optix::int4& v) {
char st; is >> st >> v.x >> st >> v.y >> st >> v.z >> st >> v.w >> st;
return is; }
59 inline std::ostream& operator<<(std::ostream& os,
const optix::int3& v) { os <<
'[' << v.x <<
", " << v.y <<
", " << v.z <<
']';
return os; }
60 inline std::istream& operator>>(std::istream& is, optix::int3& v) {
char st; is >> st >> v.x >> st >> v.y >> st >> v.z >> st;
return is; }
61 inline std::ostream& operator<<(std::ostream& os,
const optix::int2& v) { os <<
'[' << v.x <<
", " << v.y <<
']';
return os; }
62 inline std::istream& operator>>(std::istream& is, optix::int2& v) {
char st; is >> st >> v.x >> st >> v.y >> st;
return is; }
69 inline std::ostream& operator<<(std::ostream& os,
const optix::uint4& v) { os <<
'[' << v.x <<
", " << v.y <<
", " << v.z <<
", " << v.w <<
']';
return os; }
70 inline std::istream& operator>>(std::istream& is, optix::uint4& v) {
char st; is >> st >> v.x >> st >> v.y >> st >> v.z >> st >> v.w >> st;
return is; }
71 inline std::ostream& operator<<(std::ostream& os,
const optix::uint3& v) { os <<
'[' << v.x <<
", " << v.y <<
", " << v.z <<
']';
return os; }
72 inline std::istream& operator>>(std::istream& is, optix::uint3& v) {
char st; is >> st >> v.x >> st >> v.y >> st >> v.z >> st;
return is; }
73 inline std::ostream& operator<<(std::ostream& os,
const optix::uint2& v) { os <<
'[' << v.x <<
", " << v.y <<
']';
return os; }
74 inline std::istream& operator>>(std::istream& is, optix::uint2& v) {
char st; is >> st >> v.x >> st >> v.y >> st;
return is; }
80 inline std::ostream& operator<<( std::ostream& os,
const optix::Aabb& aabb )
81 { os << aabb[0] <<
" | " << aabb[1];
return os; }
87 template<
unsigned int M,
unsigned int N>
88 inline std::ostream& operator<<( std::ostream& os, const optix::Matrix<M,N>& m )
91 for (
unsigned int i = 0; i < N; ++i) {
93 for (
unsigned int j = 0; j < M; ++j) {
95 if(j < M-1) os <<
", ";
103 template<
unsigned int M,
unsigned int N>
108 for (
unsigned int i = 0; i < N; ++i) {
110 for (
unsigned int j = 0; j < M; ++j) {
112 if(j < M-1) is >> st;
127 #if defined(RT_PULL_IN_VECTOR_TYPES)
129 using optix::operator<<;
130 using optix::operator>>;
134 #endif // #ifndef __optixu_optixu_math_stream_namespace_h__
Axis-aligned bounding box.
Definition: optixu_aabb_namespace.h:73
A matrix with M rows and N columns.
Definition: optixu_matrix_namespace.h:54