ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/applications/nanoRodBuilder/GeometryBuilder.cpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/applications/nanoRodBuilder/GeometryBuilder.cpp (file contents):
Revision 2164 by chuckv, Mon Apr 11 21:37:30 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC

# Line 19 | Line 19
19   *    publication of scientific results based in part on use of the
20   *    program.  An acceptable form of acknowledgement is citation of
21   *    the article in which the program was described (Matthew
22 <                                                                                                                                                                                                                        *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
23 <                                                                                                                                                                                                                        *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
22 > *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
23 > *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
24   *    Parallel Simulation Engine for Molecular Dynamics,"
25 <                                                                                                                                                                                                                        *    J. Comput. Chem. 26, pp. 252-271 (2005))
25 > *    J. Comput. Chem. 26, pp. 252-271 (2005))
26   *
27   * 2. Redistributions of source code must retain the above copyright
28   *    notice, this list of conditions and the following disclaimer.
# Line 95 | Line 95 | class Build_nanorod : public CGAL::Modifier_base<HDS>
95   // A modifier creating a triangle with the incremental builder.
96   template <class HDS>
97   class Build_nanorod : public CGAL::Modifier_base<HDS> {
98 < public:
98 > public:
99    Vertex_handle end1;
100    Vertex_handle neight1;
101 <                Vertex_handle end2;
101 >  Vertex_handle end2;
102    Vertex_handle neight2;
103    
104    Build_nanorod() {}
# Line 243 | Line 243 | bool GeometryBuilder::isInsidePolyhedron(double x, dou
243  
244   bool GeometryBuilder::isInsidePolyhedron(double x, double y, double z) {
245          
246 <        Point_3 point(x,y,z);
246 >  Point_3 point(x,y,z);
247    Plane_iterator i;
248    Facet_iterator j;
249    for ( i =nanoRodPolyhedron.planes_begin(), j = nanoRodPolyhedron.facets_begin(); i != nanoRodPolyhedron.planes_end() && j !=nanoRodPolyhedron.facets_end(); ++i, ++j) {
# Line 263 | Line 263 | GeometryBuilder::GeometryBuilder(double length,double
263  
264  
265   GeometryBuilder::GeometryBuilder(double length,double width) {
266 < // Create the geometry for nanorod
266 >  // Create the geometry for nanorod
267    Build_nanorod<HalfedgeDS> nanorod;
268    
269    nanoRodPolyhedron.delegate( nanorod);
270    
271 <        double y1 = nanorod.end1->point().y() - nanorod.neight1->point().y();
272 <        double y2 = nanorod.end2->point().y() - nanorod.neight2->point().y();
273 <        
274 <        CGAL::Aff_transformation_3<Kernel> aff_tranformation( width,
275 <                                                                                                                                                                                                                                0.0,
276 <                                                                                                                                                                                                                                0.0,
277 <                                                                                                                                                                                                                                0.0,
278 <                                                                                                                                                                                                                                0.0,
279 <                                                                                                                                                                                                                                length,
280 <                                                                                                                                                                                                                                0.0,
281 <                                                                                                                                                                                                                                0.0,
282 <                                                                                                                                                                                                                                0.0,
283 <                                                                                                                                                                                                                                0.0,
284 <                                                                                                                                                                                                                                width,
285 <                                                                                                                                                                                                                                0.0);  
286 <        std::transform( nanoRodPolyhedron.points_begin(), nanoRodPolyhedron.points_end(), nanoRodPolyhedron.points_begin(), aff_tranformation);
271 >  double y1 = nanorod.end1->point().y() - nanorod.neight1->point().y();
272 >  double y2 = nanorod.end2->point().y() - nanorod.neight2->point().y();
273          
274 <        Point_3 point1(nanorod.end1->point().x(), y1 + nanorod.neight1->point().y(), nanorod.end1->point().z());
275 <        Point_3 point2(nanorod.end2->point().x(), y2+ nanorod.neight2->point().y(), nanorod.end2->point().z());
276 <        nanorod.end1->point() = point1;
277 <        nanorod.end2->point() = point2;
274 >  CGAL::Aff_transformation_3<Kernel> aff_tranformation( width,
275 >                                                        0.0,
276 >                                                        0.0,
277 >                                                        0.0,
278 >                                                        0.0,
279 >                                                        length,
280 >                                                        0.0,
281 >                                                        0.0,
282 >                                                        0.0,
283 >                                                        0.0,
284 >                                                        width,
285 >                                                        0.0);  
286 >  std::transform( nanoRodPolyhedron.points_begin(), nanoRodPolyhedron.points_end(), nanoRodPolyhedron.points_begin(), aff_tranformation);
287          
288 <        // Construct normal vector for each face.
289 <        std::transform( nanoRodPolyhedron.facets_begin(), nanoRodPolyhedron.facets_end(), nanoRodPolyhedron.planes_begin(),
290 <                                                                        Normal_vector());
288 >  Point_3 point1(nanorod.end1->point().x(), y1 + nanorod.neight1->point().y(), nanorod.end1->point().z());
289 >  Point_3 point2(nanorod.end2->point().x(), y2+ nanorod.neight2->point().y(), nanorod.end2->point().z());
290 >  nanorod.end1->point() = point1;
291 >  nanorod.end2->point() = point2;
292 >        
293 >  // Construct normal vector for each face.
294 >  std::transform( nanoRodPolyhedron.facets_begin(), nanoRodPolyhedron.facets_end(), nanoRodPolyhedron.planes_begin(),
295 >                  Normal_vector());
296          
297    
298          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines