Chemical Data Processing Library C++ API - Version 1.3.0
FeatureContainerObject3DFactory.hpp
Go to the documentation of this file.
1 /*
2  * FeatureContainerObject3DFactory.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_VIS_FEATURECONTAINEROBJECT3DFACTORY_HPP
30 #define CDPL_VIS_FEATURECONTAINEROBJECT3DFACTORY_HPP
31 
32 #include <memory>
33 
34 #include "CDPL/Vis/APIPrefix.hpp"
36 #include "CDPL/Vis/Shape3D.hpp"
37 #include "CDPL/Vis/ColorTable.hpp"
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Pharm
44  {
45 
46  class FeatureContainer;
47  class Feature;
48  }
49 
50  namespace Vis
51  {
52 
58  class CDPL_VIS_API FeatureContainerObject3DFactory : public Object3DFactory<Pharm::FeatureContainer>
59  {
60 
61  public:
65  typedef std::shared_ptr<FeatureContainerObject3DFactory> SharedPointer;
66 
68 
69  private:
70 
71  void createHBondDonorFeatureRepr(Object3D& parent_obj, const Pharm::Feature& ftr, unsigned int ftr_type, bool dual) const;
72  void createHBondAcceptorFeatureRepr(Object3D& parent_obj, const Pharm::Feature& ftr, unsigned int ftr_type, bool dual) const;
73  void createHalogenBondDonorFeatureRepr(Object3D& parent_obj, const Pharm::Feature& ftr, unsigned int ftr_type) const;
74  void createHalogenBondAcceptorFeatureRepr(Object3D& parent_obj, const Pharm::Feature& ftr, unsigned int ftr_type) const;
75  void createAromaticFeatureRepr(Object3D& parent_obj, const Pharm::Feature& ftr, unsigned int ftr_type) const;
76  void createSphericalFeatureRepr(Object3D& parent_obj, const Pharm::Feature& ftr, unsigned int ftr_type,
77  const Shape3D::SharedPointer& shape, double z_rot = 0.0) const;
78  void createArrowFeatureRepr(Object3D& parent_obj, const Pharm::Feature& ftr, unsigned int ftr_type, bool outgoing, bool dual = false) const;
79 
80  void setMaterialProperty(Object3D& obj, unsigned int ftr_type) const;
81 
82  ColorTable::SharedPointer colorTable;
83  };
84  } // namespace Vis
85 } // namespace CDPL
86 
87 #endif // CDPL_VIS_FEATURECONTAINEROBJECT3DFACTORY_HPP
Definition of the type CDPL::Vis::ColorTable.
Definition of the class CDPL::Vis::Object3DFactory.
Definition of the class CDPL::Vis::Shape3D.
Definition of the preprocessor macro CDPL_VIS_API.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
FeatureContainer.
Definition: FeatureContainer.hpp:53
Feature.
Definition: Feature.hpp:48
std::shared_ptr< ColorTable > SharedPointer
Definition: ColorTable.hpp:51
Class implementing the creation of Vis::Object3D instances providing a 3D representation of Pharm::Fe...
Definition: FeatureContainerObject3DFactory.hpp:59
Object3D::SharedPointer create(const Pharm::FeatureContainer &cntnr)
std::shared_ptr< FeatureContainerObject3DFactory > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FeatureContainerObject3DFactory i...
Definition: FeatureContainerObject3DFactory.hpp:65
The abstract base of classes implementing the creation of Vis::Object3D instances for the 3D visualiz...
Definition: Object3DFactory.hpp:51
Object3D.
Definition: Object3D.hpp:52
std::shared_ptr< Object3D > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Object3D instances.
Definition: Object3D.hpp:60
std::shared_ptr< Shape3D > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Shape3D instances.
Definition: Shape3D.hpp:56
The namespace of the Chemical Data Processing Library.