diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-29 18:41:57 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-29 18:41:57 +0300 |
commit | 51c1927ccb546cffe30ebcd9e4ecf6aa07b96ce1 (patch) | |
tree | 33cd21ff83fc13b772201d2a9118f3b6706868b7 /intern/opensubdiv/opensubdiv_converter.cc | |
parent | 717a303a18de232ab740ee969108044a4ff7ee6e (diff) |
OpenSubdiv: Make topology orientation optional
Diffstat (limited to 'intern/opensubdiv/opensubdiv_converter.cc')
-rw-r--r-- | intern/opensubdiv/opensubdiv_converter.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/opensubdiv/opensubdiv_converter.cc b/intern/opensubdiv/opensubdiv_converter.cc index a84939f8d4d..fe12c840af5 100644 --- a/intern/opensubdiv/opensubdiv_converter.cc +++ b/intern/opensubdiv/opensubdiv_converter.cc @@ -134,6 +134,7 @@ inline bool TopologyRefinerFactory<OpenSubdiv_Converter>::assignComponentTopolog int num_vert_edges = conv.get_num_vert_edges(&conv, vert); int *vert_edges = new int[num_vert_edges]; conv.get_vert_edges(&conv, vert, vert_edges); +#ifdef OPENSUBDIV_ORIENT_TOPOLOGY /* Order vertex edges and faces in a CCW order. */ /* TODO(sergey): Look into possible optimizations here. */ bool *face_used = new bool[num_faces]; @@ -253,6 +254,10 @@ inline bool TopologyRefinerFactory<OpenSubdiv_Converter>::assignComponentTopolog } } #endif +#else /* OPENSUBDIV_ORIENT_TOPOLOGY */ + memcpy(&dst_vert_edges[0], vert_edges, sizeof(int) * num_vert_edges); + memcpy(&dst_vert_faces[0], vert_faces, sizeof(int) * num_vert_faces); +#endif /* OPENSUBDIV_ORIENT_TOPOLOGY */ delete [] vert_edges; delete [] vert_faces; |