6 #define OIIO_VECPARAM_H 1
66 template<
typename T,
typename Base>
struct has_xy {
75 static Yes& test(
int);
78 template<
typename C>
static No& test(...);
82 value = (
sizeof(test<T>(0)) ==
sizeof(Yes)
83 &&
sizeof(
T) == 2 *
sizeof(Base))
91 template<
typename T,
typename Base>
struct has_xyz {
101 static Yes& test(
int);
104 template<
typename C>
static No& test(...);
108 value = (
sizeof(test<T>(0)) ==
sizeof(Yes)
109 &&
sizeof(
T) == 3 *
sizeof(Base))
117 template<
typename T,
typename Base>
struct has_xyzw {
128 static Yes& test(
int);
131 template<
typename C>
static No& test(...);
135 value = (
sizeof(test<T>(0)) ==
sizeof(Yes)
136 &&
sizeof(
T) == 4 *
sizeof(Base))
155 static Yes& test(
int);
158 template<
typename C>
static No& test(...);
162 value = (
sizeof(test<T>(0)) ==
sizeof(Yes)
163 &&
sizeof(
T) == Nelem *
sizeof(Base))
170 template<
typename Base,
int Nelem>
178 template<
typename T,
typename Base,
int Rows,
int Cols>
187 std::is_same<
typename std::decay<decltype(C()[0][0])>::
type,
189 static Yes& test(
int);
192 template<
typename C>
static No& test(...);
196 value = (
sizeof(test<T>(0)) ==
sizeof(Yes)
197 &&
sizeof(
T) == (Rows * Cols) *
sizeof(Base))
203 template<
typename Base,
int Rows,
int Cols>
205 :
public std::true_type {};
259 #ifdef INCLUDED_IMATHVEC_H
276 template<
typename V, OIIO_ENABLE_IF(sizeof(V) == 3 * sizeof(T))>
277 constexpr
const V&
cast() const noexcept
279 const char* p = (
const char*)
this;
322 static constexpr
int Size =
S;
329 : m_ptr((
const T*)&m)
333 #ifdef INCLUDED_IMATHMATRIX_H
339 operator const Imath::Matrix33<T>&()
const noexcept
341 return *(
const Imath::Matrix33<T>*)(m_ptr);
349 operator()() const noexcept
351 return *(
const Imath::Matrix33<T>*)(m_ptr);
359 operator const Imath::Matrix44<T>&()
const noexcept
361 return *(
const Imath::Matrix44<T>*)(m_ptr);
369 operator()() const noexcept
371 return *(
const Imath::Matrix44<T>*)(m_ptr);
376 const T*
data() const noexcept {
return m_ptr; }
GLsizei const GLfloat * value
GLdouble GLdouble GLdouble z
GLint GLint GLsizei GLint GLenum GLenum type
OIIO_HOSTDEVICE constexpr Vec3Param(const V &v) noexcept
const T * data() const noexcept
Return a pointer to the contiguous values comprising the matrix.
constexpr const V & cast() const noexcept
OIIO_HOSTDEVICE constexpr Vec3Param(T x, T y, T z) noexcept
Construct directly from 3 floats.
GLubyte GLubyte GLubyte GLubyte w
#define OIIO_NAMESPACE_END
#define OIIO_NAMESPACE_BEGIN
OIIO_HOSTDEVICE constexpr MatrixParam(const M &m) noexcept