BALL 1.5.0
Loading...
Searching...
No Matches
cartoonModel.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: cartoonModel.h,v 1.32.18.1 2007/03/25 21:26:05 oliver Exp $
5//
6
7#ifndef BALL_VIEW_MODELS_CARTOONMODEL_H
8#define BALL_VIEW_MODELS_CARTOONMODEL_H
9
10#ifndef BALL_VIEW_MODELS_BACKBONEMODEL_H
12#endif
13
14namespace BALL
15{
16 namespace VIEW
17 {
18 class Mesh;
19
29 : public AddBackboneModel
30 {
31 public:
32
33 enum Types
34 {
35 STRAND = NUCLEIC_ACID + 1,
36 HELIX
37 };
38
40
41
43
45 AddCartoonModel(const AddCartoonModel& cartoon_model);
46
48 virtual ~AddCartoonModel();
49
51 void setHelixRadius(float radius)
52 { helix_radius_ = radius;}
53
55 float getHelixRadius() const
56 { return helix_radius_;}
57
59 void setArrowWidth(float width)
60 {arrow_width_ = width;}
61
63 float getArrowWidth() const
64 { return arrow_width_;}
65
67 void setStrandHeight(float heigth)
68 { strand_height_ = heigth;}
69
71 float getStrandHeight() const
72 { return strand_height_;}
73
75 void setStrandWidth(float w)
76 { strand_width_ = w;}
77
79 float getStrandWidth() const
80 { return strand_width_;}
81
83 void setDNABaseRadius(float r)
84 { DNA_base_radius_ = r;}
85
87 float getDNABaseRadius() const
88 { return DNA_base_radius_;}
89
91 void setDNAHelixRadius(float r)
92 { DNA_helix_radius_ = r;}
93
95 float getDNAHelixRadius() const
96 { return DNA_helix_radius_;}
97
99 void setDNALadderRadius(float r)
100 { DNA_ladder_radius_ = r;}
101
103 float getDNALadderRadius() const
104 { return DNA_ladder_radius_;}
105
107 void setDrawDNAAsLadderModel(bool state)
108 { draw_DNA_as_ladder_ = state;}
109
112 { return draw_DNA_as_ladder_;}
113
115 void enableRibbons(bool state)
116 { draw_ribbon_ = state;}
117
119 bool ribbonsEnabled() const
120 {return draw_ribbon_;}
121
122 protected:
123
125 inline void drawStrand_(const Vector3& start,
126 Vector3& right,
127 Vector3& hn,
128 float arrow_width,
129 Position& last_vertices,
130 Mesh& mesh);
131
133
134 bool assignNucleotideAtoms_(Residue& r, Size nr_atoms, String atom_names[10], Atom* atoms[10]);
135
136 void drawRiboseAtoms_(const Atom* atom1, const Atom* atom2, const Vector3& v1, const Vector3& v2);
137
140 void createModel_(Position set_pos, Position part_pos);
141
142 void createStrand_(Position set_pos, Position part_pos);
143 void createHelix_(Position set_first, Position part_pos);
144 void createTubeHelix_(Position set_first, Position part_pos);
147
148 void renderNucleotideOutline_(const vector<Vector3>& positions, Vector3 uv, Mesh& mesh);
149 Mesh* createDoubleRing_(const vector<Vector3>& positions);
150 Mesh* create6Ring_(vector<Vector3> positions);
151 virtual void refineGuidePoints_();
152
164
167
169 };
170
171
172 } // namespace VIEW
173} // namespace BALL
174
175#endif // BALL_VIEW_MODELS_CARTOONMODEL_H
#define BALL_CREATE(name)
Definition create.h:62
HashMap class based on the STL map (containing serveral convenience functions)
void createStrand_(Position set_pos, Position part_pos)
void assignModelType(ModelPart &part)
virtual void refineGuidePoints_()
void drawStrand_(const Vector3 &start, Vector3 &right, Vector3 &hn, float arrow_width, Position &last_vertices, Mesh &mesh)
Mesh * create6Ring_(vector< Vector3 > positions)
void drawRiboseAtoms_(const Atom *atom1, const Atom *atom2, const Vector3 &v1, const Vector3 &v2)
Mesh * createDoubleRing_(const vector< Vector3 > &positions)
void setStrandHeight(float heigth)
void createTubeHelix_(Position set_first, Position part_pos)
void calculateModelParts(Protein &protein)
void createWatsonCrickModel_(Position set_pos, Position part_pos)
void createSimpleNucleicAcid_(Position set_pos, Position part_pos)
void setArrowWidth(float width)
void setDrawDNAAsLadderModel(bool state)
HashMap< const Residue *, const Residue * > complementary_bases_
void createHelix_(Position set_first, Position part_pos)
bool assignNucleotideAtoms_(Residue &r, Size nr_atoms, String atom_names[10], Atom *atoms[10])
void setDNAHelixRadius(float r)
float getDNAHelixRadius() const
void createModel_(Position set_pos, Position part_pos)
void insertTriangle_(Position v1, Position v2, Position v3, Mesh &mesh)
void enableRibbons(bool state)
void calculateComplementaryBases_(const Composite &composite)
void setDNALadderRadius(float r)
void renderNucleotideOutline_(const vector< Vector3 > &positions, Vector3 uv, Mesh &mesh)
#define BALL_VIEW_EXPORT