~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to extern/carve/lib/csg_detail.hpp

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Begin License:
 
2
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
 
3
// All rights reserved.
 
4
//
 
5
// This file is part of the Carve CSG Library (http://carve-csg.com/)
 
6
//
 
7
// This file may be used under the terms of the GNU General Public
 
8
// License version 2.0 as published by the Free Software Foundation
 
9
// and appearing in the file LICENSE.GPL2 included in the packaging of
 
10
// this file.
 
11
//
 
12
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
 
13
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
 
14
// A PARTICULAR PURPOSE.
 
15
// End:
 
16
 
 
17
 
 
18
#pragma once
 
19
 
 
20
#include <carve/carve.hpp>
 
21
 
 
22
#include <carve/polyhedron_base.hpp>
 
23
 
 
24
namespace carve {
 
25
  namespace csg {
 
26
    namespace detail {
 
27
 
 
28
    typedef std::unordered_set<carve::mesh::MeshSet<3>::vertex_t *> VSet;
 
29
    typedef std::unordered_set<carve::mesh::MeshSet<3>::face_t *> FSet;
 
30
 
 
31
    typedef std::set<carve::mesh::MeshSet<3>::vertex_t *> VSetSmall;
 
32
    typedef std::set<csg::V2> V2SetSmall;
 
33
    typedef std::set<carve::mesh::MeshSet<3>::face_t *> FSetSmall;
 
34
 
 
35
    typedef std::unordered_map<carve::mesh::MeshSet<3>::vertex_t *, VSetSmall> VVSMap;
 
36
    typedef std::unordered_map<carve::mesh::MeshSet<3>::edge_t *, VSetSmall> EVSMap;
 
37
    typedef std::unordered_map<carve::mesh::MeshSet<3>::face_t *, VSetSmall> FVSMap;
 
38
 
 
39
    typedef std::unordered_map<carve::mesh::MeshSet<3>::vertex_t *, FSetSmall> VFSMap;
 
40
    typedef std::unordered_map<carve::mesh::MeshSet<3>::face_t *, V2SetSmall> FV2SMap;
 
41
 
 
42
    typedef std::unordered_map<
 
43
      carve::mesh::MeshSet<3>::edge_t *,
 
44
      std::vector<carve::mesh::MeshSet<3>::vertex_t *> > EVVMap;
 
45
 
 
46
      typedef std::unordered_map<carve::mesh::MeshSet<3>::vertex_t *,
 
47
                                 std::vector<carve::mesh::MeshSet<3>::edge_t *> > VEVecMap;
 
48
 
 
49
 
 
50
     class LoopEdges : public std::unordered_map<V2, std::list<FaceLoop *> > {
 
51
        typedef std::unordered_map<V2, std::list<FaceLoop *> > super;
 
52
 
 
53
      public:
 
54
        void addFaceLoop(FaceLoop *fl);
 
55
        void sortFaceLoopLists();
 
56
        void removeFaceLoop(FaceLoop *fl);
 
57
      };
 
58
 
 
59
    }
 
60
  }
 
61
}
 
62
 
 
63
 
 
64
 
 
65
static inline std::ostream &operator<<(std::ostream &o, const carve::csg::detail::FSet &s) {
 
66
  const char *sep="";
 
67
  for (carve::csg::detail::FSet::const_iterator i = s.begin(); i != s.end(); ++i) {
 
68
    o << sep << *i; sep=",";
 
69
  }
 
70
  return o;
 
71
}