OpenSubdiv: opensubdiv/sdc/types.h Source File

| OpenSubdiv

Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1//
2// Copyright 2014 DreamWorks Animation LLC.
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://opensubdiv.org/license.
6//
7#ifndef OPENSUBDIV3_SDC_TYPES_H
8#define OPENSUBDIV3_SDC_TYPES_H
9
10#include "../version.h"
11
12namespace OpenSubdiv {
13namespace OPENSUBDIV_VERSION {
14
15namespace Sdc {
16
20 enum SchemeType {
21 SCHEME_BILINEAR,
22 SCHEME_CATMARK,
23 SCHEME_LOOP
24};
25
26
30 enum Split {
31 SPLIT_TO_QUADS,
32 SPLIT_TO_TRIS,
33 SPLIT_HYBRID
34};
35
40 struct SchemeTypeTraits {
41
42 static SchemeType GetType(SchemeType schemeType) { return schemeType; }
43
44 static Split GetTopologicalSplitType(SchemeType schemeType);
45 static int GetRegularFaceSize(SchemeType schemeType);
46 static int GetRegularVertexValence(SchemeType schemeType);
47 static int GetLocalNeighborhoodSize(SchemeType schemeType);
48
49 static char const* GetName(SchemeType schemeType);
50};
51
52
53} // end namespace sdc
54
55} // end namespace OPENSUBDIV_VERSION
56using namespace OPENSUBDIV_VERSION;
57} // end namespace OpenSubdiv
58
59#endif /* OPENSUBDIV3_SDC_TYPES_H */
OpenSubdiv
Definition limits.h:15
OpenSubdiv::OPENSUBDIV_VERSION
Definition limits.h:16
OpenSubdiv::OPENSUBDIV_VERSION::Sdc
Definition bilinearScheme.h:17
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::Split
Split
Enumerated type for all face splitting schemes.
Definition types.h:30
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SPLIT_TO_TRIS
@ SPLIT_TO_TRIS
Used by Loop.
Definition types.h:32
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SPLIT_TO_QUADS
@ SPLIT_TO_QUADS
Used by Catmark and Bilinear.
Definition types.h:31
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SPLIT_HYBRID
@ SPLIT_HYBRID
Not currently used (potential future extension).
Definition types.h:33
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SchemeType
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
Definition types.h:20
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SCHEME_BILINEAR
@ SCHEME_BILINEAR
Definition types.h:21
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SCHEME_CATMARK
@ SCHEME_CATMARK
Definition types.h:22
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SCHEME_LOOP
@ SCHEME_LOOP
Definition types.h:23
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SchemeTypeTraits
Traits associated with the types of all subdivision schemes – parameterized by the scheme type....
Definition types.h:40
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SchemeTypeTraits::GetType
static SchemeType GetType(SchemeType schemeType)
Definition types.h:42
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SchemeTypeTraits::GetName
static char const * GetName(SchemeType schemeType)
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SchemeTypeTraits::GetRegularFaceSize
static int GetRegularFaceSize(SchemeType schemeType)
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SchemeTypeTraits::GetLocalNeighborhoodSize
static int GetLocalNeighborhoodSize(SchemeType schemeType)
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SchemeTypeTraits::GetTopologicalSplitType
static Split GetTopologicalSplitType(SchemeType schemeType)
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::SchemeTypeTraits::GetRegularVertexValence
static int GetRegularVertexValence(SchemeType schemeType)