|
HDK
|
#include <vecparam.h>
Public Member Functions | |
| OIIO_HOSTDEVICE constexpr | Vec3Param (T x, T y, T z) noexcept |
| Construct directly from 3 floats. More... | |
| template<typename V , OIIO_ENABLE_IF(has_xyz< V, T >::value) > | |
| OIIO_HOSTDEVICE constexpr | Vec3Param (const V &v) noexcept |
| template<typename V , OIIO_ENABLE_IF(has_subscript_N< V, T, 3 >::value &&!has_xyz< V, T >::value) > | |
| OIIO_HOSTDEVICE constexpr | Vec3Param (const V &v) noexcept |
| template<typename V , OIIO_ENABLE_IF(sizeof(V)==3 *sizeof(T)) > | |
| constexpr const V & | cast () const noexcept |
| template<typename V , OIIO_ENABLE_IF(has_subscript_N< V, T, 3 >::value||has_xyz< V, T >::value) > | |
| OIIO_HOSTDEVICE constexpr | operator const V & () const noexcept |
Public Attributes | |
| T | x |
| T | y |
| T | z |
Vec3Param<T> is a helper class that lets us create an interface that takes a proxy for a T[3] analogue for use as a public API function parameter type, in order to not expose the underlying vector type.
For example, suppose we have a public function like this:
void foo(Vec3Param<float> v);
Then any of the following calls will work:
float array[3]; foo(array); foo(Imath::V3f(1,2,3));
Definition at line 226 of file vecparam.h.
|
inlinenoexcept |
Construct directly from 3 floats.
Definition at line 229 of file vecparam.h.
|
inlinenoexcept |
Construct from anything that looks like a 3-vector, having .x, .y, and .z members of type T (and has exactly the size of a T[3]). This will implicitly convert from an Imath::Vector3<T>, among other things.
Definition at line 240 of file vecparam.h.
|
inlinenoexcept |
Construct from anything that looks like a 3-vector, having [] component access returning a T, and has exactly the size of a T[3].
Definition at line 252 of file vecparam.h.
|
inlinenoexcept |
Definition at line 277 of file vecparam.h.
|
inlinenoexcept |
Implicitly convert a Vec3Param<T> to a const V& for a V that looks like a 3-vector.
Definition at line 287 of file vecparam.h.