HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
traits.h
Go to the documentation of this file.
1
//
2
// Copyright 2016 Pixar
3
//
4
// Licensed under the terms set forth in the LICENSE.txt file available at
5
// https://openusd.org/license.
6
//
7
#ifndef PXR_BASE_GF_TRAITS_H
8
#define PXR_BASE_GF_TRAITS_H
9
10
#include "
pxr/pxr.h
"
11
12
#include <type_traits>
13
14
PXR_NAMESPACE_OPEN_SCOPE
15
16
/// A metafunction with a static const bool member 'value' that is true for
17
/// GfVec types, like GfVec2i, GfVec4d, etc and false for all other types.
18
template
<
class
T>
19
struct
GfIsGfVec
{
static
const
bool
value
=
false
; };
20
21
/// A metafunction with a static const bool member 'value' that is true for
22
/// GfMatrix types, like GfMatrix3d, GfMatrix4f, etc and false for all other
23
/// types.
24
template
<
class
T>
25
struct
GfIsGfMatrix
{
static
const
bool
value
=
false
; };
26
27
/// A metafunction with a static const bool member 'value' that is true for
28
/// GfQuat types and false for all other types.
29
template
<
class
T>
30
struct
GfIsGfQuat
{
static
const
bool
value
=
false
; };
31
32
/// A metafunction with a static const bool member 'value' that is true for
33
/// GfDualQuat types and false for all other types.
34
template
<
class
T>
35
struct
GfIsGfDualQuat
{
static
const
bool
value
=
false
; };
36
37
/// A metafunction with a static const bool member 'value' that is true for
38
/// GfRange types and false for all other types.
39
template
<
class
T>
40
struct
GfIsGfRange
{
static
const
bool
value
=
false
; };
41
42
/// A metafunction which is equivalent to std::is_floating_point but
43
/// allows for additional specialization for types like GfHalf
44
template
<
class
T>
45
struct
GfIsFloatingPoint
:
public
std::is_floating_point
<T>{};
46
47
/// A metafunction which is equivalent to std::arithmetic but
48
/// also includes any specializations from GfIsFloatingPoint (like GfHalf)
49
template
<
class
T>
50
struct
GfIsArithmetic
:
public
std::integral_constant<
51
bool, GfIsFloatingPoint<T>::value || std::is_arithmetic<T>::value>{};
52
53
PXR_NAMESPACE_CLOSE_SCOPE
54
55
#endif // PXR_BASE_GF_TRAITS_H
value
GLsizei const GLfloat * value
Definition:
glcorearb.h:824
detail::is_floating_point
bool_constant< std::is_floating_point< T >::value||is_float128< T >::value > is_floating_point
Definition:
format.h:862
GfIsGfRange
Definition:
traits.h:40
GfIsGfDualQuat
Definition:
traits.h:35
GfIsGfVec
Definition:
traits.h:19
GfIsFloatingPoint
Definition:
traits.h:45
GfIsGfMatrix
Definition:
traits.h:25
pxr.h
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
GfIsGfQuat
Definition:
traits.h:30
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
GfIsArithmetic
Definition:
traits.h:50
pxr
base
gf
traits.h
Generated on Wed Aug 27 2025 03:07:15 for HDK by
1.8.6