Loading...
Searching...
No Matches
types.h File Reference

Defines all the types "TYPED" for which Vt creates a VtTYPEDArray typedef. More...

+ Include dependency graph for types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define VT_FLOATING_POINT_BUILTIN_VALUE_TYPES
 
#define VT_INTEGRAL_BUILTIN_VALUE_TYPES
 
#define VT_VEC_INT_VALUE_TYPES
 
#define VT_VEC_HALF_VALUE_TYPES
 
#define VT_VEC_FLOAT_VALUE_TYPES
 
#define VT_VEC_DOUBLE_VALUE_TYPES
 
#define VT_VEC_VALUE_TYPES
 
#define VT_MATRIX_FLOAT_VALUE_TYPES
 
#define VT_MATRIX_DOUBLE_VALUE_TYPES
 
#define VT_MATRIX_VALUE_TYPES
 
#define VT_GFRANGE_VALUE_TYPES
 
#define VT_RANGE_VALUE_TYPES
 
#define VT_STRING_VALUE_TYPES
 
#define VT_QUATERNION_VALUE_TYPES
 
#define VT_DUALQUATERNION_VALUE_TYPES
 
#define VT_NONARRAY_VALUE_TYPES
 
#define VT_TYPE(elem)   BOOST_PP_TUPLE_ELEM(2, 0, elem)
 
#define VT_TYPE_NAME(elem)   BOOST_PP_TUPLE_ELEM(2, 1, elem)
 
#define VT_BUILTIN_NUMERIC_VALUE_TYPES   VT_INTEGRAL_BUILTIN_VALUE_TYPES VT_FLOATING_POINT_BUILTIN_VALUE_TYPES
 
#define VT_BUILTIN_VALUE_TYPES   VT_BUILTIN_NUMERIC_VALUE_TYPES VT_STRING_VALUE_TYPES
 
#define VT_SCALAR_CLASS_VALUE_TYPES
 
#define VT_SCALAR_VALUE_TYPES   VT_SCALAR_CLASS_VALUE_TYPES VT_BUILTIN_VALUE_TYPES
 
#define VT_ARRAY_TYPEDEF(r, unused, elem)
 
#define VT_ARRAY_TYPE_TUPLE(r, unused, elem)
 
#define VT_ARRAY_VALUE_TYPES   BOOST_PP_SEQ_FOR_EACH(VT_ARRAY_TYPE_TUPLE, ~, VT_SCALAR_VALUE_TYPES)
 
#define VT_CLASS_VALUE_TYPES   VT_ARRAY_VALUE_TYPES VT_SCALAR_CLASS_VALUE_TYPES VT_NONARRAY_VALUE_TYPES
 
#define VT_VALUE_TYPES    VT_BUILTIN_VALUE_TYPES VT_CLASS_VALUE_TYPES
 
#define VT_SET_VALUE_TYPE_INDEX(r, unused, i, elem)
 
#define VT_SPECIALIZE_IS_VALUE_PROXY(r, unused, elem)
 

Functions

 VT_TYPE_IS_CHEAP_TO_COPY (TfToken)
 
constexpr int VtGetNumKnownValueTypes ()
 
template<class T >
constexpr int VtGetKnownValueTypeIndex ()
 Provide compile-time value type indexes for types that are "known" to Vt – specifically, those types that appear in VT_VALUE_TYPES.
 
template<class T >
constexpr bool VtIsKnownValueType ()
 Returns true if T is a type that appears in VT_VALUE_TYPES.
 
template<typename T >
VtZero ()
 

Detailed Description

Defines all the types "TYPED" for which Vt creates a VtTYPEDArray typedef.

Definition in file types.h.

Macro Definition Documentation

◆ VT_ARRAY_TYPE_TUPLE

#define VT_ARRAY_TYPE_TUPLE (   r,
  unused,
  elem 
)
Value:
(( BOOST_PP_CAT(Vt, BOOST_PP_CAT(VT_TYPE_NAME(elem), Array)) , \
BOOST_PP_CAT(VT_TYPE_NAME(elem), Array) ))

Definition at line 181 of file types.h.

◆ VT_ARRAY_TYPEDEF

#define VT_ARRAY_TYPEDEF (   r,
  unused,
  elem 
)
Value:
typedef VtArray< VT_TYPE(elem) > \
BOOST_PP_CAT(Vt, BOOST_PP_CAT(VT_TYPE_NAME(elem), Array)) ;
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:229

Definition at line 174 of file types.h.

◆ VT_ARRAY_VALUE_TYPES

#define VT_ARRAY_VALUE_TYPES   BOOST_PP_SEQ_FOR_EACH(VT_ARRAY_TYPE_TUPLE, ~, VT_SCALAR_VALUE_TYPES)

Definition at line 184 of file types.h.

◆ VT_BUILTIN_NUMERIC_VALUE_TYPES

#define VT_BUILTIN_NUMERIC_VALUE_TYPES   VT_INTEGRAL_BUILTIN_VALUE_TYPES VT_FLOATING_POINT_BUILTIN_VALUE_TYPES

Definition at line 151 of file types.h.

◆ VT_BUILTIN_VALUE_TYPES

#define VT_BUILTIN_VALUE_TYPES   VT_BUILTIN_NUMERIC_VALUE_TYPES VT_STRING_VALUE_TYPES

Definition at line 154 of file types.h.

◆ VT_CLASS_VALUE_TYPES

#define VT_CLASS_VALUE_TYPES   VT_ARRAY_VALUE_TYPES VT_SCALAR_CLASS_VALUE_TYPES VT_NONARRAY_VALUE_TYPES

Definition at line 187 of file types.h.

◆ VT_DUALQUATERNION_VALUE_TYPES

#define VT_DUALQUATERNION_VALUE_TYPES
Value:
(( GfDualQuath, DualQuath )) \
(( GfDualQuatf, DualQuatf )) \
(( GfDualQuatd, DualQuatd ))
Basic type: a real part quaternion and a dual part quaternion.
Definition: dualQuatd.h:67
Basic type: a real part quaternion and a dual part quaternion.
Definition: dualQuatf.h:67
Basic type: a real part quaternion and a dual part quaternion.
Definition: dualQuath.h:68

Definition at line 134 of file types.h.

◆ VT_FLOATING_POINT_BUILTIN_VALUE_TYPES

#define VT_FLOATING_POINT_BUILTIN_VALUE_TYPES
Value:
(( double, Double )) \
(( float, Float )) \
(( GfHalf, Half ))
pxr_half::half GfHalf
A 16-bit floating point data type.
Definition: half.h:41

Definition at line 55 of file types.h.

◆ VT_GFRANGE_VALUE_TYPES

#define VT_GFRANGE_VALUE_TYPES
Value:
(( GfRange3f, Range3f )) \
(( GfRange3d, Range3d )) \
(( GfRange2f, Range2f )) \
(( GfRange2d, Range2d )) \
(( GfRange1f, Range1f )) \
(( GfRange1d, Range1d ))
Basic type: 1-dimensional floating point range.
Definition: range1d.h:62
Basic type: 1-dimensional floating point range.
Definition: range1f.h:62
Basic type: 2-dimensional floating point range.
Definition: range2d.h:64
Basic type: 2-dimensional floating point range.
Definition: range2f.h:64
Basic type: 3-dimensional floating point range.
Definition: range3d.h:64
Basic type: 3-dimensional floating point range.
Definition: range3f.h:64

Definition at line 111 of file types.h.

◆ VT_INTEGRAL_BUILTIN_VALUE_TYPES

#define VT_INTEGRAL_BUILTIN_VALUE_TYPES
Value:
(( bool, Bool )) \
(( char, Char )) \
(( unsigned char, UChar )) \
(( short, Short )) \
(( unsigned short, UShort )) \
(( int, Int )) \
(( unsigned int, UInt )) \
(( int64_t, Int64 )) \
(( uint64_t, UInt64 ))

Definition at line 60 of file types.h.

◆ VT_MATRIX_DOUBLE_VALUE_TYPES

#define VT_MATRIX_DOUBLE_VALUE_TYPES
Value:
(( GfMatrix4d, Matrix4d )) \
(( GfMatrix3d, Matrix3d )) \
(( GfMatrix2d, Matrix2d ))
Stores a 2x2 matrix of double elements.
Definition: matrix2d.h:62
Stores a 3x3 matrix of double elements.
Definition: matrix3d.h:82
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:88

Definition at line 102 of file types.h.

◆ VT_MATRIX_FLOAT_VALUE_TYPES

#define VT_MATRIX_FLOAT_VALUE_TYPES
Value:
(( GfMatrix4f, Matrix4f )) \
(( GfMatrix3f, Matrix3f )) \
(( GfMatrix2f, Matrix2f )) \
Stores a 2x2 matrix of float elements.
Definition: matrix2f.h:62
Stores a 3x3 matrix of float elements.
Definition: matrix3f.h:82
Stores a 4x4 matrix of float elements.
Definition: matrix4f.h:88

Definition at line 97 of file types.h.

◆ VT_MATRIX_VALUE_TYPES

#define VT_MATRIX_VALUE_TYPES
Value:
VT_MATRIX_FLOAT_VALUE_TYPES \
VT_MATRIX_DOUBLE_VALUE_TYPES \

Definition at line 107 of file types.h.

◆ VT_NONARRAY_VALUE_TYPES

#define VT_NONARRAY_VALUE_TYPES
Value:
(( GfFrustum, Frustum)) \
(( GfMultiInterval, MultiInterval))
Basic type: View frustum.
Definition: frustum.h:88
GfMultiInterval represents a subset of the real number line as an ordered set of non-intersecting GfI...
Definition: multiInterval.h:47

Definition at line 139 of file types.h.

◆ VT_QUATERNION_VALUE_TYPES

#define VT_QUATERNION_VALUE_TYPES
Value:
(( GfQuath, Quath )) \
(( GfQuatf, Quatf )) \
(( GfQuatd, Quatd )) \
(( GfQuaternion, Quaternion ))
Basic type: a quaternion, a complex number with a real coefficient and three imaginary coefficients,...
Definition: quatd.h:60
Basic type: complex number with scalar real part and vector imaginary part.
Definition: quaternion.h:50
Basic type: a quaternion, a complex number with a real coefficient and three imaginary coefficients,...
Definition: quatf.h:60
Basic type: a quaternion, a complex number with a real coefficient and three imaginary coefficients,...
Definition: quath.h:61

Definition at line 128 of file types.h.

◆ VT_RANGE_VALUE_TYPES

#define VT_RANGE_VALUE_TYPES
Value:
VT_GFRANGE_VALUE_TYPES \
(( GfInterval, Interval )) \
(( GfRect2i, Rect2i ))
A basic mathematical interval class.
Definition: interval.h:50
A 2D rectangle with integer coordinates.
Definition: rect2i.h:60

Definition at line 119 of file types.h.

◆ VT_SCALAR_CLASS_VALUE_TYPES

#define VT_SCALAR_CLASS_VALUE_TYPES
Value:
VT_VEC_VALUE_TYPES \
VT_MATRIX_VALUE_TYPES \
VT_RANGE_VALUE_TYPES \
VT_QUATERNION_VALUE_TYPES \
VT_DUALQUATERNION_VALUE_TYPES

Definition at line 157 of file types.h.

◆ VT_SCALAR_VALUE_TYPES

#define VT_SCALAR_VALUE_TYPES   VT_SCALAR_CLASS_VALUE_TYPES VT_BUILTIN_VALUE_TYPES

Definition at line 164 of file types.h.

◆ VT_SET_VALUE_TYPE_INDEX

#define VT_SET_VALUE_TYPE_INDEX (   r,
  unused,
  i,
  elem 
)
Value:
template <> constexpr int \
GetIndex< VT_TYPE(elem) >() { \
return i; \
}

Definition at line 206 of file types.h.

◆ VT_SPECIALIZE_IS_VALUE_PROXY

#define VT_SPECIALIZE_IS_VALUE_PROXY (   r,
  unused,
  elem 
)
Value:
template <> struct \
VtIsValueProxy< VT_TYPE(elem) > : std::false_type {}; \
template <> struct \
VtIsTypedValueProxy< VT_TYPE(elem) > : std::false_type {}; \
template <> struct \
VtIsErasedValueProxy< VT_TYPE(elem) > : std::false_type {};

Definition at line 263 of file types.h.

◆ VT_STRING_VALUE_TYPES

#define VT_STRING_VALUE_TYPES
Value:
(( std::string, String )) \
(( TfToken, Token ))
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88

Definition at line 124 of file types.h.

◆ VT_TYPE

#define VT_TYPE (   elem)    BOOST_PP_TUPLE_ELEM(2, 0, elem)

Definition at line 144 of file types.h.

◆ VT_TYPE_NAME

#define VT_TYPE_NAME (   elem)    BOOST_PP_TUPLE_ELEM(2, 1, elem)

Definition at line 146 of file types.h.

◆ VT_VALUE_TYPES

#define VT_VALUE_TYPES    VT_BUILTIN_VALUE_TYPES VT_CLASS_VALUE_TYPES

Definition at line 190 of file types.h.

◆ VT_VEC_DOUBLE_VALUE_TYPES

#define VT_VEC_DOUBLE_VALUE_TYPES
Value:
(( GfVec4d, Vec4d )) \
(( GfVec3d, Vec3d )) \
(( GfVec2d, Vec2d ))
Basic type for a vector of 2 double components.
Definition: vec2d.h:63
Basic type for a vector of 3 double components.
Definition: vec3d.h:63
Basic type for a vector of 4 double components.
Definition: vec4d.h:63

Definition at line 86 of file types.h.

◆ VT_VEC_FLOAT_VALUE_TYPES

#define VT_VEC_FLOAT_VALUE_TYPES
Value:
(( GfVec4f, Vec4f )) \
(( GfVec3f, Vec3f )) \
(( GfVec2f, Vec2f ))
Basic type for a vector of 2 float components.
Definition: vec2f.h:63
Basic type for a vector of 3 float components.
Definition: vec3f.h:63
Basic type for a vector of 4 float components.
Definition: vec4f.h:63

Definition at line 81 of file types.h.

◆ VT_VEC_HALF_VALUE_TYPES

#define VT_VEC_HALF_VALUE_TYPES
Value:
(( GfVec4h, Vec4h )) \
(( GfVec3h, Vec3h )) \
(( GfVec2h, Vec2h ))
Basic type for a vector of 2 GfHalf components.
Definition: vec2h.h:64
Basic type for a vector of 3 GfHalf components.
Definition: vec3h.h:64
Basic type for a vector of 4 GfHalf components.
Definition: vec4h.h:64

Definition at line 76 of file types.h.

◆ VT_VEC_INT_VALUE_TYPES

#define VT_VEC_INT_VALUE_TYPES
Value:
(( GfVec4i, Vec4i )) \
(( GfVec3i, Vec3i )) \
(( GfVec2i, Vec2i ))
Basic type for a vector of 2 int components.
Definition: vec2i.h:61
Basic type for a vector of 3 int components.
Definition: vec3i.h:61
Basic type for a vector of 4 int components.
Definition: vec4i.h:61

Definition at line 71 of file types.h.

◆ VT_VEC_VALUE_TYPES

#define VT_VEC_VALUE_TYPES
Value:
VT_VEC_INT_VALUE_TYPES \
VT_VEC_HALF_VALUE_TYPES \
VT_VEC_FLOAT_VALUE_TYPES \
VT_VEC_DOUBLE_VALUE_TYPES

Definition at line 91 of file types.h.

Function Documentation

◆ VtGetKnownValueTypeIndex()

constexpr int VtGetKnownValueTypeIndex ( )
constexpr

Provide compile-time value type indexes for types that are "known" to Vt – specifically, those types that appear in VT_VALUE_TYPES.

Note that VtArray and VtValue can work with other types that are not these "known" types.

VtGetKnownValueTypeIndex can only be used with known types. Querying a type that is not known to Vt results in a compilation error. The set of known types and their indexes are not guaranteed to be stable across releases of the library.

Most clients should prefer VtVisitValue over direct use of the type index as VtVisitValue provides convenient and efficient access to the held value.

Definition at line 236 of file types.h.

◆ VtGetNumKnownValueTypes()

constexpr int VtGetNumKnownValueTypes ( )
constexpr

Definition at line 218 of file types.h.

◆ VtIsKnownValueType()

constexpr bool VtIsKnownValueType ( )
constexpr

Returns true if T is a type that appears in VT_VALUE_TYPES.

Definition at line 246 of file types.h.