csg_data.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Begin License:
  2. // Copyright (C) 2006-2014 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 either the GNU General
  8. // Public License version 2 or 3 (at your option) as published by the
  9. // Free Software Foundation and appearing in the files LICENSE.GPL2
  10. // and LICENSE.GPL3 included in the packaging of 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. #pragma once
  17. #include <carve/csg.hpp>
  18. #include "csg_detail.hpp"
  19. struct carve::csg::detail::Data {
  20. // * @param[out] vmap A mapping from vertex pointer to intersection point.
  21. // * @param[out] emap A mapping from edge pointer to intersection points.
  22. // * @param[out] fmap A mapping from face pointer to intersection points.
  23. // * @param[out] fmap_rev A mapping from intersection points to face pointers.
  24. // map from intersected vertex to intersection point.
  25. VVMap vmap;
  26. // map from intersected edge to intersection points.
  27. EIntMap emap;
  28. // map from intersected face to intersection points.
  29. FVSMap fmap;
  30. // map from intersection point to intersected faces.
  31. VFSMap fmap_rev;
  32. // created by divideEdges().
  33. // holds, for each edge, an ordered vector of inserted vertices.
  34. EVVMap divided_edges;
  35. // created by faceSplitEdges.
  36. FV2SMap face_split_edges;
  37. // mapping from vertex to edge for potentially intersected
  38. // faces. Saves building the vertex to edge map for all faces of
  39. // both meshes.
  40. VEVecMap vert_to_edges;
  41. };