diff options
author | Alexander Pinzon Fernandez <apinzonf@gmail.com> | 2013-12-11 20:10:22 +0400 |
---|---|---|
committer | Alexander Pinzon Fernandez <apinzonf@gmail.com> | 2013-12-11 20:10:22 +0400 |
commit | 2658a3c1b44717f497f187a38000c804eb37bbba (patch) | |
tree | ee55c673feabced8b6ec8bf9a8aa4d82a3cda3db /intern/cycles/subd/subd_mesh.h | |
parent | 4005cb1c6a63a217df0e887c741beee2c1359301 (diff) | |
parent | 09b859d03f0ee138c4273ef8460e91d9888387a1 (diff) |
Merge branch 'master' into soc-2013-sketch_meshsoc-2013-sketch_mesh
Conflicts:
release/scripts/addons
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/object/object_modifier.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/modifiers/intern/MOD_laplaciandeform.c
Diffstat (limited to 'intern/cycles/subd/subd_mesh.h')
-rw-r--r-- | intern/cycles/subd/subd_mesh.h | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/intern/cycles/subd/subd_mesh.h b/intern/cycles/subd/subd_mesh.h index e4bd5f192ab..f6aefc20318 100644 --- a/intern/cycles/subd/subd_mesh.h +++ b/intern/cycles/subd/subd_mesh.h @@ -35,22 +35,19 @@ CCL_NAMESPACE_BEGIN -class SubdFace; +#ifndef WITH_OPENSUBDIV class SubdVert; -class SubdEdge; +class SubdFace; +#endif class DiagSplit; class Mesh; -/* Subd Mesh, half edge based for dynamic mesh manipulation */ +/* Subd Mesh with simple linear subdivision */ class SubdMesh { public: - vector<SubdVert*> verts; - vector<SubdEdge*> edges; - vector<SubdFace*> faces; - SubdMesh(); ~SubdMesh(); @@ -60,28 +57,19 @@ public: SubdFace *add_face(int v0, int v1, int v2, int v3); SubdFace *add_face(int *index, int num); - bool link_boundary(); - void tessellate(DiagSplit *split, bool linear, - Mesh *mesh, int shader, bool smooth); + bool finish(); + void tessellate(DiagSplit *split); protected: - bool can_add_face(int *index, int num); - bool can_add_edge(int i, int j); - SubdEdge *add_edge(int i, int j); - SubdEdge *find_edge(int i, int j); - void link_boundary_edge(SubdEdge *edge); - - struct Key { - Key() {} - Key(int v0, int v1) : p0(v0), p1(v1) {} - - bool operator<(const Key& k) const - { return (p0 < k.p0 || (p0 == k.p0 && p1 < k.p1)); } - - int p0, p1; - }; +#ifdef WITH_OPENSUBDIV + void *_hbrmesh; + vector<float> positions; + int num_verts, num_ptex_faces; +#else + vector<SubdVert*> verts; + vector<SubdFace*> faces; +#endif - map<Key, SubdEdge *> edge_map; }; CCL_NAMESPACE_END |