BALL 1.5.0
Loading...
Searching...
No Matches
ballAndStickModel.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: ballAndStickModel.h,v 1.17.18.1 2007/03/25 21:26:05 oliver Exp $
5//
6
7#ifndef BALL_VIEW_MODELS_BALLANDSTICKMODEL_H
8#define BALL_VIEW_MODELS_BALLANDSTICKMODEL_H
9
10#ifndef BALL_VIEW_MODELS_ATOMBONDMODELBASEPROCESSOR_H
12#endif
13
14#ifndef BALL_KERNEL_ATOM_H
15 #include <BALL/KERNEL/atom.h>
16#endif
17
18namespace BALL
19{
20 class Atom;
21
22 namespace VIEW
23 {
36 {
37 public:
38
40
41
44
45
52
55 AddBallAndStickModel(const AddBallAndStickModel& add_ball_and_stick_model);
56
60
68 virtual void clear();
69
71
74
78 void set(const AddBallAndStickModel& add_ball_and_stick_model);
79
83 const AddBallAndStickModel& operator = (const AddBallAndStickModel& processor);
84
86
94
99 void setBallRadius(const float radius);
100
103 float getBallRadius() const;
104
109 void setStickRadius(const float radius);
110
113 float getStickRadius() const;
114
117 void enableBallAndStickModel();
118
121 void enableStickModel();
122
124
127
144 virtual Processor::Result operator() (Composite& composite);
145
147
150
154 bool isBallAndStickModel() const;
155
159 bool isStickModel() const;
160
162 bool dashedBondsEnabled() const
163 { return dashed_bonds_;}
164
166 void enableDashedBonds(bool state)
167 { dashed_bonds_ = state;}
168
170
173
181 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
182
184
186
187 protected:
188
189 void visualiseBond_(const Bond& bond);
190
191 virtual void visualiseRings_();
192
193 inline void renderStandardBond_(const Bond& bond);
194
195 inline void renderMultipleBond_(const Bond& bond, Vector3 normal, Vector3 dir);
196
198 inline void renderDashedBond_(const Bond& bond, Vector3 n);
199
201
202 Vector3 getSP2Plane_(const Atom& atom, const Bond& bond, const Vector3& dir) const;
203
204 private:
205
206 float ball_radius_;
207 float stick_radius_;
208 float special_radius_;
209
210 bool ball_and_stick_;
211 bool dashed_bonds_;
212
213 vector<vector<Bond*> > ring_bonds_;
214 };
215
216# ifndef BALL_NO_INLINE_FUNCTIONS
217# include <BALL/VIEW/MODELS/ballAndStickModel.iC>
218# endif
219
220 } // namespace VIEW
221} // namespace BALL
222
223#endif // BALL_VIEW_MODELS_BALLANDSTICKMODEL_H
#define BALL_CREATE(name)
Definition create.h:62
char Atom[5]
Definition PDBdefs.h:257
void visualiseBond_(const Bond &bond)
void renderMultipleBond_(const Bond &bond, Vector3 normal, Vector3 dir)
void renderStandardBond_(const Bond &bond)
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
Vector3 getSP2Plane_(const Atom &atom, const Bond &bond, const Vector3 &dir) const
void renderDashedBond_(const Bond &bond, Vector3 n)
#define BALL_VIEW_EXPORT