HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GusdUT_Gf Struct Reference

Helpers for working with Gf types (vectors, matrices, etc.) within the HDK. More...

#include <UT_Gf.h>

Classes

struct  Castable
 
struct  TypeEquivalence
 

Static Public Member Functions

template<class FROM , class TO >
static void Convert (const FROM &from, TO &to)
 
template<class T >
static const TypeEquivalence
< T >::AltType * 
Cast (const T *val)
 
template<class T >
static TypeEquivalence< T >
::AltType * 
Cast (T *val)
 
template<class T >
static const TypeEquivalence
< T >::AltType & 
Cast (const T &val)
 
template<class T >
static TypeEquivalence< T >
::AltType & 
Cast (T &val)
 
template<class FROM , class TO >
static const TO * Cast (const FROM *val)
 
template<class FROM , class TO >
static TO * Cast (FROM *val)
 
template<class FROM , class TO >
static const TO & Cast (const FROM &val)
 
template<class FROM , class TO >
static TO & Cast (FROM &val)
 
template<class T >
static void Convert (const GfQuaternion &from, UT_QuaternionT< T > &to)
 
template<class T >
static void Convert (const GfQuatd &from, UT_QuaternionT< T > &to)
 
template<class T >
static void Convert (const GfQuatf &from, UT_QuaternionT< T > &to)
 
template<class T >
static void Convert (const GfQuath &from, UT_QuaternionT< T > &to)
 
template<class T >
static void Convert (const GfVec4d &from, UT_QuaternionT< T > &to)
 
template<class T >
static void Convert (const GfVec4f &from, UT_QuaternionT< T > &to)
 
template<class T >
static void Convert (const UT_QuaternionT< T > &from, GfQuaternion &to)
 
template<class T >
static void Convert (const UT_QuaternionT< T > &from, GfQuatd &to)
 
template<class T >
static void Convert (const UT_QuaternionT< T > &from, GfQuatf &to)
 
template<class T >
static void Convert (const UT_QuaternionT< T > &from, GfQuath &to)
 
template<class T >
static void Convert (const UT_QuaternionT< T > &from, GfVec4d &to)
 
template<class T >
static void Convert (const UT_QuaternionT< T > &from, GfVec4f &to)
 

Detailed Description

Helpers for working with Gf types (vectors, matrices, etc.) within the HDK.

Definition at line 45 of file UT_Gf.h.

Member Function Documentation

template<class T >
const GusdUT_Gf::TypeEquivalence< T >::AltType * GusdUT_Gf::Cast ( const T val)
inlinestatic

Helpers for casting between UT and Gf types. The cast can go either way. This can be done with a reinterpret cast, but this cast adds a bit of extra compile-time checks to make sure that this really is safe.

These cast methods only take a single template argument. The output is cast to the equivalent type from the alternate API. For example, if given a UT_Matrix4D, the cast is to a GfMatrix4d, and vice versa.

Note
Any type used here must be declared with a specialization of GusdUT_TypeTraits::PODTuple (see GUSD_DECLARE_POD_TUPLE).

Examples:

// implicit cast of Gf->UT
UT_Matrix4D& mx = GusdUT_Gf::Cast(gfMatrix4dInstance);
UT_Matrix4D* mx = GusdUT_Gf::Cast(gfMatrix4dInstancePtr);
const UT_Matrix4D& mx = GusdUT_Gf::Cast(gfMatrix4dInstanceConst);
const UT_Matrix4D* mx = GusdUT_Gf::Cast(gfMatrix4dInstancePtrConst);
// implicit cast of UT->Gf
GfMatrix4d& mx = GusdUT_Gf::Cast(utMatrix4dInstance);
GfMatrix4d* mx = GusdUT_Gf::Cast(utMatrix4dInstancePtr);
const GfMatrix4d& mx = GusdUT_Gf::Cast(utMatrix4dInstanceConst);
const GfMatrix4d* mx = GusdUT_Gf::Cast(utMatrix4dInstancePtrConst);
// compile error! types are not bitwise compatible
// compile error! discards cv-qualifier.
const UT_Matrix4F& src = ...;

Definition at line 441 of file UT_Gf.h.

template<class T >
GusdUT_Gf::TypeEquivalence< T >::AltType * GusdUT_Gf::Cast ( T val)
inlinestatic

Helpers for casting between UT and Gf types. The cast can go either way. This can be done with a reinterpret cast, but this cast adds a bit of extra compile-time checks to make sure that this really is safe.

These cast methods only take a single template argument. The output is cast to the equivalent type from the alternate API. For example, if given a UT_Matrix4D, the cast is to a GfMatrix4d, and vice versa.

Note
Any type used here must be declared with a specialization of GusdUT_TypeTraits::PODTuple (see GUSD_DECLARE_POD_TUPLE).

Examples:

// implicit cast of Gf->UT
UT_Matrix4D& mx = GusdUT_Gf::Cast(gfMatrix4dInstance);
UT_Matrix4D* mx = GusdUT_Gf::Cast(gfMatrix4dInstancePtr);
const UT_Matrix4D& mx = GusdUT_Gf::Cast(gfMatrix4dInstanceConst);
const UT_Matrix4D* mx = GusdUT_Gf::Cast(gfMatrix4dInstancePtrConst);
// implicit cast of UT->Gf
GfMatrix4d& mx = GusdUT_Gf::Cast(utMatrix4dInstance);
GfMatrix4d* mx = GusdUT_Gf::Cast(utMatrix4dInstancePtr);
const GfMatrix4d& mx = GusdUT_Gf::Cast(utMatrix4dInstanceConst);
const GfMatrix4d* mx = GusdUT_Gf::Cast(utMatrix4dInstancePtrConst);
// compile error! types are not bitwise compatible
// compile error! discards cv-qualifier.
const UT_Matrix4F& src = ...;

Definition at line 432 of file UT_Gf.h.

template<class T >
const GusdUT_Gf::TypeEquivalence< T >::AltType & GusdUT_Gf::Cast ( const T val)
inlinestatic

Helpers for casting between UT and Gf types. The cast can go either way. This can be done with a reinterpret cast, but this cast adds a bit of extra compile-time checks to make sure that this really is safe.

These cast methods only take a single template argument. The output is cast to the equivalent type from the alternate API. For example, if given a UT_Matrix4D, the cast is to a GfMatrix4d, and vice versa.

Note
Any type used here must be declared with a specialization of GusdUT_TypeTraits::PODTuple (see GUSD_DECLARE_POD_TUPLE).

Examples:

// implicit cast of Gf->UT
UT_Matrix4D& mx = GusdUT_Gf::Cast(gfMatrix4dInstance);
UT_Matrix4D* mx = GusdUT_Gf::Cast(gfMatrix4dInstancePtr);
const UT_Matrix4D& mx = GusdUT_Gf::Cast(gfMatrix4dInstanceConst);
const UT_Matrix4D* mx = GusdUT_Gf::Cast(gfMatrix4dInstancePtrConst);
// implicit cast of UT->Gf
GfMatrix4d& mx = GusdUT_Gf::Cast(utMatrix4dInstance);
GfMatrix4d* mx = GusdUT_Gf::Cast(utMatrix4dInstancePtr);
const GfMatrix4d& mx = GusdUT_Gf::Cast(utMatrix4dInstanceConst);
const GfMatrix4d* mx = GusdUT_Gf::Cast(utMatrix4dInstancePtrConst);
// compile error! types are not bitwise compatible
// compile error! discards cv-qualifier.
const UT_Matrix4F& src = ...;

Definition at line 423 of file UT_Gf.h.

template<class T >
GusdUT_Gf::TypeEquivalence< T >::AltType & GusdUT_Gf::Cast ( T val)
inlinestatic

Helpers for casting between UT and Gf types. The cast can go either way. This can be done with a reinterpret cast, but this cast adds a bit of extra compile-time checks to make sure that this really is safe.

These cast methods only take a single template argument. The output is cast to the equivalent type from the alternate API. For example, if given a UT_Matrix4D, the cast is to a GfMatrix4d, and vice versa.

Note
Any type used here must be declared with a specialization of GusdUT_TypeTraits::PODTuple (see GUSD_DECLARE_POD_TUPLE).

Examples:

// implicit cast of Gf->UT
UT_Matrix4D& mx = GusdUT_Gf::Cast(gfMatrix4dInstance);
UT_Matrix4D* mx = GusdUT_Gf::Cast(gfMatrix4dInstancePtr);
const UT_Matrix4D& mx = GusdUT_Gf::Cast(gfMatrix4dInstanceConst);
const UT_Matrix4D* mx = GusdUT_Gf::Cast(gfMatrix4dInstancePtrConst);
// implicit cast of UT->Gf
GfMatrix4d& mx = GusdUT_Gf::Cast(utMatrix4dInstance);
GfMatrix4d* mx = GusdUT_Gf::Cast(utMatrix4dInstancePtr);
const GfMatrix4d& mx = GusdUT_Gf::Cast(utMatrix4dInstanceConst);
const GfMatrix4d* mx = GusdUT_Gf::Cast(utMatrix4dInstancePtrConst);
// compile error! types are not bitwise compatible
// compile error! discards cv-qualifier.
const UT_Matrix4F& src = ...;

Definition at line 414 of file UT_Gf.h.

template<class FROM , class TO >
const TO * GusdUT_Gf::Cast ( const FROM *  val)
inlinestatic

Explicit casts between UT and Gf types. This is just like the implicit cast methods, except that the source and target types are explicitly specified via template arguments. This can be used for casting between types when the types aren't exact counterparts. For instance, we can safely cast a GfMatrix2d to a UT_Vector4D, even though UT_Vector4D is not UT's equivalence type for GfMatrix2d.

Definition at line 378 of file UT_Gf.h.

template<class FROM , class TO >
TO * GusdUT_Gf::Cast ( FROM *  val)
inlinestatic

Explicit casts between UT and Gf types. This is just like the implicit cast methods, except that the source and target types are explicitly specified via template arguments. This can be used for casting between types when the types aren't exact counterparts. For instance, we can safely cast a GfMatrix2d to a UT_Vector4D, even though UT_Vector4D is not UT's equivalence type for GfMatrix2d.

Definition at line 387 of file UT_Gf.h.

template<class FROM , class TO >
const TO & GusdUT_Gf::Cast ( const FROM &  val)
inlinestatic

Explicit casts between UT and Gf types. This is just like the implicit cast methods, except that the source and target types are explicitly specified via template arguments. This can be used for casting between types when the types aren't exact counterparts. For instance, we can safely cast a GfMatrix2d to a UT_Vector4D, even though UT_Vector4D is not UT's equivalence type for GfMatrix2d.

Definition at line 396 of file UT_Gf.h.

template<class FROM , class TO >
TO & GusdUT_Gf::Cast ( FROM &  val)
inlinestatic

Explicit casts between UT and Gf types. This is just like the implicit cast methods, except that the source and target types are explicitly specified via template arguments. This can be used for casting between types when the types aren't exact counterparts. For instance, we can safely cast a GfMatrix2d to a UT_Vector4D, even though UT_Vector4D is not UT's equivalence type for GfMatrix2d.

Definition at line 405 of file UT_Gf.h.

template<class FROM , class TO >
void GusdUT_Gf::Convert ( const FROM &  from,
TO &  to 
)
inlinestatic

Convert between UT and Gf types. This works for any pod tuples that have equivalent tuple sizes, even if their underlying precision differs.

Note
Any type used here must be declared with a specialization of GusdUT_TypeTraits::PODTuple (see GUSD_DECLARE_POD_TUPLE).

Definition at line 450 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const GfQuaternion from,
UT_QuaternionT< T > &  to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 480 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const GfQuatd from,
UT_QuaternionT< T > &  to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 488 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const GfQuatf from,
UT_QuaternionT< T > &  to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 496 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const GfQuath from,
UT_QuaternionT< T > &  to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 504 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const GfVec4d from,
UT_QuaternionT< T > &  to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 512 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const GfVec4f from,
UT_QuaternionT< T > &  to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 520 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const UT_QuaternionT< T > &  from,
GfQuaternion to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 528 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const UT_QuaternionT< T > &  from,
GfQuatd to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 537 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const UT_QuaternionT< T > &  from,
GfQuatf to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 546 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const UT_QuaternionT< T > &  from,
GfQuath to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 555 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const UT_QuaternionT< T > &  from,
GfVec4d to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 565 of file UT_Gf.h.

template<class T >
void GusdUT_Gf::Convert ( const UT_QuaternionT< T > &  from,
GfVec4f to 
)
inlinestatic

Conversions between GF and UT quaternions. Gf and UT have a different ordering of the real component, hence the need for speciailized converters.

XXX: 4d vector types are sometimes used in place of GfQuaternion, hence their inclusion here. That is primarily the fault of USD: if USD gets a real quaternion type, we can clean these up.

Definition at line 573 of file UT_Gf.h.


The documentation for this struct was generated from the following file: