/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * AtomShapeDescriptor.cpp * * Created on: Aug 9, 2010 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "Helpers/MemDebug.hpp" #include "AtomShapeDescriptor.hpp" #include "AtomShapeDescriptor_impl.hpp" #include "atom.hpp" #include "Patterns/ObservedContainer_impl.hpp" #include "Shapes/Shape.hpp" using namespace std; AtomShapeDescriptor_impl::AtomShapeDescriptor_impl(Shape _shape) : shape(_shape) {} AtomShapeDescriptor_impl::~AtomShapeDescriptor_impl() {} bool AtomShapeDescriptor_impl::predicate(std::pair atom) { return shape.isInside(atom.second->getPosition()); } AtomDescriptor AtomByShape(Shape &_shape){ return AtomDescriptor(AtomDescriptor::impl_ptr(new AtomShapeDescriptor_impl(_shape))); }