Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
triangleIterator.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file
11 /// @brief
12 /// @author
13 
14 
15 #ifndef INCLUDED_protocols_viewer_triangleIterator_hh
16 #define INCLUDED_protocols_viewer_triangleIterator_hh
17 
18 
19 // AUTO-REMOVED #include <ObjexxFCL/FArray3A.hh>
20 // AUTO-REMOVED #include <numeric/all.fwd.hh>
21 #include <numeric/xyzVector.hh>
22 // AUTO-REMOVED #include <ObjexxFCL/FArray3P.hh>
23 // AUTO-REMOVED #include <ObjexxFCL/FArray4D.hh>
24 // AUTO-REMOVED #include <ObjexxFCL/FArray3D.hh>
25 // AUTO-REMOVED #include <ObjexxFCL/FArray2D.hh>
26 // AUTO-REMOVED #include <ObjexxFCL/FArray1D.hh>
27 
28 #include <vector>
29 
30 #include <ObjexxFCL/FArray3D.fwd.hh>
31 #include <ObjexxFCL/FArray4D.fwd.hh>
32 
33 
34 namespace protocols {
35 namespace viewer {
36 
38  public:
39  // Constructors and destructors
40  triangleIterator(ObjexxFCL::FArray3D_float const & density, float const & threshold);
42 
43  // Returns true if there is another triangle.
44  bool hasNext() const;
45 
46  // Takes three parallel arrays of length three which this methods sets
47  // to contain the vertix positions, normals, and velocities, respectively
48  // for the next triangle triangle. The precondition is hasNext() is
49  // true.
50  void next(numeric::xyzVector_float vertices[3], numeric::xyzVector_float normals[3]);
51 
52  private:
53  typedef std::vector<numeric::xyzVector_float> vecQueue;
54 
55  void aquireNextQueue();
56  void computeGradient();
57  void evalGradient(const numeric::xyzVector_float & pt, numeric::xyzVector_float & gradResult);
58 
59  // next indices
60  int nextX, nextY, nextZ;
61 
62  // grids and dimensions
63  float threshold;
64  ObjexxFCL::FArray3D_float const * densityPtr;
65  ObjexxFCL::FArray4D_float * gradPtr;
66  numeric::xyzVector_int size;
67 
68  // ques for future triangles
71 };
72 
73 }
74 }
75 
76 #endif