HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Gf.h File Reference
+ Include dependency graph for UT_Gf.h:

Go to the source code of this file.

Classes

struct  GusdUT_Gf
 Helpers for working with Gf types (vectors, matrices, etc.) within the HDK. More...
 
struct  GusdUT_Gf::TypeEquivalence< GF_OR_UT_TYPE >
 
struct  GusdUT_Gf::Castable< GF_OR_UT_TYPE >
 

Macros

#define _GUSDUT_DECLARE_UNCASTABLE(TYPE)
 Declare a type as being uncastable. More...
 
#define _GUSDUT_DECLARE_PARTIAL_EQUIVALENCE(TYPE, GFTYPE, UTTYPE, ALTTYPE)
 
#define _GUSDUT_DECLARE_EQUIVALENCE(GFTYPE, UTTYPE)
 

Functions

 GUSDUT_DECLARE_POD_TUPLE (class GfVec2h, fpreal16, 2)
 Declare POD tuples for Gf types. More...
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec3h, fpreal16, 3)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec4h, fpreal16, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec2f, fpreal32, 2)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec3f, fpreal32, 3)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec4f, fpreal32, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec2d, fpreal64, 2)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec3d, fpreal64, 3)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec4d, fpreal64, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec2i, int32, 2)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec3i, int32, 3)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfVec4i, int32, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfQuath, fpreal16, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfQuatf, fpreal32, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfQuatd, fpreal64, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfMatrix2f, fpreal32, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfMatrix3f, fpreal32, 9)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfMatrix4f, fpreal32, 16)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfMatrix2d, fpreal64, 4)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfMatrix3d, fpreal64, 9)
 
 GUSDUT_DECLARE_POD_TUPLE (class GfMatrix4d, fpreal64, 16)
 
PXR_NAMESPACE_CLOSE_SCOPE SYS_DECLARE_IS_POD (PXR_NS::GfHalf)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec2h)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec3h)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec4h)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec2f)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec3f)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec4f)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec2d)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec3d)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec4d)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec2i)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec3i)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfVec4i)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfQuath)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfQuatf)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfQuatd)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfMatrix2f)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfMatrix3f)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfMatrix4f)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfMatrix2d)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfMatrix3d)
 
 SYS_DECLARE_IS_POD (PXR_NS::GfMatrix4d)
 
PXR_NAMESPACE_OPEN_SCOPE _GUSDUT_DECLARE_UNCASTABLE (class GfQuaternion)
 
 _GUSDUT_DECLARE_UNCASTABLE (class GfQuatf)
 
 _GUSDUT_DECLARE_UNCASTABLE (class GfQuatd)
 
 _GUSDUT_DECLARE_UNCASTABLE (UT_QuaternionF)
 
 _GUSDUT_DECLARE_UNCASTABLE (UT_QuaternionD)
 
 _GUSDUT_DECLARE_UNCASTABLE (UT_QuaternionH)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec2h, UT_Vector2H)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec3h, UT_Vector3H)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec4h, UT_Vector4H)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec2d, UT_Vector2D)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec3d, UT_Vector3D)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec4d, UT_Vector4D)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec2f, UT_Vector2F)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec3f, UT_Vector3F)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec4f, UT_Vector4F)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec2i, UT_Vector2i)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec3i, UT_Vector3i)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfVec4i, UT_Vector4i)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfQuatd, UT_QuaternionD)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfQuatf, UT_QuaternionF)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfQuath, UT_QuaternionH)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfMatrix2d, UT_Matrix2D)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfMatrix3d, UT_Matrix3D)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfMatrix4d, UT_Matrix4D)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfMatrix2f, UT_Matrix2F)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfMatrix3f, UT_Matrix3F)
 
 _GUSDUT_DECLARE_EQUIVALENCE (class GfMatrix4f, UT_Matrix4F)
 

Macro Definition Documentation

#define _GUSDUT_DECLARE_EQUIVALENCE (   GFTYPE,
  UTTYPE 
)
Value:
_GUSDUT_DECLARE_PARTIAL_EQUIVALENCE(GFTYPE,GFTYPE,UTTYPE,UTTYPE); \
_GUSDUT_DECLARE_PARTIAL_EQUIVALENCE(UTTYPE,GFTYPE,UTTYPE,GFTYPE);
#define _GUSDUT_DECLARE_PARTIAL_EQUIVALENCE(TYPE, GFTYPE, UTTYPE, ALTTYPE)
Definition: UT_Gf.h:232

Declare type equivalent between UT and Gf types. Only a single equivalence relationship may be defined per type.

The type info for both types must be declared first!

Definition at line 245 of file UT_Gf.h.

#define _GUSDUT_DECLARE_PARTIAL_EQUIVALENCE (   TYPE,
  GFTYPE,
  UTTYPE,
  ALTTYPE 
)
Value:
template <> \
static const bool isSpecialized = true; \
typedef GFTYPE GfType; \
typedef UTTYPE UtType; \
typedef ALTTYPE AltType; \
};

Declare a partial type equivalence. This specifies a one-way type equivalence.

Definition at line 232 of file UT_Gf.h.

#define _GUSDUT_DECLARE_UNCASTABLE (   TYPE)
Value:
template <> \
{ \
static const bool value = false; \
};
Definition: core.h:1131

Declare a type as being uncastable.

Definition at line 222 of file UT_Gf.h.

Function Documentation

_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec2h  ,
UT_Vector2H   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec3h  ,
UT_Vector3H   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec4h  ,
UT_Vector4H   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec2d  ,
UT_Vector2D   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec3d  ,
UT_Vector3D   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec4d  ,
UT_Vector4D   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec2f  ,
UT_Vector2F   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec3f  ,
UT_Vector3F   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec4f  ,
UT_Vector4F   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec2i  ,
UT_Vector2i   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec3i  ,
UT_Vector3i   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfVec4i  ,
UT_Vector4i   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfQuatd  ,
UT_QuaternionD   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfQuatf  ,
UT_QuaternionF   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfQuath  ,
UT_QuaternionH   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfMatrix2d  ,
UT_Matrix2D   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfMatrix3d  ,
UT_Matrix3D   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfMatrix4d  ,
UT_Matrix4D   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfMatrix2f  ,
UT_Matrix2F   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfMatrix3f  ,
UT_Matrix3F   
)
_GUSDUT_DECLARE_EQUIVALENCE ( class GfMatrix4f  ,
UT_Matrix4F   
)
PXR_NAMESPACE_OPEN_SCOPE _GUSDUT_DECLARE_UNCASTABLE ( class GfQuaternion  )
_GUSDUT_DECLARE_UNCASTABLE ( class GfQuatf  )
_GUSDUT_DECLARE_UNCASTABLE ( class GfQuatd  )
_GUSDUT_DECLARE_UNCASTABLE ( UT_QuaternionF  )
_GUSDUT_DECLARE_UNCASTABLE ( UT_QuaternionD  )
_GUSDUT_DECLARE_UNCASTABLE ( UT_QuaternionH  )
GUSDUT_DECLARE_POD_TUPLE ( class GfVec2h  ,
fpreal16  ,
 
)

Declare POD tuples for Gf types.

GUSDUT_DECLARE_POD_TUPLE ( class GfVec3h  ,
fpreal16  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec4h  ,
fpreal16  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec2f  ,
fpreal32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec3f  ,
fpreal32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec4f  ,
fpreal32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec2d  ,
fpreal64  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec3d  ,
fpreal64  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec4d  ,
fpreal64  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec2i  ,
int32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec3i  ,
int32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfVec4i  ,
int32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfQuath  ,
fpreal16  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfQuatf  ,
fpreal32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfQuatd  ,
fpreal64  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfMatrix2f  ,
fpreal32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfMatrix3f  ,
fpreal32  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfMatrix4f  ,
fpreal32  ,
16   
)
GUSDUT_DECLARE_POD_TUPLE ( class GfMatrix2d  ,
fpreal64  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfMatrix3d  ,
fpreal64  ,
 
)
GUSDUT_DECLARE_POD_TUPLE ( class GfMatrix4d  ,
fpreal64  ,
16   
)
PXR_NAMESPACE_CLOSE_SCOPE SYS_DECLARE_IS_POD ( PXR_NS::GfHalf  )

Declare types as PODs, so that UT_Arrays of the types can be optimized. This is done to ensure that Gf types are handled in the same manner as UT types: the same is done for UT types as well (see UT/UT_VectorTypes.h).

SYS_DECLARE_IS_POD ( PXR_NS::GfVec2h  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec3h  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec4h  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec2f  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec3f  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec4f  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec2d  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec3d  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec4d  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec2i  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec3i  )
SYS_DECLARE_IS_POD ( PXR_NS::GfVec4i  )
SYS_DECLARE_IS_POD ( PXR_NS::GfQuath  )
SYS_DECLARE_IS_POD ( PXR_NS::GfQuatf  )
SYS_DECLARE_IS_POD ( PXR_NS::GfQuatd  )
SYS_DECLARE_IS_POD ( PXR_NS::GfMatrix2f  )
SYS_DECLARE_IS_POD ( PXR_NS::GfMatrix3f  )
SYS_DECLARE_IS_POD ( PXR_NS::GfMatrix4f  )
SYS_DECLARE_IS_POD ( PXR_NS::GfMatrix2d  )
SYS_DECLARE_IS_POD ( PXR_NS::GfMatrix3d  )
SYS_DECLARE_IS_POD ( PXR_NS::GfMatrix4d  )