libsurf
Programmer's Documentation

multisurfprojector.h (r6227/r5385)
1 
2 /* Copyright (C) 2015 David Eller <david@larosterna.com>
3  *
4  * Commercial License Usage
5  * Licensees holding valid commercial licenses may use this file in accordance
6  * with the terms contained in their respective non-exclusive license agreement.
7  * For further information contact david@larosterna.com .
8  *
9  * GNU General Public License Usage
10  * Alternatively, this file may be used under the terms of the GNU General
11  * Public License version 3.0 as published by the Free Software Foundation and
12  * appearing in the file gpl.txt included in the packaging of this file.
13  */
14 
15 #ifndef SURF_MULTISURFPROJECTOR_H
16 #define SURF_MULTISURFPROJECTOR_H
17 
18 #include "surface.h"
19 #include <genua/transformation.h>
20 #include <genua/boxsearchtree.h>
21 #include <boost/shared_ptr.hpp>
22 
33 {
34 public:
35 
38 
40  bool empty() const {return surfaces.empty();}
41 
43  uint size() const {return surfaces.size();}
44 
46  void transformation(const Trafo3d & t);
47 
49  void append(SurfacePtr psf, const PointList<2> & uv);
50 
52  void append(SurfacePtr psf);
53 
55  void buildTree();
56 
58  void clear();
59 
61  Vct3 project(const Vct3 & p) const;
62 
63 protected:
64 
66  Mtx44 c2s, s2c;
67 
69  std::vector<SurfacePtr> surfaces;
70 
73 
75  Indices surfidx;
76 
79 
81  Real pjtol, uvtol;
82 };
83 
84 typedef boost::shared_ptr<MultiSurfProjector> MultiSurfProjectorPtr;
85 
86 #endif // MULTISURFPROJECTOR_H
uint size() const
number of surfaces attached
Definition: multisurfprojector.h:43
std::vector< SurfacePtr > surfaces
continuous surfaces
Definition: multisurfprojector.h:69
Mtx44 c2s
transformation mapping discretized surfaces to model space
Definition: multisurfprojector.h:66
MultiSurfProjector()
construct projector
Definition: multisurfprojector.cpp:20
void buildTree()
construct vertex search tree
Definition: multisurfprojector.cpp:72
void clear()
clear stored data
Definition: multisurfprojector.cpp:87
Project point onto nearest of multiple surfaces.
Definition: multisurfprojector.h:32
bool empty() const
undefined/empty projector
Definition: multisurfprojector.h:40
void transformation(const Trafo3d &t)
set transformation
Definition: multisurfprojector.cpp:26
Vct3 project(const Vct3 &p) const
compute projected point on surface
Definition: multisurfprojector.cpp:97
BSearchTree btree
vertex search tree
Definition: multisurfprojector.h:78
Real pjtol
projection tolerance in 3D and uv-space
Definition: multisurfprojector.h:81
void append(SurfacePtr psf, const PointList< 2 > &uv)
append a surface patch to search structure
Definition: multisurfprojector.cpp:34
Indices surfidx
surface index for each node
Definition: multisurfprojector.h:75
PointList< 2 > parpos
list of parametric locations (u,v)
Definition: multisurfprojector.h:72
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5